示例#1
0
        private void btn_login_Click(object sender, EventArgs e)
        {
            string username = txt_userName.Text.Trim();
            string pwd      = txt_pwd.Text.Trim();
            string code     = txt_code.Text.Trim();

            if (!string.IsNullOrEmpty(username) && !string.IsNullOrEmpty(pwd))
            {
                this.toolStripMsg.Text = "正在登录......";
                string msg = "";
                if (ots.Login(username, pwd, code, out msg))
                {
                    //MessageBox.Show("登录成功");
                    OpenMainForm();
                }
                else
                {
                    this.toolStripMsg.Text = msg;
                }
            }
        }