?? listboxagent.cs
字號:
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;
namespace AssetManagement
{
/// <summary>
/// listBoxAgent 的摘要說明。
/// </summary>
public class listBoxAgent : System.Windows.Forms.UserControl
{
public delegate void ButtonClickHandlerAg();
public event ButtonClickHandlerAg ButtonClickAg1;//定義事件,點擊此用戶窗體中的label,會觸發事件;
public event ButtonClickHandlerAg ButtonClickAg2;
public event ButtonClickHandlerAg ButtonClickAg3;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.LinkLabel linkLabel2;
private System.Windows.Forms.LinkLabel linkLabel3;
private Button button1;
/// <summary>
/// 必需的設計器變量。
/// </summary>
private System.ComponentModel.Container components = null;
public listBoxAgent()
{
// 該調用是 Windows.Forms 窗體設計器所必需的。
InitializeComponent();
// TODO: 在 InitializeComponent 調用后添加任何初始化
}
/// <summary>
/// 清理所有正在使用的資源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region 組件設計器生成的代碼
/// <summary>
/// 設計器支持所需的方法 - 不要使用代碼編輯器
/// 修改此方法的內容。
/// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.linkLabel2 = new System.Windows.Forms.LinkLabel();
this.linkLabel3 = new System.Windows.Forms.LinkLabel();
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// label1
//
this.label1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(255)))));
this.label1.Font = new System.Drawing.Font("宋體", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.ForeColor = System.Drawing.Color.Aqua;
this.label1.Location = new System.Drawing.Point(0, 32);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(160, 32);
this.label1.TabIndex = 0;
this.label1.Text = "維護商詳細信息";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// linkLabel2
//
this.linkLabel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(128)))));
this.linkLabel2.Font = new System.Drawing.Font("宋體", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel2.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline;
this.linkLabel2.LinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(255)))));
this.linkLabel2.Location = new System.Drawing.Point(24, 136);
this.linkLabel2.Name = "linkLabel2";
this.linkLabel2.Size = new System.Drawing.Size(112, 23);
this.linkLabel2.TabIndex = 2;
this.linkLabel2.TabStop = true;
this.linkLabel2.Text = "尚未維護";
this.linkLabel2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.linkLabel2.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel2_LinkClicked);
//
// linkLabel3
//
this.linkLabel3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(128)))));
this.linkLabel3.Font = new System.Drawing.Font("宋體", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel3.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline;
this.linkLabel3.Location = new System.Drawing.Point(24, 192);
this.linkLabel3.Name = "linkLabel3";
this.linkLabel3.Size = new System.Drawing.Size(112, 23);
this.linkLabel3.TabIndex = 3;
this.linkLabel3.TabStop = true;
this.linkLabel3.Text = "按維護類別";
this.linkLabel3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.linkLabel3.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel3_LinkClicked);
//
// button1
//
this.button1.Font = new System.Drawing.Font("宋體", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button1.Location = new System.Drawing.Point(27, 96);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(109, 23);
this.button1.TabIndex = 4;
this.button1.Text = "按維護量";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// listBoxAgent
//
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
this.Controls.Add(this.button1);
this.Controls.Add(this.linkLabel3);
this.Controls.Add(this.linkLabel2);
this.Controls.Add(this.label1);
this.Name = "listBoxAgent";
this.Size = new System.Drawing.Size(192, 408);
this.ResumeLayout(false);
}
#endregion
private void linkLabel1_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
{
if (ButtonClickAg1 != null)
ButtonClickAg1();
}
private void linkLabel2_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
{
if (ButtonClickAg2 != null)
ButtonClickAg2();
}
private void linkLabel3_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
{
if (ButtonClickAg3 != null)
ButtonClickAg3();
}
private void button1_Click(object sender, EventArgs e)
{
if (ButtonClickAg1 != null)
ButtonClickAg1();
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -