📄 副本 login.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace gowk.forms
{
/// <summary>
/// Form1 的摘要说明。
/// </summary>
public class Login :gowk.controls.GPanel
{
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private gowk.controls.GComboBox gComboBox1;
private gowk.controls.GTextBox gTextBox1;
private gowk.controls.GButton gButton1;
private System.Windows.Forms.LinkLabel linkLabel2;
private System.Windows.Forms.Label label3;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public LoginPanel LoginPanel;
public Login()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
this.gButton1.Click+=new EventHandler(gButton1_Click);
this.gComboBox1.Text="gowhcy@jabber.org";
this.gTextBox1.Text="waxmgp541";
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.gComboBox1 = new gowk.controls.GComboBox();
this.gTextBox1 = new gowk.controls.GTextBox();
this.gButton1 = new gowk.controls.GButton();
this.linkLabel2 = new System.Windows.Forms.LinkLabel();
this.label3 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// label1
//
this.label1.Location = new System.Drawing.Point(8, 48);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(48, 23);
this.label1.TabIndex = 2;
this.label1.Text = "用户名";
//
// label2
//
this.label2.Location = new System.Drawing.Point(8, 80);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(48, 14);
this.label2.TabIndex = 3;
this.label2.Text = "密码";
//
// gComboBox1
//
this.gComboBox1.BackColor = System.Drawing.SystemColors.Window;
this.gComboBox1.DockPadding.All = 3;
this.gComboBox1.GBorderStyle = gowk.controls.GBorderStyle.Solid;
this.gComboBox1.IsRound = false;
this.gComboBox1.Location = new System.Drawing.Point(56, 40);
this.gComboBox1.MaxDropDownItems = 5;
this.gComboBox1.Name = "gComboBox1";
this.gComboBox1.SelectedIndex = -1;
this.gComboBox1.SelectedItem = null;
this.gComboBox1.Size = new System.Drawing.Size(100, 24);
this.gComboBox1.TabIndex = 4;
//
// gTextBox1
//
this.gTextBox1.BackColor = System.Drawing.SystemColors.Window;
this.gTextBox1.DockPadding.All = 3;
this.gTextBox1.GBorderStyle = gowk.controls.GBorderStyle.Solid;
this.gTextBox1.IsRound = false;
this.gTextBox1.Location = new System.Drawing.Point(56, 72);
this.gTextBox1.Name = "gTextBox1";
this.gTextBox1.Size = new System.Drawing.Size(100, 24);
this.gTextBox1.TabIndex = 5;
//
// gButton1
//
this.gButton1.GBorderStyle = gowk.controls.GBorderStyle.Solid;
this.gButton1.IsRound = true;
this.gButton1.Location = new System.Drawing.Point(8, 104);
this.gButton1.Name = "gButton1";
this.gButton1.Size = new System.Drawing.Size(72, 24);
this.gButton1.TabIndex = 6;
//
// linkLabel2
//
this.linkLabel2.ActiveLinkColor = System.Drawing.Color.White;
this.linkLabel2.BackColor = System.Drawing.Color.Transparent;
this.linkLabel2.LinkColor = System.Drawing.Color.FromArgb(((System.Byte)(238)), ((System.Byte)(238)), ((System.Byte)(238)));
this.linkLabel2.Location = new System.Drawing.Point(120, 112);
this.linkLabel2.Name = "linkLabel2";
this.linkLabel2.Size = new System.Drawing.Size(40, 16);
this.linkLabel2.TabIndex = 8;
this.linkLabel2.TabStop = true;
this.linkLabel2.Text = "高级";
this.linkLabel2.VisitedLinkColor = System.Drawing.Color.FromArgb(((System.Byte)(238)), ((System.Byte)(238)), ((System.Byte)(238)));
//
// label3
//
this.label3.Location = new System.Drawing.Point(8, 16);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(100, 16);
this.label3.TabIndex = 9;
this.label3.Text = "用户登陆";
//
// Login
//
this.BackColor = System.Drawing.SystemColors.Control;
this.Controls.Add(this.label3);
this.Controls.Add(this.linkLabel2);
this.Controls.Add(this.gButton1);
this.Controls.Add(this.gTextBox1);
this.Controls.Add(this.gComboBox1);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Name = "Login";
this.Size = new System.Drawing.Size(168, 144);
this.ResumeLayout(false);
}
#endregion
private void linkLabel1_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
{
}
private void gButton1_Click(object sender, EventArgs e)
{
System.Diagnostics.Debug.Assert(this.LoginPanel!=null);
try
{
this.LoginPanel.InvokeLoginValidate(this.gComboBox1.Text,this.gTextBox1.Text);
this.LoginPanel.InvokeLoginEvent(this.gComboBox1.Text,this.gTextBox1.Text);
}
catch(System.Exception ex)
{
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -