Beispiel #1
0
        public Login()
        {
            InitializeComponent();
            var autorunString = WebConfigurationManager.AppSettings["setautorun"];

            if (autorunString == "0")
            {
                this.SetAutoRun();
                My_Utils.XMLUtils("setautorun", "1");
            }
            this.Auto_Login();
        }
Beispiel #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (this.Sql())
            {
                My_Utils.XMLUtils("username", textBox_UserName.Text.Trim());
                My_Utils.XMLUtils("passwd", textBox_Passwd.Text.Trim());
                My_Utils.XMLUtils("islogined", "1");

                /*Main_Menu mainMenu = new Main_Menu();
                 * mainMenu.ShowDialog();*/
                var thread = new Thread(this.openForm);
                thread.Start();
                this.Close();
            }
            else
            {
                MessageBox.Show("用户名或密码错误");
                textBox_UserName.Clear();
                textBox_Passwd.Clear();
            }
        }
Beispiel #3
0
 private void 注销ToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     My_Utils.XMLUtils("islogined", "0");
     Process.Start(Process.GetCurrentProcess().ProcessName + ".exe");
     Application.Exit();
 }