예제 #1
0
        public void GetLogin(object obj)
        {
            LoginParm loginparm = obj as LoginParm;

            Data.GetLoginResult = Protocol.DoLogin(loginparm.Username, loginparm.Password);
            OnReadParamEvent(Data.GetLoginResult.ToString());//触发事件
        }
예제 #2
0
        private void OnLogin()
        {
            if (txt_Username.Text == "" || txt_password.Text == "")
            {
                MessageBox.Show(this, "用户名或密不能为空!", "登录提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                return;
            }


            LoginParm loginparm = new LoginParm();

            loginparm.Username = txt_Username.Text;
            loginparm.Password = txt_password.Text;

            ThreadEx threadex = new ThreadEx();

            threadex.Start(new ParameterizedThreadStart(threadex.GetLogin), (Object)loginparm, new EventHandler(GetLogin), this);
            button1.Enabled = false;
        }
예제 #3
0
파일: Login.cs 프로젝트: hao507/xiaoguxian
        private void OnLogin()
        {
            if (txt_Username.Text == "" || txt_password.Text == "")
            {
                MessageBox.Show(this, "用户名或密不能为空!", "登录提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                return;
            }

            LoginParm loginparm = new LoginParm();
            loginparm.Username = txt_Username.Text;
            loginparm.Password = txt_password.Text;

            ThreadEx threadex = new ThreadEx();
            threadex.Start(new ParameterizedThreadStart(threadex.GetLogin), (Object)loginparm, new EventHandler(GetLogin), this);
            button1.Enabled = false;
        }