⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 register.cs

📁 XP界面优化精灵, XP界面优化精灵
💻 CS
📖 第 1 页 / 共 2 页
字号:
			// 
			// bn_GetUserID
			// 
			this.bn_GetUserID.FlatStyle = System.Windows.Forms.FlatStyle.System;
			this.bn_GetUserID.Location = new System.Drawing.Point(188, 72);
			this.bn_GetUserID.Name = "bn_GetUserID";
			this.bn_GetUserID.Size = new System.Drawing.Size(68, 22);
			this.bn_GetUserID.TabIndex = 1;
			this.bn_GetUserID.Text = "得到ID号";
			this.bn_GetUserID.Click += new System.EventHandler(this.bn_GetUserID_Click);
			// 
			// label13
			// 
			this.label13.AutoSize = true;
			this.label13.ForeColor = System.Drawing.Color.White;
			this.label13.Location = new System.Drawing.Point(258, 76);
			this.label13.Name = "label13";
			this.label13.Size = new System.Drawing.Size(110, 17);
			this.label13.TabIndex = 16;
			this.label13.Text = "*必须为英文和数字";
			// 
			// tb_user
			// 
			this.tb_user.Location = new System.Drawing.Point(88, 72);
			this.tb_user.Name = "tb_user";
			this.tb_user.Size = new System.Drawing.Size(92, 21);
			this.tb_user.TabIndex = 0;
			this.tb_user.Text = "";
			// 
			// label12
			// 
			this.label12.AutoSize = true;
			this.label12.Location = new System.Drawing.Point(24, 78);
			this.label12.Name = "label12";
			this.label12.Size = new System.Drawing.Size(54, 17);
			this.label12.TabIndex = 14;
			this.label12.Text = "用户名:";
			// 
			// bn_cancel
			// 
			this.bn_cancel.FlatStyle = System.Windows.Forms.FlatStyle.System;
			this.bn_cancel.Location = new System.Drawing.Point(274, 212);
			this.bn_cancel.Name = "bn_cancel";
			this.bn_cancel.Size = new System.Drawing.Size(108, 23);
			this.bn_cancel.TabIndex = 8;
			this.bn_cancel.Text = "取消";
			this.bn_cancel.Click += new System.EventHandler(this.bn_cancel_Click);
			// 
			// cn_check
			// 
			this.cn_check.FlatStyle = System.Windows.Forms.FlatStyle.System;
			this.cn_check.Location = new System.Drawing.Point(158, 212);
			this.cn_check.Name = "cn_check";
			this.cn_check.Size = new System.Drawing.Size(108, 23);
			this.cn_check.TabIndex = 7;
			this.cn_check.Text = "确定";
			this.cn_check.Click += new System.EventHandler(this.cn_check_Click);
			// 
			// bn_othercheck
			// 
			this.bn_othercheck.FlatStyle = System.Windows.Forms.FlatStyle.System;
			this.bn_othercheck.Location = new System.Drawing.Point(18, 212);
			this.bn_othercheck.Name = "bn_othercheck";
			this.bn_othercheck.Size = new System.Drawing.Size(108, 23);
			this.bn_othercheck.TabIndex = 11;
			this.bn_othercheck.Text = "查看其它支付方式";
			this.bn_othercheck.Click += new System.EventHandler(this.bn_goHomePage_Click);
			// 
			// tb_code4
			// 
			this.tb_code4.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(192)));
			this.tb_code4.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
			this.tb_code4.Location = new System.Drawing.Point(304, 158);
			this.tb_code4.Name = "tb_code4";
			this.tb_code4.Size = new System.Drawing.Size(58, 21);
			this.tb_code4.TabIndex = 6;
			this.tb_code4.Text = "";
			this.tb_code4.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
			this.tb_code4.TextChanged += new System.EventHandler(this.tb_code1_TextChanged);
			// 
			// tb_code3
			// 
			this.tb_code3.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(192)));
			this.tb_code3.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
			this.tb_code3.Location = new System.Drawing.Point(232, 158);
			this.tb_code3.Name = "tb_code3";
			this.tb_code3.Size = new System.Drawing.Size(58, 21);
			this.tb_code3.TabIndex = 5;
			this.tb_code3.Text = "";
			this.tb_code3.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
			this.tb_code3.TextChanged += new System.EventHandler(this.tb_code1_TextChanged);
			// 
			// tb_code2
			// 
			this.tb_code2.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(192)));
			this.tb_code2.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
			this.tb_code2.Location = new System.Drawing.Point(160, 158);
			this.tb_code2.Name = "tb_code2";
			this.tb_code2.Size = new System.Drawing.Size(58, 21);
			this.tb_code2.TabIndex = 4;
			this.tb_code2.Text = "";
			this.tb_code2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
			this.tb_code2.TextChanged += new System.EventHandler(this.tb_code1_TextChanged);
			// 
			// tb_code1
			// 
			this.tb_code1.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(192)));
			this.tb_code1.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
			this.tb_code1.Location = new System.Drawing.Point(88, 158);
			this.tb_code1.Name = "tb_code1";
			this.tb_code1.Size = new System.Drawing.Size(58, 21);
			this.tb_code1.TabIndex = 3;
			this.tb_code1.Text = "";
			this.tb_code1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
			this.tb_code1.TextChanged += new System.EventHandler(this.tb_code1_TextChanged);
			// 
			// tb_key
			// 
			this.tb_key.Location = new System.Drawing.Point(88, 114);
			this.tb_key.Name = "tb_key";
			this.tb_key.ReadOnly = true;
			this.tb_key.Size = new System.Drawing.Size(274, 21);
			this.tb_key.TabIndex = 2;
			this.tb_key.Text = "";
			// 
			// label10
			// 
			this.label10.AutoSize = true;
			this.label10.Location = new System.Drawing.Point(24, 164);
			this.label10.Name = "label10";
			this.label10.Size = new System.Drawing.Size(54, 17);
			this.label10.TabIndex = 4;
			this.label10.Text = "注册码:";
			// 
			// label9
			// 
			this.label9.AutoSize = true;
			this.label9.Location = new System.Drawing.Point(24, 120);
			this.label9.Name = "label9";
			this.label9.Size = new System.Drawing.Size(66, 17);
			this.label9.TabIndex = 3;
			this.label9.Text = "用户ID号:";
			// 
			// label8
			// 
			this.label8.AutoSize = true;
			this.label8.ForeColor = System.Drawing.Color.White;
			this.label8.Location = new System.Drawing.Point(32, 24);
			this.label8.Name = "label8";
			this.label8.Size = new System.Drawing.Size(351, 17);
			this.label8.TabIndex = 2;
			this.label8.Text = "XP界面优化精灵不是免费软件,你必须注册才能享受无限制使用。";
			// 
			// label11
			// 
			this.label11.BackColor = System.Drawing.Color.White;
			this.label11.Location = new System.Drawing.Point(108, 168);
			this.label11.Name = "label11";
			this.label11.Size = new System.Drawing.Size(242, 1);
			this.label11.TabIndex = 10;
			// 
			// Register
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
			this.ClientSize = new System.Drawing.Size(402, 318);
			this.Controls.Add(this.bn_register);
			this.Controls.Add(this.bn_need);
			this.Controls.Add(this.part1);
			this.Controls.Add(this.part2);
			this.Controls.Add(this.label1);
			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
			this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
			this.MaximizeBox = false;
			this.MinimizeBox = false;
			this.Name = "Register";
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
			this.Text = "软件注册";
			this.TopMost = true;
			this.Load += new System.EventHandler(this.Register_Load);
			this.part1.ResumeLayout(false);
			this.part2.ResumeLayout(false);
			this.ResumeLayout(false);

		}
		#endregion
		private void bn_need_Click(object sender, System.EventArgs e)
		{
			part1.Visible =true;
			part2.Visible =false;
		}

		private void bn_register_Click(object sender, System.EventArgs e)
		{
			part1.Visible =false;
			part2.Visible =true;
		}

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

		private void bn_goHomePage_Click(object sender, System.EventArgs e)
		{
			Process.Start ("explorer.exe","http://www.tyuan.ik8.com");
		}

		private void Register_Load(object sender, System.EventArgs e)
		{
			this.TopMost =action.isTopMost ;
			string UserName="";
			string UserID="";
			action.GetRegisterInfo (ref UserName,ref UserID );
			if(UserName!=null && UserName.Length >0)
			{
				this.tb_user.Text  =UserName;
				this.tb_key.Text =UserID;
				this.bn_GetUserID.Enabled =false;
			}
		}

		private void bn_GetUserID_Click(object sender, System.EventArgs e)
		{
			if(this.tb_user.Text.Length >0)
			{
				this.tb_key.Text =chkPassword.EncryptID (this.tb_user .Text );
				action.SetRegisterInfo (this.tb_user.Text ,this.tb_key.Text);
				this.bn_GetUserID .Enabled =false;
			}
		}

		private void tb_code1_TextChanged(object sender, System.EventArgs e)
		{
			TextBox tb=(TextBox)sender;
			if(tb.Text.Length >=5)
			{
				tb.Text =tb.Text .Substring (0,5);
				SendKeys.Send ("{tab}");
			}
		}

		private void cn_check_Click(object sender, System.EventArgs e)
		{
			if(this.tb_user.Text.Length >0 && this.tb_key.Text .Length >0)
			{
				string userID =chkPassword.EncryptID (this.tb_user .Text );
				if(userID==this.tb_key .Text)
				{
					string code=this.tb_code1.Text +"-"+this.tb_code2.Text +"-"+this.tb_code3.Text +"-"+this.tb_code4.Text ;
					if(code.Length ==23)
					{
						if(chkPassword.RegisterProduct (this.tb_user.Text ,this.tb_key.Text ,code))
						{
							MessageBox.Show ("注册成功。");
							action.RegisteredProduct (code,true);
							chkPassword.isRegistered =true;
						}
						else
						{
							MessageBox.Show ("注册失败,您的注册码不正确。");
						}
					}
					else
					{
						MessageBox.Show ("您的注册码未完全输入。");
					}
				}
				else
				{
					MessageBox.Show ("注册失败,您的用户ID:"+userID+"己过期。");
					this.bn_GetUserID .Enabled =true;
				}
			}
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -