魔兽争霸登录,魔兽争霸登录界面

魔兽系统,异界之召唤魔兽争霸

魔兽争霸 1

//点击x按钮触发的事件
        private void btnclose_Click(object sender, EventArgs e)
        {
            //退出整个应用
            Application.Exit();
        }

        //点击注册按钮触发的事件
        private void lblregister_Click(object sender, EventArgs e)
        {
            //隐藏当前窗体
            this.Hide();
            FrmRegist frm = new FrmRegist();
            frm.fl = this;
            frm.Show();
        }


        //点击登录按钮触发的事件
        private void btnlogin_Click(object sender, EventArgs e)
        {
            if (ProvingInfo()==true)
          {
             //定义变量接收文本框中的值
              string email = txtemail.Text;
              string password = txtpassword.Text;
              bool happy = false;
              foreach (LoginInfo item in LoginInfo.array)
              {
                  if(item!=null)
                  {
                      if (item.Email.Equals(email) && item.Password.Equals(password))
                      {
                          happy = true;
                          //关闭当前窗体
                          this.Hide();
                          //显示主窗体
                          FrmMain frm = new FrmMain();
                          frm.loginame = item.Name;
                          frm.Show();
                          break;
                      }

                  }
              }
                if(happy==false)
                {
                    MessageBox.Show("登录失败!请检查邮箱和密码是否正确"); 
                }
          }

        }
        //验证填写信息
        public bool ProvingInfo()
        { 
           if(txtemail.Text.Trim().Equals(string.Empty))
           {
           MessageBox.Show("请填写email");
               this.txtemail.Focus();
               return false;
           }
           else if (txtpassword.Text.Trim().Equals(string.Empty))
           {
               MessageBox.Show("请填写密码");
               this.txtpassword.Focus();
               return false;
           }
           else
           {

               return true;
           }

        }

        //Load事件
        private void FrmLogin_Load(object sender, EventArgs e)
        {


             LoginInfo info1 = new LoginInfo();
            info1.Name = "泪洒星辰";
            info1.Id = "123123131313131";
            info1.Email = "[email protected]";
            info1.Password = "[email protected]";
            for (int i = 0; i < LoginInfo.array.Length; i++)
            {
                if (LoginInfo.array[i] == null)
                {
                    LoginInfo.array[i] = info1;
                    break;
                }
            }

    partial class FrmRegist
    {
        // Required designer variable.

        private System.ComponentModel.IContainer components = null;

        // Clean up any resources being used.
        /// <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

        //Required method for Designer support - do not modify
        // the contents of this method with the code editor.
        private void InitializeComponent()
        {
            this.lblname = new System.Windows.Forms.Label();
            this.lblcid = new System.Windows.Forms.Label();
            this.lblemail = new System.Windows.Forms.Label();
            this.lblpassword = new System.Windows.Forms.Label();
            this.txtname = new System.Windows.Forms.TextBox();
            this.txtcid = new System.Windows.Forms.TextBox();
            this.txtemail = new System.Windows.Forms.TextBox();
            this.txtpassword = new System.Windows.Forms.TextBox();
            this.lblok = new System.Windows.Forms.Label();
            this.lblkoone = new System.Windows.Forms.Label();
            this.txtone = new System.Windows.Forms.TextBox();
            this.txtokone = new System.Windows.Forms.TextBox();
            this.label6 = new System.Windows.Forms.Label();
            this.label7 = new System.Windows.Forms.Label();
            this.btnregin = new System.Windows.Forms.Button();
            this.btnclose = new System.Windows.Forms.Button();
            this.SuspendLayout(); 
            // lblname
            this.lblname.AutoSize = true;
            this.lblname.Font = new System.Drawing.Font("楷体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.lblname.Location = new System.Drawing.Point(88, 196);
            this.lblname.Name = "lblname";
            this.lblname.Size = new System.Drawing.Size(59, 19);
            this.lblname.TabIndex = 0;
            this.lblname.Text = "姓名:";
            // lblcid
            this.lblcid.AutoSize = true;
            this.lblcid.Font = new System.Drawing.Font("楷体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.lblcid.Location = new System.Drawing.Point(8, 231);
            this.lblcid.Name = "lblcid";
            this.lblcid.Size = new System.Drawing.Size(119, 19);
            this.lblcid.TabIndex = 0;
            this.lblcid.Text = "身份证号码:";
            // lblemail
            this.lblemail.AutoSize = true;
            this.lblemail.Font = new System.Drawing.Font("楷体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.lblemail.Location = new System.Drawing.Point(48, 274);
            this.lblemail.Name = "lblemail";
            this.lblemail.Size = new System.Drawing.Size(99, 19);
            this.lblemail.TabIndex = 0;
            this.lblemail.Text = "邮箱地址:";
            // 
            // lblpassword
            // 
            this.lblpassword.AutoSize = true;
            this.lblpassword.Font = new System.Drawing.Font("楷体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.lblpassword.Location = new System.Drawing.Point(88, 320);
            this.lblpassword.Name = "lblpassword";
            this.lblpassword.Size = new System.Drawing.Size(59, 19);
            this.lblpassword.TabIndex = 0;
            this.lblpassword.Text = "密码:";
            // 
            // txtname
            // 
            this.txtname.Location = new System.Drawing.Point(154, 193);
            this.txtname.Name = "txtname";
            this.txtname.Size = new System.Drawing.Size(190, 21);
            this.txtname.TabIndex = 1;
            // 
            // txtcid
            // 
            this.txtcid.Location = new System.Drawing.Point(153, 234);
            this.txtcid.Name = "txtcid";
            this.txtcid.Size = new System.Drawing.Size(190, 21);
            this.txtcid.TabIndex = 1;
            // 
            // txtemail
            // 
            this.txtemail.Location = new System.Drawing.Point(153, 277);
            this.txtemail.Name = "txtemail";
            this.txtemail.Size = new System.Drawing.Size(190, 21);
            this.txtemail.TabIndex = 1;
            this.txtemail.TextChanged += new System.EventHandler(this.textBox3_TextChanged);
            // 
            // txtpassword
            // 
            this.txtpassword.Location = new System.Drawing.Point(153, 320);
            this.txtpassword.Name = "txtpassword";
            this.txtpassword.Size = new System.Drawing.Size(190, 21);
            this.txtpassword.TabIndex = 1;
            // 
            // lblok
            // 
            this.lblok.AutoSize = true;
            this.lblok.Font = new System.Drawing.Font("楷体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.lblok.Location = new System.Drawing.Point(366, 279);
            this.lblok.Name = "lblok";
            this.lblok.Size = new System.Drawing.Size(99, 19);
            this.lblok.TabIndex = 0;
            this.lblok.Text = "确认输入:";
            // 
            // lblkoone
            // 
            this.lblkoone.AutoSize = true;
            this.lblkoone.Font = new System.Drawing.Font("楷体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.lblkoone.Location = new System.Drawing.Point(366, 320);
            this.lblkoone.Name = "lblkoone";
            this.lblkoone.Size = new System.Drawing.Size(99, 19);
            this.lblkoone.TabIndex = 0;
            this.lblkoone.Text = "确认输入:";
            // 
            // txtone
            // 
            this.txtone.Location = new System.Drawing.Point(471, 282);
            this.txtone.Name = "txtone";
            this.txtone.Size = new System.Drawing.Size(190, 21);
            this.txtone.TabIndex = 1;
            this.txtone.TextChanged += new System.EventHandler(this.textBox3_TextChanged);
            // 
            // txtokone
            // 
            this.txtokone.Location = new System.Drawing.Point(471, 320);
            this.txtokone.Name = "txtokone";
            this.txtokone.Size = new System.Drawing.Size(190, 21);
            this.txtokone.TabIndex = 1;
            this.txtokone.TextChanged += new System.EventHandler(this.textBox3_TextChanged);
            // 
            // label6
            // 
            this.label6.AutoSize = true;
            this.label6.Font = new System.Drawing.Font("楷体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.label6.Location = new System.Drawing.Point(98, 377);
            this.label6.Name = "label6";
            this.label6.Size = new System.Drawing.Size(99, 19);
            this.label6.TabIndex = 0;
            this.label6.Text = "适龄提示:";
            this.label6.Click += new System.EventHandler(this.label6_Click);
            // 
            // label7
            // 
            this.label7.AutoSize = true;
            this.label7.Font = new System.Drawing.Font("楷体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.label7.ForeColor = System.Drawing.Color.Red;
            this.label7.Location = new System.Drawing.Point(216, 377);
            this.label7.Name = "label7";
            this.label7.Size = new System.Drawing.Size(419, 19);
            this.label7.TabIndex = 0;
            this.label7.Text = "<<星际争霸:自由之翼TM>>适合12岁以上的玩家";
            // 
            // btnregin
            // 
            this.btnregin.BackColor = System.Drawing.Color.Black;
            this.btnregin.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.btnregin.ForeColor = System.Drawing.Color.Transparent;
            this.btnregin.Location = new System.Drawing.Point(188, 432);
            this.btnregin.Name = "btnregin";
            this.btnregin.Size = new System.Drawing.Size(122, 42);
            this.btnregin.TabIndex = 2;
            this.btnregin.Text = "免费注册战网通行证";
            this.btnregin.UseVisualStyleBackColor = false;
            this.btnregin.Click += new System.EventHandler(this.btnregin_Click);
            // 
            // btnclose
            // 
            this.btnclose.BackColor = System.Drawing.Color.Black;
            this.btnclose.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.btnclose.ForeColor = System.Drawing.Color.Transparent;
            this.btnclose.Location = new System.Drawing.Point(370, 432);
            this.btnclose.Name = "btnclose";
            this.btnclose.Size = new System.Drawing.Size(60, 42);
            this.btnclose.TabIndex = 2;
            this.btnclose.Text = "取消";
            this.btnclose.UseVisualStyleBackColor = false;
            this.btnclose.Click += new System.EventHandler(this.btnclose_Click);
            // 
            // FrmRegist
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.BackgroundImage = global::Game.Properties.Resources.魔兽注册图标;
            this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
            this.ClientSize = new System.Drawing.Size(796, 486);
            this.Controls.Add(this.btnclose);
            this.Controls.Add(this.btnregin);
            this.Controls.Add(this.txtpassword);
            this.Controls.Add(this.txtokone);
            this.Controls.Add(this.txtone);
            this.Controls.Add(this.txtemail);
            this.Controls.Add(this.txtcid);
            this.Controls.Add(this.txtname);
            this.Controls.Add(this.label6);
            this.Controls.Add(this.label7);
            this.Controls.Add(this.lblpassword);
            this.Controls.Add(this.lblkoone);
            this.Controls.Add(this.lblok);
            this.Controls.Add(this.lblemail);
            this.Controls.Add(this.lblcid);
            this.Controls.Add(this.lblname);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            this.Name = "FrmRegist";
            this.Text = "FrmRegist";
            this.Load += new System.EventHandler(this.FrmRegist_Load);
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.Label lblname;
        private System.Windows.Forms.Label lblcid;
        private System.Windows.Forms.Label lblemail;
        private System.Windows.Forms.Label lblpassword;
        private System.Windows.Forms.TextBox txtname;
        private System.Windows.Forms.TextBox txtcid;
        private System.Windows.Forms.TextBox txtemail;
        private System.Windows.Forms.TextBox txtpassword;
        private System.Windows.Forms.Label lblok;
        private System.Windows.Forms.Label lblkoone;
        private System.Windows.Forms.TextBox txtone;
        private System.Windows.Forms.TextBox txtokone;
        private System.Windows.Forms.Label label6;
        private System.Windows.Forms.Label label7;
        private System.Windows.Forms.Button btnregin;
        private System.Windows.Forms.Button btnclose;
    }

  魔兽争霸 2

partial class FrmMain
    {
        // Required designer variable.
        private System.ComponentModel.IContainer components = null;

        // Clean up any resources being used.
        /// <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

        // Required method for Designer support - do not modify
        // the contents of this method with the code editor.
        private void InitializeComponent()
        {
            this.SuspendLayout();
            // FrmMain
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.BackgroundImage = global::Game.Properties.Resources.魔兽世界首页;
            this.ClientSize = new System.Drawing.Size(993, 531);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            this.Name = "FrmMain";
            this.Text = "FrmMain";
            this.Load += new System.EventHandler(this.FrmMain_Load);
            this.ResumeLayout(false);

        }

        #endregion

    }

  

http://www.bkjia.com/C\_jc/1198571.htmlwww.bkjia.comtruehttp://www.bkjia.com/C\_jc/1198571.htmlTechArticle魔兽系统,异界之召唤魔兽争霸
//点击x按钮触发的风浪 private void btnclose_Click(object sender,
伊夫ntArgs e) { //退出整个应用 Application.Exit(); } //点击…

魔兽争霸登录,魔兽争霸登录界面

魔兽争霸 3

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 MyWarcraft
{
  
    public partial class FrmLogin : Form
    {
        public FrmLogin()
        {
            InitializeComponent();
        }

        public LoginInfo[] array;             
//用于存款和储蓄登录用户的音信
        private void FrmLogin_Load(object sender, EventArgs e)
        {
            //开始五个用户音讯
            array = new LoginInfo[10];
            LoginInfo info1 = new LoginInfo();
            info1.Name = “孙丽丽”;
            info1.Id = “120185198005088521”;
            info1.Email =
[email protected]“;
            info1.Password = “lili1980”;
            array[0] = info1;
            LoginInfo info2 = new LoginInfo();
魔兽争霸,            info2.Name = “范晶晶”;
            info2.Id = “110186198111088725”;
            info2.Email =
[email protected]“;
            info2.Password = “jingjing”;
            array[1] = info2;
            LoginInfo info3 = new LoginInfo();
            info3.Name = “陈小坤”;
            info3.Id = “110125197905123571”;
            info3.Email =
[email protected]“;
            info3.Password = “chenkun”;
            array[2] = info3;

            lblValidation.Visible = false;//开头时将评释提醒新闻隐藏
        }

        private void btnLogin_Click(object sender, EventArgs e)
        {
            if (txtEmail.Text.Trim() == “” || txtPwd.Text.Trim() ==
“”)
            {
                MessageBox.Show(“用户名或密码无法为空!”, “提醒”);
            }
            else
            {
                string userName = txtEmail.Text;
                string pwd = txtPwd.Text;
                bool isOK = false;
                foreach (LoginInfo item in array)
                {
                    if (item != null)
                    {
                        if (item.Email == userName && item.Password ==
pwd)
                        {
                            lblValidation.Visible = false;
                            isOK = true;
                            FrmMain fm = new FrmMain();
                            fm.lblName.Text = “欢迎,” +
item.Name;//将新闻传递到主页面
                            fm.Show();
                            break;
                        }
                    }
                }
                if (isOK == false)
                {
                    lblValidation.Visible = true;
                    txtPwd.Text = “”;
                    txtPwd.Focus();
                }
            }

        }
      
        
      
    
        private void llbRegist_LinkClicked(object sender,
LinkLabelLinkClickedEventArgs e)
        {
            FrmRegist fr = new FrmRegist();
            fr.fl = this;
            fr.Show();
            this.Hide();//登录窗体隐藏
        }

        private void picClose_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void pictureBox1_Click(object sender, EventArgs e)
        {

        }

    }
}

 

魔兽争霸 4

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 MyWarcraft
{

    public partial class FrmRegist : Form
    {
        public FrmRegist()
        {
            InitializeComponent();
            lblEqualEmail.Visible = false;
            lblEqualPwd.Visible = false;
            lblInfo.Visible = false;
        }
        public FrmLogin fl;//登录窗体对象
        private void btnRegist_Click(object sender, EventArgs e)
        {
            lblInfo.Visible = false;
            if (txtName.Text.Trim() == “” || txtId.Text.Trim() == “” ||
txtEmail.Text.Trim() == “” || txtReEmail.Text.Trim() == “” ||
txtPwd.Text.Trim() == “” || txtRePwd.Text.Trim() == “”)
            {
                lblInfo.Visible = true;
                return;
            }
            bool isOK = true;
            LoginInfo info = new LoginInfo();
            info.Name = txtName.Text;
            info.Id = txtId.Text;
            if (txtEmail.Text == txtReEmail.Text)
            {
                info.Email = txtEmail.Text;
                lblEqualEmail.Visible = false;
            }
            else
            {
                isOK = false;
                lblEqualEmail.Visible = true;
            }
            if (txtPwd.Text == txtRePwd.Text)
            {
                info.Password = txtPwd.Text;
                lblEqualPwd.Visible = false;
            }
            else
            {
                isOK = false;
                lblEqualPwd.Visible = true;
            }

            if (isOK)
            {
                MessageBox.Show(“恭喜,通过验证!”, “提醒”,
MessageBoxButtons.OK, MessageBoxIcon.Information);
                //找到数组中空闲的任务,将注册成功的对象传入
                for (int i = 0; i < fl.array.Length; i++)
                {
                    if (fl.array[i] == null)
                    {
                        fl.array[i] = info;
                        break;
                    }
                }
                fl.Visible = true;
                this.Close();
            }

        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void panel2_Paint(object sender, PaintEventArgs e)
        {

        }

        private void panel1_Paint(object sender, PaintEventArgs e)
        {

        }

    }
}

 

 魔兽争霸 5

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 MyWarcraft
{
    public partial class FrmMain : Form
    {
        public FrmMain()
        {
            InitializeComponent();
        }

        private void FrmMain_Load(object sender, EventArgs e)
        {
           
        }

        private void picClose_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}

 

http://www.bkjia.com/C\_jc/1198204.htmlwww.bkjia.comtruehttp://www.bkjia.com/C\_jc/1198204.htmlTechArticle魔兽争霸登录,魔兽争霸登录界面 using System;
using System.Collections.Generic; using System.ComponentModel; using
System.Data; using System.Drawing; using System.Lin…

相关文章

发表评论

电子邮件地址不会被公开。 必填项已用*标注

*
*
Website