public void logout_Click(object sender, System.EventArgs e) { lock (PermissionStore.AppFeatures){ ApplyPermissionAction.ClearPermissionFeatures(); } FrameworkParams.currentUser = null; FrameworkParams.MainForm.Hide(); foreach (Form childForm in MdiChildren){ childForm.Dispose(); } this.barManager1.Dispose(); frmLogin myfrmLogin = new frmLogin(); myfrmLogin.ShowDialog(); }
private void showLoginForm() { this.Dispose(); frmLogin myFrmLogin = new frmLogin(); myFrmLogin.ShowDialog(); }
public void logout_Click(object sender, System.EventArgs e) { ApplyPermissionAction.ClearPermissionFeatures(); SaveUI(); FrameworkParams.currentUser = null; //Đóng cửa sổ chính và các cửa sổ đang mở FrameworkParams.MainForm.Hide(); foreach (Form childForm in MdiChildren){ childForm.Dispose(); } if(this.barManager1!=null) this.barManager1.Dispose(); //Đóng tất cả các Plugin HelpPlugin.DisposeMenuPlugin(); frmLogin myfrmLogin = new frmLogin(); myfrmLogin.ShowDialog(); }
public void processLogOut() { lock (PermissionStore.AppFeatures) { ApplyPermissionAction.ClearPermissionFeatures(); } SaveUI(); FrameworkParams.currentUser = null; //Đóng cửa sổ chính và các cửa sổ đang mở foreach (Form childForm in MdiChildren) { childForm.Dispose(); } if (this.barManager1 != null) this.barManager1.Dispose(); //Stop Stickies ProtocolVN.Plugin.NoteBook.StickiesMethodExec.StopStickies(); //Đóng tất cả các Plugin HelpPlugin.DisposeMenuPlugin(); //Call release resource FrameworkParams.Custom.ReleaseResAfterLogout(); FrameworkParams.MainForm.Hide(); frmLogin myfrmLogin = new frmLogin(); myfrmLogin.Show(); if(FrameworkParams.MainForm is frmLogin){} else FrameworkParams.MainForm.Dispose(); }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); SplashScreen.SetCommentaryString("..Đang nạp giao diện."); this.btnConfig.Image = FWImageDic.CONFIG_IMAGE16; //this.btnExit.Image = FWImageDic.EXIT_IMAGE16; //this.btnLogin.Image = FWImageDic.LOGIN_IMAGE16; this.Icon = FrameworkParams.ApplicationIcon; components = new System.ComponentModel.Container(); user = new User(); user.loadCookies(); txtUsername.EditValue = user.username; txtPassword.EditValue = user.password; if (user.savePass == "Y") chkRememberPwd.Checked = true; if (user.isAutoLogin == "Y") chkAutoLogin.Checked = true; if (frmLoginInstance == null) { if (chkAutoLogin.Checked) FrameworkParams.isSkipLogin = true; frmLoginInstance = this; } // init skin if (FrameworkParams.UsingSkin == true) FrameworkParams.currentSkin = new DevExpressSkin(this.components); FrameworkParams.option = new Option(); FrameworkParams.option.load(); Application.CurrentCulture = ApplyFormatAction.GetCultureInfo(); if (FrameworkParams.currentSkin != null) FrameworkParams.currentSkin.SelectSkin(HelpNumber.ParseInt32(FrameworkParams.option.Skin)); if (FrameworkParams.IsBeforeLogin == true) { FrameworkParams.MainForm = this; if (__PL__.IsUseLicx) { RadParams.isEMB = false; new DevExpres.Tutor.WinLic(); if (FrameworkParams.MainForm.Visible == false) return; } else { RadParams.isEMB = true; } } if (FrameworkParams.isSkipLogin == true && flagRunFirst == true) { SplashScreen.SetCommentaryString("..Đang xử lý đăng nhập tự động."); this.isDirect = true; this.LoginAction(); flagRunFirst = false; } }