[可视化编程]窗体设计及其应用

实验目的

掌握 C# 的 MDI 窗体设计,一个主窗体、多个子窗体间的切换。掌握窗体中基本的控件设计方法,label、textbox、groupbox、radiobutton、comboBox、button 等。掌握 Messagebox 的使用方法

实验要求

登录窗口

(1)设计 MDI 窗体,一个主窗体,登录子窗体输入用户名和密码(系统设置默认用户登录信息:用户名:whut;密码:1234),如果用户名密码正确,消息框提示登录成功。如果用户名不正确,提示需先注册。如果密码错误,提示密码有误,重新输入
在这里插入图片描述

注册窗口

(2)注册子窗体设计,包括用户名、密码、确认密码(TextBox)、性别(GroupBox 和 RadioButton)、专业(ComboBox)等信息。点击 “确认” 按钮,如果用户名不为空,密码与确认密码一致,提示注册成功,并显示注册信息。否则提示错误信息。点击 “重置” 按钮,清空输入框中的内容。点击 “登录” 按钮,返回到登录界面

在这里插入图片描述

源码

BackFrom.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace UserMessageManagementSystem
{
    
    
    public partial class BackForm : Form
    {
    
    
        public BackForm()
        {
    
    
            InitializeComponent();
            LoginForm loginForm = new LoginForm();
            loginForm.MdiParent = this;
            loginForm.Show();

        }

        private void BackForm_Load(object sender, EventArgs e)
        {
    
    

        }
    }
}

BackForm.Designer.cs


namespace UserMessageManagementSystem
{
    
    
    partial class BackForm
    {
    
    
        /// <summary>
        ///  Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        ///  Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
    
    
            if (disposing && (components != null))
            {
    
    
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        ///  Required method for Designer support - do not modify
        ///  the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
    
    
            this.SuspendLayout();
            // 
            // BackForm
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(482, 453);
            this.IsMdiContainer = true;
            this.Name = "BackForm";
            this.Text = "用户信息管理系统";
            this.Load += new System.EventHandler(this.BackForm_Load);
            this.ResumeLayout(false);

        }

        #endregion
    }
}

LoginForm.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace UserMessageManagementSystem
{
    
    
    public partial class LoginForm : Form
    {
    
    
        public LoginForm()
        {
    
    
            InitializeComponent();
        }

        private void Login_Click(object sender, EventArgs e)
        {
    
    
            //从用户名和密码文本框中读取字符串
            String userName = UserName.Text;
            String userPassword = UserPassword.Text;

            //如果用户没有输入用户名就点击登录按键,提示需先注册
            if (userName.Length == 0)
            {
    
    
                MessageBox.Show("用户名不能为空,请输入用户名!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);

            }
            else
            {
    
    
                //如果密码框为空
                if (userPassword.Length == 0)
                {
    
    
                    MessageBox.Show("请输入密码!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
                else
                {
    
    
                    //匹配用户名和密码的正确性,如果正确
                    if (String.Equals(userName, UserInfo.userName) && String.Equals(userPassword, UserInfo.userPassword))
                    {
    
    
                        MessageForm messageForm = new MessageForm();
                        messageForm.MdiParent = this.MdiParent;
                        messageForm.Show();
                        this.Hide();
                    }
                    //如果密码错误
                    else if (String.Equals(userName, UserInfo.userName) && !String.Equals(userPassword, UserInfo.userPassword))
                    {
    
    
                        MessageBox.Show("密码错误!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    }
                    //如果该用户名不存在
                    else
                    {
    
    
                        MessageBox.Show("该用户不存在,请先进行注册!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                    }
                }
            }
        }

        private void LRegister_Click(object sender, EventArgs e)
        {
    
    
            RegisterForm registerForm = new RegisterForm();
            registerForm.MdiParent = this.MdiParent;
            registerForm.Show();
            this.Hide();
        }
    }

    //全局变量,初始化默认用户信息
    static class UserInfo
    {
    
    
        public static String userName = "whut";
        public static String userPassword = "1234";
        public static String userSex = "男";
        public static String Major = "计算机学院";

    }
}

LoginForm.Designer.cs


namespace UserMessageManagementSystem
{
    
    
    partial class LoginForm
    {
    
    
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
    
    
            if (disposing && (components != null))
            {
    
    
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
    
    
            this.label1 = new System.Windows.Forms.Label();
            this.label2 = new System.Windows.Forms.Label();
            this.UserName = new System.Windows.Forms.TextBox();
            this.UserPassword = new System.Windows.Forms.TextBox();
            this.Login = new System.Windows.Forms.Button();
            this.LRegister = new System.Windows.Forms.Button();
            this.SuspendLayout();
            // 
            // label1
            // 
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(36, 62);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(58, 20);
            this.label1.TabIndex = 0;
            this.label1.Text = "用户名:";
            // 
            // label2
            // 
            this.label2.AutoSize = true;
            this.label2.Location = new System.Drawing.Point(36, 125);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(55, 20);
            this.label2.TabIndex = 1;
            this.label2.Text = "密   码:";
            // 
            // UserName
            // 
            this.UserName.Location = new System.Drawing.Point(113, 59);
            this.UserName.Name = "UserName";
            this.UserName.Size = new System.Drawing.Size(125, 27);
            this.UserName.TabIndex = 2;
            // 
            // UserPassword
            // 
            this.UserPassword.Location = new System.Drawing.Point(113, 122);
            this.UserPassword.Name = "UserPassword";
            this.UserPassword.PasswordChar = '*';
            this.UserPassword.Size = new System.Drawing.Size(125, 27);
            this.UserPassword.TabIndex = 3;
            // 
            // Login
            // 
            this.Login.Location = new System.Drawing.Point(113, 182);
            this.Login.Name = "Login";
            this.Login.Size = new System.Drawing.Size(50, 30);
            this.Login.TabIndex = 4;
            this.Login.Text = "登录";
            this.Login.UseVisualStyleBackColor = true;
            this.Login.Click += new System.EventHandler(this.Login_Click);
            // 
            // LRegister
            // 
            this.LRegister.Location = new System.Drawing.Point(188, 182);
            this.LRegister.Name = "LRegister";
            this.LRegister.Size = new System.Drawing.Size(50, 30);
            this.LRegister.TabIndex = 5;
            this.LRegister.Text = "注册";
            this.LRegister.UseVisualStyleBackColor = true;
            this.LRegister.Click += new System.EventHandler(this.LRegister_Click);
            // 
            // LoginForm
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(282, 253);
            this.Controls.Add(this.LRegister);
            this.Controls.Add(this.Login);
            this.Controls.Add(this.UserPassword);
            this.Controls.Add(this.UserName);
            this.Controls.Add(this.label2);
            this.Controls.Add(this.label1);
            this.Name = "LoginForm";
            this.Text = "欢迎登录";
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.Label label2;
        private System.Windows.Forms.TextBox UserName;
        private System.Windows.Forms.TextBox UserPassword;
        private System.Windows.Forms.Button Login;
        private System.Windows.Forms.Button LRegister;
    }
}

MessageForm.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace UserMessageManagementSystem
{
    
    
    public partial class MessageForm : Form
    {
    
    
        public MessageForm()
        {
    
    
            InitializeComponent();
        }

        private void MessageForm_Load(object sender, EventArgs e)
        {
    
    
            usermassage.Text = UserInfo.userName;
            userpassword.Text = UserInfo.userPassword;
            usersex.Text = UserInfo.userSex;
            useracademy.Text = UserInfo.Major;
        }

        private void Register_Click(object sender, EventArgs e)
        {
    
    
            RegisterForm registerForm = new RegisterForm();
            registerForm.MdiParent = this.MdiParent;
            registerForm.Show();
            this.Hide();
        }

        private void Login_Click(object sender, EventArgs e)
        {
    
    
            LoginForm loginForm = new LoginForm();
            loginForm.MdiParent = this.MdiParent;
            loginForm.Show();
            this.Hide();
        }
    }
}

MessageForm.Designer.cs


namespace UserMessageManagementSystem
{
    
    
    partial class MessageForm
    {
    
    
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
    
    
            if (disposing && (components != null))
            {
    
    
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
    
    
            this.label1 = new System.Windows.Forms.Label();
            this.label2 = new System.Windows.Forms.Label();
            this.label3 = new System.Windows.Forms.Label();
            this.label4 = new System.Windows.Forms.Label();
            this.usermassage = new System.Windows.Forms.TextBox();
            this.userpassword = new System.Windows.Forms.TextBox();
            this.usersex = new System.Windows.Forms.TextBox();
            this.useracademy = new System.Windows.Forms.TextBox();
            this.label5 = new System.Windows.Forms.Label();
            this.Login = new System.Windows.Forms.Button();
            this.Register = new System.Windows.Forms.Button();
            this.SuspendLayout();
            // 
            // label1
            // 
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(37, 54);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(69, 20);
            this.label1.TabIndex = 0;
            this.label1.Text = "用户名:";
            // 
            // label2
            // 
            this.label2.AutoSize = true;
            this.label2.Location = new System.Drawing.Point(37, 99);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(66, 20);
            this.label2.TabIndex = 1;
            this.label2.Text = "密   码:";
            // 
            // label3
            // 
            this.label3.AutoSize = true;
            this.label3.Location = new System.Drawing.Point(37, 147);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(66, 20);
            this.label3.TabIndex = 2;
            this.label3.Text = "性   别:";
            // 
            // label4
            // 
            this.label4.AutoSize = true;
            this.label4.Location = new System.Drawing.Point(37, 193);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(66, 20);
            this.label4.TabIndex = 3;
            this.label4.Text = "学   院:";
            // 
            // usermassage
            // 
            this.usermassage.Location = new System.Drawing.Point(96, 47);
            this.usermassage.Name = "usermassage";
            this.usermassage.ReadOnly = true;
            this.usermassage.Size = new System.Drawing.Size(150, 27);
            this.usermassage.TabIndex = 4;
            // 
            // userpassword
            // 
            this.userpassword.Location = new System.Drawing.Point(96, 96);
            this.userpassword.Name = "userpassword";
            this.userpassword.ReadOnly = true;
            this.userpassword.Size = new System.Drawing.Size(150, 27);
            this.userpassword.TabIndex = 5;
            // 
            // usersex
            // 
            this.usersex.Location = new System.Drawing.Point(96, 144);
            this.usersex.Name = "usersex";
            this.usersex.ReadOnly = true;
            this.usersex.Size = new System.Drawing.Size(150, 27);
            this.usersex.TabIndex = 6;
            // 
            // useracademy
            // 
            this.useracademy.Location = new System.Drawing.Point(96, 190);
            this.useracademy.Name = "useracademy";
            this.useracademy.ReadOnly = true;
            this.useracademy.Size = new System.Drawing.Size(150, 27);
            this.useracademy.TabIndex = 7;
            // 
            // label5
            // 
            this.label5.AutoSize = true;
            this.label5.Location = new System.Drawing.Point(56, 9);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(174, 20);
            this.label5.TabIndex = 8;
            this.label5.Text = "登录成功,欢迎您!!!";
            // 
            // Login
            // 
            this.Login.Location = new System.Drawing.Point(96, 223);
            this.Login.Name = "Login";
            this.Login.Size = new System.Drawing.Size(50, 30);
            this.Login.TabIndex = 9;
            this.Login.Text = "登录";
            this.Login.UseVisualStyleBackColor = true;
            this.Login.Click += new System.EventHandler(this.Login_Click);
            // 
            // Register
            // 
            this.Register.Location = new System.Drawing.Point(196, 223);
            this.Register.Name = "Register";
            this.Register.Size = new System.Drawing.Size(50, 30);
            this.Register.TabIndex = 10;
            this.Register.Text = "注册";
            this.Register.UseVisualStyleBackColor = true;
            this.Register.Click += new System.EventHandler(this.Register_Click);
            // 
            // MessageForm
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(282, 253);
            this.Controls.Add(this.Register);
            this.Controls.Add(this.Login);
            this.Controls.Add(this.label5);
            this.Controls.Add(this.useracademy);
            this.Controls.Add(this.usersex);
            this.Controls.Add(this.userpassword);
            this.Controls.Add(this.usermassage);
            this.Controls.Add(this.label4);
            this.Controls.Add(this.label3);
            this.Controls.Add(this.label2);
            this.Controls.Add(this.label1);
            this.Name = "MessageForm";
            this.Text = "用户信息";
            this.Load += new System.EventHandler(this.MessageForm_Load);
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.Label label2;
        private System.Windows.Forms.Label label3;
        private System.Windows.Forms.Label label4;
        private System.Windows.Forms.TextBox usermassage;
        private System.Windows.Forms.TextBox userpassword;
        private System.Windows.Forms.TextBox usersex;
        private System.Windows.Forms.TextBox useracademy;
        private System.Windows.Forms.Label label5;
        private System.Windows.Forms.Button Login;
        private System.Windows.Forms.Button Register;
    }
}

Program.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace UserMessageManagementSystem
{
    
    
    static class Program
    {
    
    
        /// <summary>
        ///  The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
    
    
            Application.SetHighDpiMode(HighDpiMode.SystemAware);
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new BackForm());
        }
    }
}

RegisterForm.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace UserMessageManagementSystem
{
    
    
    public partial class RegisterForm : Form
    {
    
    
        public RegisterForm()
        {
    
    
            InitializeComponent();
        }

        public static bool judgePassword(string password)
        {
    
    
            int Lletter, Bletter, digit, symbol;
            Lletter = Bletter = digit = symbol = 0;

            foreach(char ch in password)
            {
    
    
                if (ch >= '0' && ch <= '9')
                    digit++;
                else if (ch >= 'a' && ch <= 'z') 
                    Lletter++;
                else if (ch >= 'A' && ch <= 'Z')
                    Bletter++;
                else
                    symbol++;
            }
            if (Lletter != 0 && Bletter != 0 && digit != 0 && symbol != 0)
                return true;
            else
                return false;
        }

        private void button1_Click(object sender, EventArgs e)
        {
    
    
            if (RUserName.Text.Length == 0)
            {
    
    
                MessageBox.Show("请输入用户名!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            else
            {
    
    
                if (RUserPassword.Text.Length == 0)
                {
    
    
                    MessageBox.Show("请输入密码!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
                else if (RUserPassword.Text.Length < 8 || RUserPassword.Text.Length > 16)
                {
    
    
                    MessageBox.Show("密码长度最低8位,最高16位!\n请重新输入密码!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
                else if (!RegisterForm.judgePassword(RUserPassword.Text)){
    
    
                    MessageBox.Show("密码必须由大写、小写字母、数字及特殊字符组成!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
                else if (RUserPassword2.Text.Length == 0)
                {
    
    
                    MessageBox.Show("请再次输入密码!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
                else if (!String.Equals(RUserPassword.Text, RUserPassword2.Text))
                {
    
    
                    MessageBox.Show("两次输入的密码不一致!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
                else
                {
    
    
                    //如果已选择性别
                    if (SexM.Checked || SexW.Checked)
                    {
    
    
                        if (Major.SelectedIndex != -1)
                        {
    
    
                            UserInfo.userName = RUserName.Text;
                            UserInfo.userPassword = RUserPassword.Text;
                            UserInfo.Major = Major.Text;

                            if (SexM.Checked)
                            {
    
    
                                UserInfo.userSex = "男";
                            }
                            else
                            {
    
    
                                UserInfo.userSex = "女";
                            }

                            MessageBox.Show("注册成功!" +
                                "\n用户名:" + UserInfo.userName +
                                "\n密  码:" + UserInfo.userPassword +
                                "\n性  别:" + UserInfo.userSex +
                                "\n专  业:" + UserInfo.Major,
                                "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                        }
                        else
                        {
    
    
                            MessageBox.Show("请选择专业!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        }
                    }
                    else
                    {
    
    
                        MessageBox.Show("请选择性别!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    }
                }
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
    
    
            RUserName.Text = "";
            RUserPassword.Text = "";
            RUserPassword2.Text = "";
            SexM.Checked = false;
            SexW.Checked = false;
            Major.SelectedIndex = -1;

            UserInfo.userName = "";
            UserInfo.userPassword = "";
            UserInfo.userSex = "";
            UserInfo.Major = "";

            MessageBox.Show("重置成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
        }

        private void button3_Click(object sender, EventArgs e)
        {
    
    
            LoginForm loginForm = new LoginForm();
            loginForm.MdiParent = this.MdiParent;
            loginForm.Show();
            this.Hide();
        }

        private void RegisterForm_Load(object sender, EventArgs e)
        {
    
    
            Major.Items.Add("计算机学院");
            Major.Items.Add("自动化学院");
            Major.Items.Add("外国语学院");
            Major.Items.Add("资环学院");
            Major.Items.Add("理学院");
        }
    }
}

RegisterForm.Designer.cs


namespace UserMessageManagementSystem
{
    
    
    partial class RegisterForm
    {
    
    
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
    
    
            if (disposing && (components != null))
            {
    
    
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
    
    
            this.label1 = new System.Windows.Forms.Label();
            this.label2 = new System.Windows.Forms.Label();
            this.label3 = new System.Windows.Forms.Label();
            this.label4 = new System.Windows.Forms.Label();
            this.label5 = new System.Windows.Forms.Label();
            this.RUserName = new System.Windows.Forms.TextBox();
            this.RUserPassword2 = new System.Windows.Forms.TextBox();
            this.RUserPassword = new System.Windows.Forms.TextBox();
            this.groupBox1 = new System.Windows.Forms.GroupBox();
            this.SexW = new System.Windows.Forms.RadioButton();
            this.SexM = new System.Windows.Forms.RadioButton();
            this.Major = new System.Windows.Forms.ComboBox();
            this.button1 = new System.Windows.Forms.Button();
            this.button2 = new System.Windows.Forms.Button();
            this.button3 = new System.Windows.Forms.Button();
            this.groupBox1.SuspendLayout();
            this.SuspendLayout();
            // 
            // label1
            // 
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(106, 38);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(58, 20);
            this.label1.TabIndex = 0;
            this.label1.Text = "用户名:";
            // 
            // label2
            // 
            this.label2.AutoSize = true;
            this.label2.Location = new System.Drawing.Point(105, 91);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(59, 20);
            this.label2.TabIndex = 1;
            this.label2.Text = "密    码:";
            // 
            // label3
            // 
            this.label3.AutoSize = true;
            this.label3.Location = new System.Drawing.Point(91, 141);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(73, 20);
            this.label3.TabIndex = 2;
            this.label3.Text = "确认密码:";
            // 
            // label4
            // 
            this.label4.AutoSize = true;
            this.label4.Location = new System.Drawing.Point(105, 194);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(59, 20);
            this.label4.TabIndex = 3;
            this.label4.Text = "性    别:";
            // 
            // label5
            // 
            this.label5.AutoSize = true;
            this.label5.Location = new System.Drawing.Point(105, 247);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(59, 20);
            this.label5.TabIndex = 4;
            this.label5.Text = "学    院:";
            // 
            // RUserName
            // 
            this.RUserName.Location = new System.Drawing.Point(170, 35);
            this.RUserName.Name = "RUserName";
            this.RUserName.Size = new System.Drawing.Size(125, 27);
            this.RUserName.TabIndex = 5;
            // 
            // RUserPassword2
            // 
            this.RUserPassword2.Location = new System.Drawing.Point(170, 138);
            this.RUserPassword2.Name = "RUserPassword2";
            this.RUserPassword2.Size = new System.Drawing.Size(125, 27);
            this.RUserPassword2.TabIndex = 6;
            // 
            // RUserPassword
            // 
            this.RUserPassword.Location = new System.Drawing.Point(170, 84);
            this.RUserPassword.Name = "RUserPassword";
            this.RUserPassword.Size = new System.Drawing.Size(125, 27);
            this.RUserPassword.TabIndex = 7;
            // 
            // groupBox1
            // 
            this.groupBox1.Controls.Add(this.SexW);
            this.groupBox1.Controls.Add(this.SexM);
            this.groupBox1.Location = new System.Drawing.Point(170, 174);
            this.groupBox1.Name = "groupBox1";
            this.groupBox1.Size = new System.Drawing.Size(125, 50);
            this.groupBox1.TabIndex = 8;
            this.groupBox1.TabStop = false;
            // 
            // SexW
            // 
            this.SexW.AutoSize = true;
            this.SexW.Location = new System.Drawing.Point(63, 16);
            this.SexW.Name = "SexW";
            this.SexW.Size = new System.Drawing.Size(45, 24);
            this.SexW.TabIndex = 9;
            this.SexW.TabStop = true;
            this.SexW.Text = "女";
            this.SexW.UseVisualStyleBackColor = true;
            // 
            // SexM
            // 
            this.SexM.AutoSize = true;
            this.SexM.Location = new System.Drawing.Point(12, 16);
            this.SexM.Name = "SexM";
            this.SexM.Size = new System.Drawing.Size(45, 24);
            this.SexM.TabIndex = 0;
            this.SexM.TabStop = true;
            this.SexM.Text = "男";
            this.SexM.UseVisualStyleBackColor = true;
            // 
            // Major
            // 
            this.Major.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.Major.FormattingEnabled = true;
            this.Major.Location = new System.Drawing.Point(170, 244);
            this.Major.Name = "Major";
            this.Major.Size = new System.Drawing.Size(125, 28);
            this.Major.TabIndex = 9;
            // 
            // button1
            // 
            this.button1.Location = new System.Drawing.Point(109, 303);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(50, 30);
            this.button1.TabIndex = 10;
            this.button1.Text = "注册";
            this.button1.UseVisualStyleBackColor = true;
            this.button1.Click += new System.EventHandler(this.button1_Click);
            // 
            // button2
            // 
            this.button2.Location = new System.Drawing.Point(177, 303);
            this.button2.Name = "button2";
            this.button2.Size = new System.Drawing.Size(50, 30);
            this.button2.TabIndex = 11;
            this.button2.Text = "重置";
            this.button2.UseVisualStyleBackColor = true;
            this.button2.Click += new System.EventHandler(this.button2_Click);
            // 
            // button3
            // 
            this.button3.Location = new System.Drawing.Point(245, 303);
            this.button3.Name = "button3";
            this.button3.Size = new System.Drawing.Size(50, 30);
            this.button3.TabIndex = 12;
            this.button3.Text = "登录";
            this.button3.UseVisualStyleBackColor = true;
            this.button3.Click += new System.EventHandler(this.button3_Click);
            // 
            // RegisterForm
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(382, 353);
            this.Controls.Add(this.button3);
            this.Controls.Add(this.button2);
            this.Controls.Add(this.button1);
            this.Controls.Add(this.Major);
            this.Controls.Add(this.groupBox1);
            this.Controls.Add(this.RUserPassword);
            this.Controls.Add(this.RUserPassword2);
            this.Controls.Add(this.RUserName);
            this.Controls.Add(this.label5);
            this.Controls.Add(this.label4);
            this.Controls.Add(this.label3);
            this.Controls.Add(this.label2);
            this.Controls.Add(this.label1);
            this.Name = "RegisterForm";
            this.Text = "欢迎注册";
            this.Load += new System.EventHandler(this.RegisterForm_Load);
            this.groupBox1.ResumeLayout(false);
            this.groupBox1.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.Label label2;
        private System.Windows.Forms.Label label3;
        private System.Windows.Forms.Label label4;
        private System.Windows.Forms.Label label5;
        private System.Windows.Forms.TextBox RUserName;
        private System.Windows.Forms.TextBox RUserPassword2;
        private System.Windows.Forms.TextBox RUserPassword;
        private System.Windows.Forms.GroupBox groupBox1;
        private System.Windows.Forms.RadioButton SexW;
        private System.Windows.Forms.RadioButton SexM;
        private System.Windows.Forms.ComboBox Major;
        private System.Windows.Forms.Button button1;
        private System.Windows.Forms.Button button2;
        private System.Windows.Forms.Button button3;
    }
}

猜你喜欢

转载自blog.csdn.net/weixin_51008866/article/details/115588035