Beispiel #1
0
        private void GetCheckVersion(Object o, EventArgs e)//各网站行情信息:
        {
            if (Define.NewVersionUrl != "")
            {
                DialogResult dr;
                dr = MessageBox.Show("发现新版本,是否现在升级?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (dr == DialogResult.No)
                {
                    Data.GetLoginResult = Define.Login_Falied;
                    this.Close();
                    return;
                }

                label_updatealert.Text = "正在下载升级包。";

                txt_Username.Enabled = false;
                txt_password.Enabled = false;
                button1.Enabled      = false;
                linkLabel3.Enabled   = false;
                linkLabel4.Enabled   = false;


                label_updatealert.Visible = true;


                ThreadEx threadex = new ThreadEx();
                threadex.Start(new ThreadStart(threadex.GetNewVersion), new EventHandler(GetNewVersion), this);
            }
        }
Beispiel #2
0
        private void Login_Load(object sender, EventArgs e)
        {
            this.Text        = Define.TitleBase;
            this.MaximizeBox = false;
            //this.MaximizeBox = false;

            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;

            panel_login.Visible  = true;
            panel_google.Visible = false;
            panel_qq.Visible     = false;

            panel_login.Top  = 0;
            panel_login.Left = 0;

            panel_google.Top  = 0;
            panel_google.Left = 0;

            panel_qq.Top  = 0;
            panel_qq.Left = 0;


            ThreadEx threadex = new ThreadEx();

            threadex.Start(new ThreadStart(threadex.GetCheckVersion), new EventHandler(GetCheckVersion), this);
        }
Beispiel #3
0
        private void OnGoogleCheck()
        {
            Define.GoogleCheck = txt_GoogleCheck.Text;
            if (Define.GoogleCheck != "")
            {
                GoogleCheckParm googlecheckparm = new GoogleCheckParm();
                googlecheckparm.totpCode = Define.GoogleCheck;

                ThreadEx threadex = new ThreadEx();
                threadex.Start(new ParameterizedThreadStart(threadex.GetGoogleCheck), (Object)googlecheckparm, new EventHandler(GetGoogleCheck), this);
            }
            button2.Enabled = false;
        }
Beispiel #4
0
        private void Assets_Load(object sender, EventArgs e)
        {
            this.Text        = Define.TitleBase;
            this.MaximizeBox = false;
            //this.MaximizeBox = false;

            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;


            ThreadEx threadex23 = new ThreadEx();

            threadex23.Start(new ThreadStart(threadex23.GetAssets), new EventHandler(GetAssets), this);
        }
Beispiel #5
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;
        }