Orel Gabay asked 2017-09-19 09:05:41 UTC
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.
Orel Gabay asked 2017-09-19 09:05:41 UTC
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.