Beispiel #1
0
        private void login_Click(object sender, System.EventArgs e)
        {
            string uid;
            bool   RememberMe = this.checkBox1.Checked;

            if (this.comboBox1.SelectedText == "")
            {
                uid = this.comboBox1.Text;
            }
            else
            {
                uid = this.comboBox1.SelectedText;
            }
            string pwd = this.textBox2.Text;

            if (!Regx.isNull(uid) || !Regx.isNull(pwd))
            {
                MessageBox.Show("请输入用户名或密码!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                if (Regx.isNumber(uid))
                {
                    UserInf.AddUser(uid, pwd, RememberMe);
                    this.Visible = false;
                    main Q_main = new main(uid, pwd);
                    ShareDate.MainFormHand = Q_main.Handle.ToInt32();
                    Q_main.Show();
                }
                else
                {
                    MessageBox.Show("请输入合法的QQ号码!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
        }
Beispiel #2
0
        protected override void DefWndProc(ref System.Windows.Forms.Message m)
        {
            switch (m.Msg)
            {
            case 500:                    //播放声音
                PlaySound.play(m.WParam.ToInt32());
                break;

            case 501:                    //闪烁图标
                this.WinName.Add(Regx.CheckUserNumber(m.WParam.ToString()));
                this.MsgId.Add(m.LParam.ToInt32());
                this.IconModel = 2;
                this.timer2.Start();
                break;

            default:
                base.DefWndProc(ref m);
                break;
            }
        }