📄 systemmanagerform.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using Sun188.iSBus.Common;
using Sun188.iSBus.DataAccess;
namespace Sun188.iSBus.WinUI
{
/// <summary>
/// SystemManagerForm 的摘要说明。
/// </summary>
public class SystemManagerForm : System.Windows.Forms.Form
{
#region 控件定义===============================================
private System.Windows.Forms.ColumnHeader clStopName;
private System.Windows.Forms.ColumnHeader clStopDescription;
private System.Windows.Forms.Panel panel7;
private System.Windows.Forms.Panel plLeft;
private System.Windows.Forms.PictureBox pictureBox8;
private System.Windows.Forms.ImageList imageList2;
private System.Windows.Forms.Panel plTop;
private System.Windows.Forms.PictureBox btnClose;
private System.Windows.Forms.PictureBox btnMax;
private System.Windows.Forms.PictureBox btnMin;
private System.Windows.Forms.PictureBox pictureBox7;
private System.Windows.Forms.PictureBox pictureBox6;
private System.Windows.Forms.PictureBox pictureBox5;
private System.Windows.Forms.PictureBox pictureBox4;
private System.Windows.Forms.PictureBox pictureBox3;
private System.Windows.Forms.PictureBox pictureBox2;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Panel plBotton;
private System.Windows.Forms.PictureBox pictureBox12;
private System.Windows.Forms.PictureBox pictureBox11;
private System.Windows.Forms.PictureBox pictureBox10;
private System.Windows.Forms.Panel plRight;
private System.Windows.Forms.PictureBox pictureBox9;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.Panel panel4;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Timer tmClock;
private System.Windows.Forms.ImageList imageList3;
private System.Windows.Forms.StatusBar statusBar1;
private System.Windows.Forms.StatusBarPanel statusBarPanel1;
private System.Windows.Forms.StatusBarPanel statusBarPanel2;
private System.Windows.Forms.StatusBarPanel statusBarPanel3;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.TabPage tabPage3;
private System.Windows.Forms.TabPage tabPage4;
private System.Windows.Forms.ToolBar toolBar1;
private System.Windows.Forms.ToolBarButton tbtnHelp;
private System.Windows.Forms.ToolBarButton tbtnAbout;
private System.Windows.Forms.ToolBarButton tbtnClose;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.Label label18;
private System.Windows.Forms.Label label19;
private System.Windows.Forms.Label label23;
private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.Panel panel8;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.GroupBox groupBox5;
private System.Windows.Forms.TextBox txbProvinceDescription;
private System.Windows.Forms.TextBox txbProvinceName;
private System.Windows.Forms.Button btnDeleteProvince;
private System.Windows.Forms.Button btnModifyProvince;
private System.Windows.Forms.Button btnAddProvince;
private System.Windows.Forms.Button btnOkProvince;
private System.Windows.Forms.Button btnPrvProvince;
private System.Windows.Forms.Button btnFirstProvince;
private System.Windows.Forms.Button btnLastProvince;
private System.Windows.Forms.Button btnNextProvince;
private System.Windows.Forms.TextBox txbCityDescription;
private System.Windows.Forms.TextBox txbCityName;
private System.Windows.Forms.Button btnDeleteCity;
private System.Windows.Forms.Button btnModifyCity;
private System.Windows.Forms.Button btnAddNewCity;
private System.Windows.Forms.Button btnOkCity;
private System.Windows.Forms.Button btnLastCity;
private System.Windows.Forms.Button btnNextCity;
private System.Windows.Forms.Button btnPrvCity;
private System.Windows.Forms.Button btnFirstCity;
private System.Windows.Forms.TextBox txbStopDescription;
private System.Windows.Forms.TextBox txbStopName;
private System.Windows.Forms.Button btnDeleteStop;
private System.Windows.Forms.Button btnModifyStop;
private System.Windows.Forms.Button btnAddNewStop;
private System.Windows.Forms.Button btnOkStop;
private System.Windows.Forms.Button btnLastStop;
private System.Windows.Forms.Button btnNextStop;
private System.Windows.Forms.Button btnPrvStop;
private System.Windows.Forms.Button btnFirstStop;
private System.Windows.Forms.TreeView tvCity1;
private System.Windows.Forms.TreeView tvCity2;
private System.Windows.Forms.TreeView tvCity3;
private System.Windows.Forms.Button btnSave;
private System.Windows.Forms.ListBox lstBusList2;
private System.Windows.Forms.Button btnDeleteAll;
private System.Windows.Forms.Button btnDelete;
private System.Windows.Forms.Button btnAdd;
private System.Windows.Forms.Button btnAddAll;
private System.Windows.Forms.ListBox lstBusList1;
private System.ComponentModel.IContainer components;
private System.Windows.Forms.ListView lvProvince;
private System.Windows.Forms.TextBox txbProvince;
private System.Windows.Forms.ColumnHeader columnHeader1;
private System.Windows.Forms.ColumnHeader columnHeader2;
private System.Windows.Forms.ColumnHeader CityNameHeader;
private System.Windows.Forms.ColumnHeader CityDescriptionHeader;
private System.Windows.Forms.ListView lvCity;
private System.Windows.Forms.Panel panel6;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.Label label20;
private System.Windows.Forms.TextBox txbBusDescription;
private System.Windows.Forms.TextBox txbBusName;
private System.Windows.Forms.TextBox txbBusType;
private System.Windows.Forms.Button btnDeleteBus;
private System.Windows.Forms.Button btnModifyBus;
private System.Windows.Forms.Button btnAddNewBus;
private System.Windows.Forms.Button btnOkBus;
private System.Windows.Forms.Button btnLastBus;
private System.Windows.Forms.Button btnNextBus;
private System.Windows.Forms.Button btnPrvBus;
private System.Windows.Forms.Button btnFirstBus;
private System.Windows.Forms.ColumnHeader columnHeader3;
private System.Windows.Forms.ColumnHeader columnHeader4;
private System.Windows.Forms.ColumnHeader columnHeader5;
private System.Windows.Forms.ColumnHeader columnHeader6;
private System.Windows.Forms.ColumnHeader columnHeader7;
private System.Windows.Forms.Label lbStopInfo;
private System.Windows.Forms.ListView lvStopList;
private System.Windows.Forms.ListView lvBusList;
private System.Windows.Forms.Label lbBusInfo;
private System.Windows.Forms.TextBox txbEndStop;
private System.Windows.Forms.TextBox txbStartStop;
private System.Windows.Forms.ImageList imageList1;
private System.Windows.Forms.Timer timerHide;
#endregion
#region 字段定义===============================================
/// <summary>
/// 省市总的记录数
/// </summary>
private int provinceTotalRecordCount = 0;
/// <summary>
/// 当前省市记录指针
/// </summary>
private int provinceRecordIndex = 0;
/// <summary>
/// 省市ID
/// </summary>
private int provinceID;
/// <summary>
/// 省市操作类型(新增、修改、删除)
/// </summary>
private PublicEnum.ProcessType provinceProcessType;
/// <summary>
/// 省市DATASET
/// </summary>
private DataSet dsProvince;
/// <summary>
/// 相关省市下的城市总记录数
/// </summary>
private int cityTotalRecordCount = 0;
/// <summary>
/// 当前相关省市下的城市记录指针
/// </summary>
private int cityRecordIndex = 0;
/// <summary>
/// 当前CityID
/// </summary>
private int cityID;
/// <summary>
/// 城市操作类型(新增、修改、删除)
/// </summary>
private PublicEnum.ProcessType cityProcessType;
/// <summary>
/// 城市DATASET
/// </summary>
private DataSet dsCity;
/// <summary>
/// 当前汽车记录指针
/// </summary>
private int busRecordIndex = 0;
/// <summary>
/// 当前汽车总记录数
/// </summary>
private int busTotalRecord = 0;
/// <summary>
/// 当前汽车ID
/// </summary>
private int busID = 0;
/// <summary>
/// 汽车操作类型(新增、修改、删除)
/// </summary>
private PublicEnum.ProcessType busProcessType;
/// <summary>
/// 汽车DATASET
/// </summary>
private DataSet dsBus;
/// <summary>
/// 当前站点记录指针
/// </summary>
private int stopRecordIndex = 0;
/// <summary>
/// 当前站点总记录数
/// </summary>
private int stopTotalRecord = 0;
/// <summary>
/// 当前站点ID
/// </summary>
private int stopID = 0;
/// <summary>
/// 站点操作类型(新增、修改、删除)
/// </summary>
private PublicEnum.ProcessType stopProcessType;
/// <summary>
/// 站点DATASET
/// </summary>
private DataSet dsStop;
/// <summary>
/// 鼠标的位置
/// </summary>
private int xPos,yPos;
/// <summary>
/// 鼠标偏移坐标
/// </summary>
private Point m_pOffset;
/// <summary>
/// 窗体的位置
/// </summary>
private Point locationMain = new Point(300,250);
/// <summary>
/// 最小按钮图片
/// </summary>
private Bitmap btnMinBmp;
/// <summary>
/// 关闭按钮图片
/// </summary>
private Bitmap btnCloseBmp;
/// <summary>
/// 最小按钮是否是MouseOver事件
/// </summary>
private bool btnMinMouseOver = false;
/// <summary>
/// 最小按钮是否是MouseDown事件
/// </summary>
private bool btnMinMouseDown = false;
/// <summary>
/// 关闭按钮是否是MouseOver事件
/// </summary>
private bool btnCloseMouseOver = false;
/// <summary>
/// 关闭按钮是否是MouseDown事件
/// </summary>
private bool btnCloseMouseDown = false;
private DataSet dsStopInBus = new DataSet();
private DataRow[] drArray1;
private DataRow[] drArray2;
private ArrayList builderSql = new ArrayList();
//创建内存表dt1作为lstBusList1的数据源
private DataTable dt1 = new DataTable();
//创建内存表dt2作为lstBusList2的数据源
private DataTable dt2 = new DataTable();
//创建临时变量
private string name = "";
private int id = 0;
private double showForm = 0;
private double hideForm = 1;
private System.Windows.Forms.ListView lvBus;
private System.Windows.Forms.ColumnHeader columnHeader10;
private System.Windows.Forms.ColumnHeader columnHeader11;
private System.Windows.Forms.ColumnHeader columnHeader12;
private System.Windows.Forms.ColumnHeader columnHeader13;
private System.Windows.Forms.ColumnHeader columnHeader14;
private System.Windows.Forms.ListView lvStop;
private System.Windows.Forms.ColumnHeader columnHeader8;
private System.Windows.Forms.ColumnHeader columnHeader9;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.TextBox txbBusMemo;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.TextBox txbSearch;
private System.Windows.Forms.Button btnSearch;
private MainForm mainForm;
#endregion
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -