G
Guest
I am desperately trying to end the application but nothing seems to work in
following code, language = Langu.... is always executed.
The app starts with an Application.Run(new FrmMain());
Help!
public FrmMain()
{
InitializeComponent();
if (CredentialCache.Credentials.MySession == null)
{
FrmLogin loginForm = new FrmLogin();
loginForm.ShowDialog();
}
if (CredentialCache.Credentials.MySession == null) {NotLoggedEvent(this,
null);}
language = LanguageTable.GetTable (1, 999,
CredentialCache.Credentials.MySession, 1);
InitializeMenu();
timer1_Tick (null, null);
}
private event EventHandler NotLoggedEvent;
private void FrmMain_NotLoggedEvent (object sender, EventArgs e)
{
this.Close();
Application.Exit();
}
following code, language = Langu.... is always executed.
The app starts with an Application.Run(new FrmMain());
Help!
public FrmMain()
{
InitializeComponent();
if (CredentialCache.Credentials.MySession == null)
{
FrmLogin loginForm = new FrmLogin();
loginForm.ShowDialog();
}
if (CredentialCache.Credentials.MySession == null) {NotLoggedEvent(this,
null);}
language = LanguageTable.GetTable (1, 999,
CredentialCache.Credentials.MySession, 1);
InitializeMenu();
timer1_Tick (null, null);
}
private event EventHandler NotLoggedEvent;
private void FrmMain_NotLoggedEvent (object sender, EventArgs e)
{
this.Close();
Application.Exit();
}