Example #1
0
        private void Login_Load(object sender, EventArgs e)
        {
            Welcome welform = new Welcome();

            welform.ShowDialog();

            igl = (new ClassFactory()).GetIGeneralLogin();

            dh     = new DataHelper();
            UserDT = dh.GetTable(GlobalParam.TableName_User);

            foreach (DataRow dr in UserDT.Rows)
            {
                comboBox_Account.Items.Add(dr["UserName"]);
            }

            this.Icon                     = Properties.Resources.Icon_book;
            this.AcceptButton             = button_Login;
            textBox_PassWord.PasswordChar = '*';
            button_Login.BackColor        = Color.Blue;
            button_Login.ForeColor        = Color.White;
            button_Login.FlatStyle        = FlatStyle.Flat;
            pictureBox_eye.Image          = Properties.Resources.P_eye;
            pictureBox_eye.SizeMode       = PictureBoxSizeMode.StretchImage;
            toolTip_p_eye.SetToolTip(pictureBox_eye, "显示密码");
            //控件排版
            Composing();

            WindowsAPI.AnimateWindow(this.Handle, 300, WindowsAPI.AW_CENTER | WindowsAPI.AW_ACTIVATE);
            timer1.Enabled = true;
        }
Example #2
0
        private void Register_Load(object sender, EventArgs e)
        {
            dh = new DataHelper();
            ClassFactory cf = new ClassFactory();

            igl = cf.GetIGeneralLogin();

            pictureBox_User.Location = new Point(textBox_User.Location.X + textBox_User.Size.Width,
                                                 textBox_User.Location.Y);
            pictureBox_User.Width         = 20;
            pictureBox_User.Height        = textBox_User.Size.Height;
            pictureBox_User.BackColor     = Color.Transparent;
            pictureBox_User.SizeMode      = PictureBoxSizeMode.StretchImage;
            pictureBox_password1.Location = new Point(textBox_passWord.Location.X + textBox_passWord.Size.Width,
                                                      textBox_passWord.Location.Y);
            pictureBox_password1.Width     = 20;
            pictureBox_password1.Height    = textBox_passWord.Size.Height;
            pictureBox_password1.BackColor = Color.Transparent;
            pictureBox_password1.SizeMode  = PictureBoxSizeMode.StretchImage;
            pictureBox_password2.Location  = new Point(textBox_RePassWord.Location.X + textBox_RePassWord.Size.Width,
                                                       textBox_RePassWord.Location.Y);
            pictureBox_password2.Width     = 20;
            pictureBox_password2.Height    = textBox_RePassWord.Size.Height;
            pictureBox_password2.BackColor = Color.Transparent;
            pictureBox_password2.SizeMode  = PictureBoxSizeMode.StretchImage;
            toolTip_error.ShowAlways       = true;
            toolTip_error.IsBalloon        = true;

            this.Location                   = log.Location;
            this.Icon                       = Properties.Resources.Icon_book;
            this.BackgroundImage            = Properties.Resources.P_Register_Background;
            this.BackgroundImageLayout      = ImageLayout.Stretch;
            groupBox1.BackColor             = Color.Transparent;
            label1.BackColor                = Color.Transparent;
            label2.BackColor                = Color.Transparent;
            label3.BackColor                = Color.Transparent;
            linkLabel_returnLogin.BackColor = Color.Transparent;
            textBox_passWord.PasswordChar   = (char)0;
            textBox_RePassWord.PasswordChar = (char)0;
        }