Esempio n. 1
0
 // 注销
 private void btnCancle_Click(object sender, EventArgs e)
 {
     if (CJia.Parking.Tools.Message.ShowQuery("是否确认注销", CJia.Parking.Tools.Message.Button.YesNo) == CJia.Parking.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
         {
             this.Close();
         }
     }
     else
     {
         return;
     }
 }
Esempio n. 2
0
 static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     Application.ThreadException += Application_ThreadException;
     if (CJia.Parking.Tools.Help.SystemInitConfig())
     {
         Form frm = new Form();
         frm.Width           = 451;
         frm.Height          = 273;
         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 (CJia.Parking.User.IsLoginSuccess)
         {
             MainForm mfrm = new MainForm();
             mfrm.WindowState = FormWindowState.Maximized;
             mfrm.ShowDialog();
             mfrm.Dispose();
             while (mfrm.isLogOff)
             {
                 mfrm             = new MainForm();
                 mfrm.WindowState = FormWindowState.Maximized;
                 mfrm.ShowDialog();
             }
         }
     }
 }