📄 dalist.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace Eboer.MIS.MF.WinForm.DataAccount
{
/// <summary>
/// DAList 的摘要说明。
/// </summary>
public class DAList : System.Windows.Forms.Form
{
private System.Windows.Forms.ListView list;
private System.Windows.Forms.ColumnHeader daName;
private System.Windows.Forms.ColumnHeader dbPath;
private System.Windows.Forms.ColumnHeader buildDate;
private System.Windows.Forms.ColumnHeader manSign;
private System.Windows.Forms.ImageList imageList;
private System.Windows.Forms.ToolBarButton newFile;
private System.Windows.Forms.ToolBarButton saveFile;
private System.Windows.Forms.ToolBarButton closeWin;
private System.Windows.Forms.ToolBar toolBar;
private System.ComponentModel.IContainer components;
public DAList()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/// <summary>
/// 设置标题栏
/// </summary>
/// <param name="text"></param>
public string SetText{
set{this.Text = value;}
}
/// <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.components = new System.ComponentModel.Container();
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(DAList));
this.toolBar = new System.Windows.Forms.ToolBar();
this.list = new System.Windows.Forms.ListView();
this.daName = new System.Windows.Forms.ColumnHeader();
this.dbPath = new System.Windows.Forms.ColumnHeader();
this.buildDate = new System.Windows.Forms.ColumnHeader();
this.manSign = new System.Windows.Forms.ColumnHeader();
this.imageList = new System.Windows.Forms.ImageList(this.components);
this.newFile = new System.Windows.Forms.ToolBarButton();
this.saveFile = new System.Windows.Forms.ToolBarButton();
this.closeWin = new System.Windows.Forms.ToolBarButton();
this.SuspendLayout();
//
// toolBar
//
this.toolBar.AllowDrop = true;
this.toolBar.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
this.saveFile,
this.newFile,
this.closeWin});
this.toolBar.DropDownArrows = true;
this.toolBar.ImageList = this.imageList;
this.toolBar.Location = new System.Drawing.Point(0, 0);
this.toolBar.Name = "toolBar";
this.toolBar.ShowToolTips = true;
this.toolBar.Size = new System.Drawing.Size(570, 57);
this.toolBar.TabIndex = 0;
this.toolBar.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.toolBar_ButtonClick);
//
// list
//
this.list.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.daName,
this.dbPath,
this.buildDate,
this.manSign});
this.list.Dock = System.Windows.Forms.DockStyle.Fill;
this.list.Location = new System.Drawing.Point(0, 57);
this.list.Name = "list";
this.list.Size = new System.Drawing.Size(570, 238);
this.list.TabIndex = 1;
this.list.View = System.Windows.Forms.View.Details;
//
// daName
//
this.daName.Text = "帐套名称";
this.daName.Width = 100;
//
// dbPath
//
this.dbPath.Text = "数据库路径";
this.dbPath.Width = 180;
//
// buildDate
//
this.buildDate.Text = "创建日期";
this.buildDate.Width = 100;
//
// manSign
//
this.manSign.Text = "管理员";
this.manSign.Width = 100;
//
// imageList
//
this.imageList.ImageSize = new System.Drawing.Size(32, 32);
this.imageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList.ImageStream")));
this.imageList.TransparentColor = System.Drawing.Color.Transparent;
//
// newFile
//
this.newFile.ImageIndex = 0;
this.newFile.Text = "新建";
//
// saveFile
//
this.saveFile.ImageIndex = 1;
this.saveFile.Text = "保存";
//
// closeWin
//
this.closeWin.ImageIndex = 2;
this.closeWin.Text = "关闭";
//
// DAList
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(570, 295);
this.Controls.Add(this.list);
this.Controls.Add(this.toolBar);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "DAList";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "帐套列表";
this.ResumeLayout(false);
}
#endregion
/// <summary>
/// 点击工具条相应的按钮时执行不同的命令
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void toolBar_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e) {
string comName = e.Button.Text;
if(comName == "新建"){
EditDA eda = new EditDA();
eda.MdiParent = this.MdiParent;
eda.Show();
}else if(comName == "关闭"){
this.Close();
}else if(comName == "保存"){
//保存列表到
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -