📄 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 + -