📄 registform.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using gowk.core;
using gowk.core.packets;
namespace gowk.forms
{
/// <summary>
/// RegistForm 的摘要说明。
/// </summary>
public class RegistForm : gowk.controls.GForm
{
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
gowk.core.JabberClient jc;
private gowk.controls.GButton btnOK;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label5;
private gowk.controls.GTextBox txtUser;
private gowk.controls.GTextBox txtPass;
private gowk.controls.GTextBox txtPass2;
private gowk.controls.GTextBox txtEmail;
private System.Windows.Forms.PictureBox pictureBox1;
private gowk.controls.GButton btncancel;
private System.Windows.Forms.ErrorProvider errorProvider1;
private System.Windows.Forms.Label label7;
private gowk.controls.GComboBox cmbserver;
private System.Windows.Forms.Label lblMessage;
gowk.core.managers.RegistrationManager rm;
public RegistForm()
{
jc=new JabberClient();
jc.Control=this;
jc.Jid=new Jid();
// jc.Jid.Server="jabber.org";
/* jc.Proxy=new gowk.net.Proxy();
jc.Proxy.Port=555;
jc.Proxy.Host="192.168.0.1";*/
rm=new gowk.core.managers.RegistrationManager(jc);
InitializeComponent();
}
#region
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(this.jc.State!=State.Disconnected)
{
try
{
this.jc.Disconnect();
}
catch(System.Exception ex)
{
gowk.utility.Diagnostics.Debug.Write(ex);
}
}
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(RegistForm));
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.btnOK = new gowk.controls.GButton();
this.label1 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.txtUser = new gowk.controls.GTextBox();
this.txtPass = new gowk.controls.GTextBox();
this.txtPass2 = new gowk.controls.GTextBox();
this.txtEmail = new gowk.controls.GTextBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.btncancel = new gowk.controls.GButton();
this.lblMessage = new System.Windows.Forms.Label();
this.errorProvider1 = new System.Windows.Forms.ErrorProvider();
this.cmbserver = new gowk.controls.GComboBox();
this.label7 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// label2
//
this.label2.Anchor = System.Windows.Forms.AnchorStyles.None;
this.label2.BackColor = System.Drawing.Color.Transparent;
this.label2.Location = new System.Drawing.Point(208, 56);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(72, 23);
this.label2.TabIndex = 2;
this.label2.Text = "用户名";
//
// label3
//
this.label3.Anchor = System.Windows.Forms.AnchorStyles.None;
this.label3.BackColor = System.Drawing.Color.Transparent;
this.label3.Location = new System.Drawing.Point(208, 104);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(72, 23);
this.label3.TabIndex = 4;
this.label3.Text = "密码";
//
// label4
//
this.label4.Anchor = System.Windows.Forms.AnchorStyles.None;
this.label4.BackColor = System.Drawing.Color.Transparent;
this.label4.Location = new System.Drawing.Point(208, 152);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(72, 23);
this.label4.TabIndex = 6;
this.label4.Text = "邮箱";
//
// btnOK
//
this.btnOK.Anchor = System.Windows.Forms.AnchorStyles.None;
this.btnOK.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(128)), ((System.Byte)(0)));
this.btnOK.GBorderStyle = gowk.controls.GBorderStyle.Solid;
this.btnOK.IsRound = true;
this.btnOK.Location = new System.Drawing.Point(200, 176);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(60, 20);
this.btnOK.TabIndex = 7;
this.btnOK.Click += new System.EventHandler(this.gButton1_Click);
//
// label1
//
this.label1.Anchor = System.Windows.Forms.AnchorStyles.None;
this.label1.BackColor = System.Drawing.Color.Transparent;
this.label1.Location = new System.Drawing.Point(208, 128);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(72, 23);
this.label1.TabIndex = 9;
this.label1.Text = "校验";
//
// label5
//
this.label5.Anchor = System.Windows.Forms.AnchorStyles.None;
this.label5.BackColor = System.Drawing.Color.Transparent;
this.label5.Location = new System.Drawing.Point(176, 16);
this.label5.Name = "label5";
this.label5.TabIndex = 10;
this.label5.Text = "用户注册";
//
// txtUser
//
this.txtUser.Anchor = System.Windows.Forms.AnchorStyles.None;
this.txtUser.BackColor = System.Drawing.SystemColors.Window;
this.txtUser.DockPadding.All = 3;
this.txtUser.GBorderStyle = gowk.controls.GBorderStyle.Solid;
this.txtUser.IsRound = true;
this.txtUser.Location = new System.Drawing.Point(256, 48);
this.txtUser.Name = "txtUser";
this.txtUser.PasswordChar = '\0';
this.txtUser.Size = new System.Drawing.Size(80, 22);
this.txtUser.TabIndex = 11;
this.txtUser.Validated += new System.EventHandler(this.txtUser_Validated);
//
// txtPass
//
this.txtPass.Anchor = System.Windows.Forms.AnchorStyles.None;
this.txtPass.BackColor = System.Drawing.SystemColors.Window;
this.txtPass.DockPadding.All = 3;
this.txtPass.GBorderStyle = gowk.controls.GBorderStyle.Solid;
this.txtPass.IsRound = true;
this.txtPass.Location = new System.Drawing.Point(256, 96);
this.txtPass.Name = "txtPass";
this.txtPass.PasswordChar = '*';
this.txtPass.Size = new System.Drawing.Size(80, 22);
this.txtPass.TabIndex = 12;
this.txtPass.Validated += new System.EventHandler(this.txtPass_Validated);
//
// txtPass2
//
this.txtPass2.Anchor = System.Windows.Forms.AnchorStyles.None;
this.txtPass2.BackColor = System.Drawing.SystemColors.Window;
this.txtPass2.DockPadding.All = 3;
this.txtPass2.GBorderStyle = gowk.controls.GBorderStyle.Solid;
this.txtPass2.IsRound = true;
this.txtPass2.Location = new System.Drawing.Point(256, 120);
this.txtPass2.Name = "txtPass2";
this.txtPass2.PasswordChar = '*';
this.txtPass2.Size = new System.Drawing.Size(80, 22);
this.txtPass2.TabIndex = 13;
this.txtPass2.Validated += new System.EventHandler(this.txtPass2_Validated);
//
// txtEmail
//
this.txtEmail.Anchor = System.Windows.Forms.AnchorStyles.None;
this.txtEmail.BackColor = System.Drawing.SystemColors.Window;
this.txtEmail.DockPadding.All = 3;
this.txtEmail.GBorderStyle = gowk.controls.GBorderStyle.Solid;
this.txtEmail.IsRound = true;
this.txtEmail.Location = new System.Drawing.Point(256, 144);
this.txtEmail.Name = "txtEmail";
this.txtEmail.PasswordChar = '\0';
this.txtEmail.Size = new System.Drawing.Size(80, 22);
this.txtEmail.TabIndex = 14;
//
// pictureBox1
//
this.pictureBox1.Anchor = System.Windows.Forms.AnchorStyles.None;
this.pictureBox1.BackColor = System.Drawing.Color.Transparent;
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(32, 24);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(100, 88);
this.pictureBox1.TabIndex = 15;
this.pictureBox1.TabStop = false;
//
// btncancel
//
this.btncancel.Anchor = System.Windows.Forms.AnchorStyles.None;
this.btncancel.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(128)), ((System.Byte)(0)));
this.btncancel.GBorderStyle = gowk.controls.GBorderStyle.Solid;
this.btncancel.IsRound = true;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -