📄 kahaohistoryframe.cs
字号:
#region 命名空间
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;
#endregion
namespace WindowsApplication
{
public class KaHaoHistoryFrame : System.Windows.Forms.Form
{
#region 控件声明...
private System.Windows.Forms.ToolBar KaHaoTool;
private System.Windows.Forms.StatusBar KaHaoStatus;
private System.Windows.Forms.DataGrid dataGrid;
private System.Windows.Forms.ImageList imageList;
private System.Windows.Forms.ToolBarButton toolLast;
private System.Windows.Forms.ToolBarButton toolFirst;
private System.Windows.Forms.ToolBarButton toolNext;
private System.Windows.Forms.ToolBarButton toolEnd;
private System.Windows.Forms.ToolBarButton toolSearch;
private System.Windows.Forms.ToolBarButton toolResh;
private System.Windows.Forms.ToolBarButton toolExit;
private System.Windows.Forms.StatusBarPanel stID;
private System.Windows.Forms.StatusBarPanel stTime;
private System.Windows.Forms.StatusBarPanel stDate;
private System.Windows.Forms.StatusBarPanel stOperator;
private System.Windows.Forms.StatusBarPanel stStatus;
private System.Windows.Forms.Timer currentTimer;
private System.Windows.Forms.ToolBarButton toolDelete;
private System.ComponentModel.IContainer components;
#endregion
#region 数据库变量
private ConnectionData conn=new ConnectionData();
#endregion
#region 变量定义
string searchSql="";
private System.Windows.Forms.CurrencyManager cmOrder=null;
#endregion
#region 构造函数
public KaHaoHistoryFrame()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#endregion
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(KaHaoHistoryFrame));
this.KaHaoTool = new System.Windows.Forms.ToolBar();
this.toolLast = new System.Windows.Forms.ToolBarButton();
this.toolFirst = new System.Windows.Forms.ToolBarButton();
this.toolNext = new System.Windows.Forms.ToolBarButton();
this.toolEnd = new System.Windows.Forms.ToolBarButton();
this.toolSearch = new System.Windows.Forms.ToolBarButton();
this.toolResh = new System.Windows.Forms.ToolBarButton();
this.toolDelete = new System.Windows.Forms.ToolBarButton();
this.toolExit = new System.Windows.Forms.ToolBarButton();
this.imageList = new System.Windows.Forms.ImageList(this.components);
this.KaHaoStatus = new System.Windows.Forms.StatusBar();
this.stID = new System.Windows.Forms.StatusBarPanel();
this.stTime = new System.Windows.Forms.StatusBarPanel();
this.stDate = new System.Windows.Forms.StatusBarPanel();
this.stOperator = new System.Windows.Forms.StatusBarPanel();
this.stStatus = new System.Windows.Forms.StatusBarPanel();
this.dataGrid = new System.Windows.Forms.DataGrid();
this.currentTimer = new System.Windows.Forms.Timer(this.components);
((System.ComponentModel.ISupportInitialize)(this.stID)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.stTime)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.stDate)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.stOperator)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.stStatus)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dataGrid)).BeginInit();
this.SuspendLayout();
//
// KaHaoTool
//
this.KaHaoTool.Appearance = System.Windows.Forms.ToolBarAppearance.Flat;
this.KaHaoTool.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
this.toolLast,
this.toolFirst,
this.toolNext,
this.toolEnd,
this.toolSearch,
this.toolResh,
this.toolDelete,
this.toolExit});
this.KaHaoTool.ButtonSize = new System.Drawing.Size(30, 40);
this.KaHaoTool.Cursor = System.Windows.Forms.Cursors.Hand;
this.KaHaoTool.DropDownArrows = true;
this.KaHaoTool.ImageList = this.imageList;
this.KaHaoTool.Location = new System.Drawing.Point(0, 0);
this.KaHaoTool.Name = "KaHaoTool";
this.KaHaoTool.ShowToolTips = true;
this.KaHaoTool.Size = new System.Drawing.Size(770, 41);
this.KaHaoTool.TabIndex = 0;
this.KaHaoTool.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.KaHaoTool_ButtonClick);
//
// toolLast
//
this.toolLast.ImageIndex = 0;
this.toolLast.Text = "上一条记录";
//
// toolFirst
//
this.toolFirst.ImageIndex = 4;
this.toolFirst.Text = "首记录";
//
// toolNext
//
this.toolNext.ImageIndex = 1;
this.toolNext.Text = "下一条记录";
//
// toolEnd
//
this.toolEnd.ImageIndex = 5;
this.toolEnd.Text = "尾记录";
//
// toolSearch
//
this.toolSearch.ImageIndex = 6;
this.toolSearch.Text = "查询";
this.toolSearch.ToolTipText = "此处会出现小对话框";
//
// toolResh
//
this.toolResh.ImageIndex = 4;
this.toolResh.Text = "刷新";
this.toolResh.ToolTipText = "更新数据库时有效";
//
// toolDelete
//
this.toolDelete.ImageIndex = 5;
this.toolDelete.Text = "删除";
//
// toolExit
//
this.toolExit.ImageIndex = 3;
this.toolExit.Text = "退出";
//
// imageList
//
this.imageList.ImageSize = new System.Drawing.Size(16, 16);
this.imageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList.ImageStream")));
this.imageList.TransparentColor = System.Drawing.Color.Transparent;
//
// KaHaoStatus
//
this.KaHaoStatus.Cursor = System.Windows.Forms.Cursors.AppStarting;
this.KaHaoStatus.Location = new System.Drawing.Point(0, 391);
this.KaHaoStatus.Name = "KaHaoStatus";
this.KaHaoStatus.Panels.AddRange(new System.Windows.Forms.StatusBarPanel[] {
this.stID,
this.stTime,
this.stDate,
this.stOperator,
this.stStatus});
this.KaHaoStatus.ShowPanels = true;
this.KaHaoStatus.Size = new System.Drawing.Size(770, 32);
this.KaHaoStatus.TabIndex = 1;
//
// stID
//
this.stID.Icon = ((System.Drawing.Icon)(resources.GetObject("stID.Icon")));
this.stID.Text = "最大号:";
this.stID.Width = 150;
//
// stTime
//
this.stTime.Icon = ((System.Drawing.Icon)(resources.GetObject("stTime.Icon")));
this.stTime.Text = "时间:";
this.stTime.Width = 150;
//
// stDate
//
this.stDate.Icon = ((System.Drawing.Icon)(resources.GetObject("stDate.Icon")));
this.stDate.Text = "日期:";
this.stDate.Width = 150;
//
// stOperator
//
this.stOperator.Icon = ((System.Drawing.Icon)(resources.GetObject("stOperator.Icon")));
this.stOperator.Text = "操作员:";
this.stOperator.Width = 150;
//
// stStatus
//
this.stStatus.Icon = ((System.Drawing.Icon)(resources.GetObject("stStatus.Icon")));
this.stStatus.Text = "状态:";
this.stStatus.Width = 150;
//
// dataGrid
//
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -