Beispiel #1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            //Application.Run(new frmUserLogin());
            //Application.Run(new frmUserManage());
            //Application.Run(new publisherInfoManage());
            //Application.Run(new frmBookTypeManage());

            frmUserLogin frmUL = new frmUserLogin();
            frmUL.ShowDialog();
            if (frmUL.DialogResult == DialogResult.OK)
            {
                frmUL.Close();
                Application.Run(new frmBookMain());
            }
            else
            {
                Application.Run(new frmBookMain());     // need to be delete
                Application.Exit();
            }
        }
Beispiel #2
0
 ///////////////////////////////////////////////////////////////////
 /// 5 'userManage' menu events
 //////////////////////////////////////////////////////////////////////////
 private void mnuReLogin_Click(object sender, EventArgs e)
 {
     frmUserLogin frmUL = new frmUserLogin();
     frmUL.ShowDialog();
     if (frmUL.DialogResult == DialogResult.OK)
     {
         frmUL.Close();
         toolStripStatusLabel2.Text = "当前登录用户为: " + currentUserName;
         toolStripStatusLabel3.Text = "登录日期为: "
             + DateTime.Now.ToLongDateString().ToString();
     }
 }