Example #1
0
        public AccountForm()
        {
            InitializeComponent();

            this.BackColor = Color.FromArgb(44, 82, 110);

            userTextBox                = new uTextBox();
            userTextBox.TipFont        = new Font("微軟正黑體", 10);
            userTextBox.TipColor       = Color.FromArgb(255, 255, 255);
            userTextBox.TipText        = "帐号";
            userTextBox.Font           = new Font("微軟正黑體", 10);
            userTextBox.TextAlign      = HorizontalAlignment.Center;
            userTextBox.ForeColor      = Color.FromArgb(255, 255, 255);
            userTextBox.AutoSize       = false;
            userTextBox.Size           = new Size(180, 30);
            userTextBox.Location       = new Point(35, 50);
            userTextBox.BackColor      = Color.FromArgb(44, 82, 110);
            userTextBox.BorderStyle    = BorderStyle.FixedSingle;
            userTextBox.TabIndex       = 1;
            this.userTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.userTextBox_KeyPress);
            this.Controls.Add(userTextBox);

            passTextBox                = new uTextBox();
            passTextBox.TipFont        = new Font("微軟正黑體", 10);
            passTextBox.TipColor       = Color.FromArgb(255, 255, 255);
            passTextBox.TipText        = "密码";
            passTextBox.Font           = new Font("微軟正黑體", 10);
            passTextBox.TextAlign      = HorizontalAlignment.Center;
            passTextBox.ForeColor      = Color.FromArgb(255, 255, 255);
            passTextBox.AutoSize       = false;
            passTextBox.Size           = new Size(180, 30);
            passTextBox.Location       = new Point(35, 90);
            passTextBox.BackColor      = Color.FromArgb(44, 82, 110);
            passTextBox.BorderStyle    = BorderStyle.FixedSingle;
            passTextBox.PasswordChar   = '*';
            passTextBox.TabIndex       = 2;
            this.passTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.passTextBox_KeyPress);
            this.Controls.Add(passTextBox);

            confirmTextBox                = new uTextBox();
            confirmTextBox.TipFont        = new Font("微軟正黑體", 10);
            confirmTextBox.TipColor       = Color.FromArgb(255, 255, 255);
            confirmTextBox.TipText        = "确认";
            confirmTextBox.Font           = new Font("微軟正黑體", 10);
            confirmTextBox.TextAlign      = HorizontalAlignment.Center;
            confirmTextBox.ForeColor      = Color.FromArgb(255, 255, 255);
            confirmTextBox.AutoSize       = false;
            confirmTextBox.Size           = new Size(180, 30);
            confirmTextBox.Location       = new Point(35, 130);
            confirmTextBox.BackColor      = Color.FromArgb(44, 82, 110);
            confirmTextBox.BorderStyle    = BorderStyle.FixedSingle;
            confirmTextBox.PasswordChar   = '*';
            confirmTextBox.TabIndex       = 3;
            this.confirmTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.confirmTextBox_KeyPress);
            this.Controls.Add(confirmTextBox);

            this.ActiveControl = titleLabel;
        }
Example #2
0
        public LoginForm(int x, int y)
        {
            InitializeComponent();

            this.Location  = new Point(x, y);
            this.BackColor = Color.FromArgb(45, 57, 83);

            if (Login)
            {
                loginBtn.Text     = "登出";
                cancelBtn.Visible = false;
            }
            else
            {
                userTextBox                = new uTextBox();
                userTextBox.TipFont        = new Font("微軟正黑體", 10);
                userTextBox.TipColor       = Color.FromArgb(255, 255, 255);
                userTextBox.TipText        = "帐号";
                userTextBox.Font           = new Font("微軟正黑體", 10);
                userTextBox.TextAlign      = HorizontalAlignment.Center;
                userTextBox.ForeColor      = Color.FromArgb(255, 255, 255);
                userTextBox.AutoSize       = false;
                userTextBox.Size           = new Size(180, 30);
                userTextBox.Location       = new Point(35, 50);
                userTextBox.BackColor      = Color.FromArgb(43, 43, 43);
                userTextBox.BorderStyle    = BorderStyle.FixedSingle;
                userTextBox.TabIndex       = 1;
                this.userTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.userTextBox_KeyPress);
                this.Controls.Add(userTextBox);

                passTextBox                = new uTextBox();
                passTextBox.TipFont        = new Font("微軟正黑體", 10);
                passTextBox.TipColor       = Color.FromArgb(255, 255, 255);
                passTextBox.TipText        = "密码";
                passTextBox.Font           = new Font("微軟正黑體", 10);
                passTextBox.TextAlign      = HorizontalAlignment.Center;
                passTextBox.ForeColor      = Color.FromArgb(255, 255, 255);
                passTextBox.AutoSize       = false;
                passTextBox.Size           = new Size(180, 30);
                passTextBox.Location       = new Point(35, 90);
                passTextBox.BackColor      = Color.FromArgb(43, 43, 43);
                passTextBox.BorderStyle    = BorderStyle.FixedSingle;
                passTextBox.PasswordChar   = '*';
                passTextBox.TabIndex       = 2;
                this.passTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.passTextBox_KeyPress);
                this.Controls.Add(passTextBox);
            }

            this.ActiveControl = titleLabel;
        }