private void DetachFireFormEvents(FireForm <T> fireForm) { fireForm.Form <T>().FormClosing -= FormFireManager_OnFormClosing; fireForm.Form <T>().FormClosed -= FormFireManager_OnFormClosed; fireForm.Form <T>().Shown -= FormFireManager_OnShown; fireForm.Form <T>().Load -= FormFireManager_OnLoad; }
private void imgBtn_Reports_Click(object sender, EventArgs e) { try { if (!ActivateForm.NOW("WideForm"))//check the form if its already loaded { FireForm.Fire("GameTech.B3Reports.Forms.WideForm"); } this.Visible = false; } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void imgBtn_Settings_Click(object sender, EventArgs e) { try { if (!ActivateForm.NOW("SecurityForm"))//check the form if its already loaded { FireForm.Fire("GameTech.B3Reports.Forms.SecurityForm"); } this.Visible = false; } catch (Exception ex) { MessageBox.Show(ex.Message); } // SecurityForm.selectFirstRowListUserNameFromNewMenu(); }
private void imgBtnChangePassword_Click(object sender, EventArgs e) { try { LoginFullWin.IschangePassword = true; if (!ActivateForm.NOW("loginFullWin"))//check the form if its already loaded { FireForm.Fire("GameTech.B3Reports.Forms.loginFullWin"); } else { this.Visible = false; } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void AttachFireFormEvents(FireForm <T> fireForm) { try { if (fireForm == null) { throw new ArgumentNullException(nameof(fireForm), "fireForm parameter must be initalized when MainForm property is initalizing"); } DetachFireFormEvents(fireForm); fireForm.Form <T>().FormClosing += FormFireManager_OnFormClosing; fireForm.Form <T>().FormClosed += FormFireManager_OnFormClosed; fireForm.Form <T>().Shown += FormFireManager_OnShown; fireForm.Form <T>().Load += FormFireManager_OnLoad; fireForm.Form <T>().Resize += FormFireManager_OnResize; } catch (Exception exception) { throw new FormFireExceptions.FireFormEventException(exception.Message, exception); } }
private void SystemSettings_FormClosing(object sender, FormClosingEventArgs e) { try { if (!ActivateForm.NOW("NewMenu"))//check the form if its already loaded { FireForm.Fire("GameTech.B3Reports.Forms.NewMenu"); } else { this.Visible = false; } } catch (Exception ex) { MessageBox.Show(ex.Message); //MessageForm.Show(this, mstrFormName + "fixUnitToolStripMenuItem_Click....Exception: " + ex.Message, "Game Management Main"); } clearImage(); }
private void btnLogout(object sender, EventArgs e) { WriteLog.WriteLog_("", CurrentUserLoggedIn.username, "Logout successful", GetCurrentMacID.MacAddress, ""); try { LoginFullWin.IschangePassword = false; if (!ActivateForm.NOW("loginFullWin"))//check the form if its already loaded { FireForm.Fire("GameTech.B3Reports.Forms.loginFullWin"); } else { this.Visible = false; } } catch (Exception ex) { MessageBox.Show(ex.Message); } }