[SOLVED] Login screen and Main window

Answered
0
0

Hi,

i’m trying to create login screen with main window layout.

at start i creaeted the login screen and the main window inherit from page class, in the program.cs file i have checked if the callback from the login page return true,hide the login screen and show the main window.

if (Application.Session[Constants.SESSION_ACTIVE_CLIENT] != null)
{
((Page)sender).Hide();
MainPage oMain = new MainPage();
oMain.Closed += OMain_Closed; — only if its Form
oMain.Show();
}

this works fine , but when i’m trying to do a logout the only way to this is to use the Application.Exit() command .

this command close the current tab and its not good for me because i want to transfer the user to the login page again.

so i have changed the main page to inherit from the Form class. this is working fine as well but i can’t get rid of the Header Form and its very annoying.

another thing is , when the main window inherit from the Form class i can use Closed event and show the login page in case of user logout.

so, i’m asking if there an option to remove the header from the main Form/ can anyone suggests me how to close the main window and transfer the user to the login page in case when two of them inherit from the Page class?

thanks,

Orel.

  • You must to post comments
Best Answer
0
0

Hi Orel,

it appears to me that your approach is a bit too complicated.
Please find attached a sample that shows how a login page can be implemented.

It´s based on some information that can be found here: https://wisej.com/support/question/how-to-show-a-logout-page-after-application-exit

Basically it´s a combination of handling Wisej.onExit event (see default.html) and setting the LoginPage as start page (see default.json).

What you observe that the tab is closed on Application.Exit () is called, only happens when the browser is started by Visual Studio in debug mode.
As a side note, while not really needed here, you can remove the Header of a form by setting ControlBox = false and the Text to “”.

Hope that helps.

Best regards
Frank

  • Orel Gabay
    thank you Frank! Orel.
  • You must to post comments
0
0

Howdy,

I’d like to use this example to start my App login form, but the project has a reference to wisej.web.dll and wisej.core.dll that i don’t.

Where can i get it?

WiseJ 2.0.13 installed and vs2019

  • Levie (ITG)
    Hi Jorge, download Wisej 1.5.58 (Wisej.core and Wisej.web dlls) here: https://wisej.com/builds/ and reference them from C:\Program Files\IceTeaGroup. Wisej.web and Wisej.core became Wisej.Framework in Wisej 2. Hope this helps! Best regards, Levie
  • Jorge Bastos
    This project has 2 years and was targeted to .net 4.5, that part is solved. But when i run the project it still looks for wisej.web and wisej.core
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.