示例#1
0
文件: MainForm.cs 项目: whuacn/CJia
 // 注销
 private void TmsiLogOut_Click(object sender, EventArgs e)
 {
     if (CJia.PIVAS.Tools.Message.ShowQuery("是否确认注销", CJia.PIVAS.Tools.Message.Button.YesNo) == CJia.PIVAS.Tools.Message.Result.Yes)
     {
         Form frm = new Form();
         frm.Text            = "登录";
         frm.Width           = 410;
         frm.Height          = 270;
         frm.FormBorderStyle = FormBorderStyle.None;
         frm.StartPosition   = FormStartPosition.CenterScreen;
         UI.LoginView loginView = new UI.LoginView();
         frm.Controls.Add(loginView);
         loginView.Dock = DockStyle.Fill;
         frm.ShowDialog();
         if (User.isLoginSuccess)
         {
             this.isLogOff = true;
             this.FindForm().Close();
         }
     }
     else
     {
         return;
     }
 }
示例#2
0
文件: MainForm.cs 项目: whuacn/CJia
 // 注销
 private void TmsiLogOut_Click(object sender, EventArgs e)
 {
     if (CJia.PIVAS.Tools.Message.ShowQuery("是否确认注销", CJia.PIVAS.Tools.Message.Button.YesNo) == CJia.PIVAS.Tools.Message.Result.Yes)
     {
         Form frm = new Form();
         frm.Text            = "登录";
         frm.Width           = 410;
         frm.Height          = 270;
         frm.FormBorderStyle = FormBorderStyle.None;
         frm.StartPosition   = FormStartPosition.CenterScreen;
         UI.LoginView loginView = new UI.LoginView();
         frm.Controls.Add(loginView);
         loginView.Dock = DockStyle.Fill;
         frm.ShowDialog();
         if (User.isLoginSuccess)
         {
             while (tabMain.TabPages.Count > 0)
             {
                 tabMain.TabPages[0].Dispose();
             }
             LblUserName.Text = User.UserName;
             LblLogTime.Text  = User.LogTime.ToString();
         }
     }
     else
     {
         return;
     }
 }