⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmtrain.cs

📁 列车时刻查询Visual Studio 2005 + sql2005
💻 CS
📖 第 1 页 / 共 2 页
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace train
{
	/// <summary>
	/// Form1 的摘要说明。
	/// </summary>
	public class frmMain : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Label lblbeginstation;
		private System.Windows.Forms.Label lblmidstation;
		private System.Windows.Forms.Label lblfinalstation;
		private System.Windows.Forms.Label lbltrainnum;
		private System.Windows.Forms.TextBox txtbeginstation;
		private System.Windows.Forms.TextBox txtfinalstation;
		private System.Windows.Forms.TextBox txttrainnum;
		private System.Windows.Forms.Button btnquery1;
		private System.Windows.Forms.Button btnquery2;
		private System.Windows.Forms.Panel panel1;
		public System.Windows.Forms.TabControl tabdisplay;
		private System.Windows.Forms.TabPage tabmap;
		private System.Windows.Forms.TabPage tabtrainresult;
		private System.Windows.Forms.TabPage tabtraindetails;
		public System.Windows.Forms.DataGrid dgtrainresult;
		public System.Windows.Forms.DataGrid dgtraindetails;
		private System.Windows.Forms.Label lblwlmq;
		private System.Windows.Forms.Label lblhm;
		private System.Windows.Forms.Label lblgel;
		private System.Windows.Forms.Label lblym;
		private System.Windows.Forms.Label lblxl;
		private System.Windows.Forms.Label lbllz;
		private System.Windows.Forms.Label lblxa;
		private System.Windows.Forms.Label lblcd;
		private System.Windows.Forms.Label lblkm;
		private System.Windows.Forms.Label lbllogo;
		private ScheduleSystem schedulesystem;
		private DataGridPrinter printer;
		public System.Windows.Forms.Button btnprint;
		public System.Windows.Forms.ComboBox cboMdiStation;
		public System.Windows.Forms.Button btnexport;
		private ExportData export;
		public System.Windows.Forms.Button btnexportxml;
		private System.Windows.Forms.Button btnImportData;
		/// <summary>
		/// 必需的设计器变量。
		/// </summary>
		private System.ComponentModel.Container components = null;

		public frmMain()
		{
			//
			// Windows 窗体设计器支持所必需的
			//
			Application.EnableVisualStyles();
			InitializeComponent();
			schedulesystem=new ScheduleSystem(this);
			export=new ExportData();
			//
			// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
			//
		}

		/// <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()
		{
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(frmMain));
			this.lblbeginstation = new System.Windows.Forms.Label();
			this.lblmidstation = new System.Windows.Forms.Label();
			this.lblfinalstation = new System.Windows.Forms.Label();
			this.txtbeginstation = new System.Windows.Forms.TextBox();
			this.txtfinalstation = new System.Windows.Forms.TextBox();
			this.cboMdiStation = new System.Windows.Forms.ComboBox();
			this.txttrainnum = new System.Windows.Forms.TextBox();
			this.lbltrainnum = new System.Windows.Forms.Label();
			this.btnquery1 = new System.Windows.Forms.Button();
			this.btnquery2 = new System.Windows.Forms.Button();
			this.panel1 = new System.Windows.Forms.Panel();
			this.tabdisplay = new System.Windows.Forms.TabControl();
			this.tabmap = new System.Windows.Forms.TabPage();
			this.lbllogo = new System.Windows.Forms.Label();
			this.lbllz = new System.Windows.Forms.Label();
			this.lblkm = new System.Windows.Forms.Label();
			this.lblcd = new System.Windows.Forms.Label();
			this.lblxa = new System.Windows.Forms.Label();
			this.lblxl = new System.Windows.Forms.Label();
			this.lblym = new System.Windows.Forms.Label();
			this.lblgel = new System.Windows.Forms.Label();
			this.lblhm = new System.Windows.Forms.Label();
			this.lblwlmq = new System.Windows.Forms.Label();
			this.tabtrainresult = new System.Windows.Forms.TabPage();
			this.dgtrainresult = new System.Windows.Forms.DataGrid();
			this.tabtraindetails = new System.Windows.Forms.TabPage();
			this.dgtraindetails = new System.Windows.Forms.DataGrid();
			this.btnprint = new System.Windows.Forms.Button();
			this.btnexport = new System.Windows.Forms.Button();
			this.btnexportxml = new System.Windows.Forms.Button();
			this.btnImportData = new System.Windows.Forms.Button();
			this.panel1.SuspendLayout();
			this.tabdisplay.SuspendLayout();
			this.tabmap.SuspendLayout();
			this.tabtrainresult.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.dgtrainresult)).BeginInit();
			this.tabtraindetails.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.dgtraindetails)).BeginInit();
			this.SuspendLayout();
			// 
			// lblbeginstation
			// 
			this.lblbeginstation.Location = new System.Drawing.Point(8, 16);
			this.lblbeginstation.Name = "lblbeginstation";
			this.lblbeginstation.Size = new System.Drawing.Size(56, 16);
			this.lblbeginstation.TabIndex = 0;
			this.lblbeginstation.Text = "起始站";
			// 
			// lblmidstation
			// 
			this.lblmidstation.Location = new System.Drawing.Point(112, 16);
			this.lblmidstation.Name = "lblmidstation";
			this.lblmidstation.Size = new System.Drawing.Size(56, 16);
			this.lblmidstation.TabIndex = 1;
			this.lblmidstation.Text = "中转站";
			// 
			// lblfinalstation
			// 
			this.lblfinalstation.Location = new System.Drawing.Point(216, 16);
			this.lblfinalstation.Name = "lblfinalstation";
			this.lblfinalstation.Size = new System.Drawing.Size(56, 16);
			this.lblfinalstation.TabIndex = 2;
			this.lblfinalstation.Text = "终点站";
			// 
			// txtbeginstation
			// 
			this.txtbeginstation.Location = new System.Drawing.Point(8, 40);
			this.txtbeginstation.Name = "txtbeginstation";
			this.txtbeginstation.TabIndex = 3;
			this.txtbeginstation.Text = "";
			this.txtbeginstation.Enter += new System.EventHandler(this.txtbeginstation_Enter);
			// 
			// txtfinalstation
			// 
			this.txtfinalstation.Location = new System.Drawing.Point(216, 40);
			this.txtfinalstation.Name = "txtfinalstation";
			this.txtfinalstation.TabIndex = 4;
			this.txtfinalstation.Text = "";
			this.txtfinalstation.Enter += new System.EventHandler(this.txtbeginstation_Enter);
			// 
			// cboMdiStation
			// 
			this.cboMdiStation.Location = new System.Drawing.Point(112, 40);
			this.cboMdiStation.Name = "cboMdiStation";
			this.cboMdiStation.Size = new System.Drawing.Size(100, 20);
			this.cboMdiStation.TabIndex = 5;
			this.cboMdiStation.SelectionChangeCommitted += new System.EventHandler(this.cboMdiStation_SelectionChangeCommitted);
			// 
			// txttrainnum
			// 
			this.txttrainnum.Location = new System.Drawing.Point(400, 40);
			this.txttrainnum.Name = "txttrainnum";
			this.txttrainnum.Size = new System.Drawing.Size(56, 21);
			this.txttrainnum.TabIndex = 6;
			this.txttrainnum.Text = "";
			this.txttrainnum.Enter += new System.EventHandler(this.txttrainnum_Enter);
			// 
			// lbltrainnum
			// 
			this.lbltrainnum.Location = new System.Drawing.Point(392, 16);
			this.lbltrainnum.Name = "lbltrainnum";
			this.lbltrainnum.Size = new System.Drawing.Size(56, 16);
			this.lbltrainnum.TabIndex = 7;
			this.lbltrainnum.Text = "车次";
			// 
			// btnquery1
			// 
			this.btnquery1.FlatStyle = System.Windows.Forms.FlatStyle.System;
			this.btnquery1.Location = new System.Drawing.Point(320, 40);
			this.btnquery1.Name = "btnquery1";
			this.btnquery1.TabIndex = 8;
			this.btnquery1.Text = "确定";
			this.btnquery1.Click += new System.EventHandler(this.btnquery1_Click);
			// 
			// btnquery2
			// 
			this.btnquery2.FlatStyle = System.Windows.Forms.FlatStyle.System;
			this.btnquery2.Location = new System.Drawing.Point(464, 40);
			this.btnquery2.Name = "btnquery2";
			this.btnquery2.TabIndex = 9;
			this.btnquery2.Text = "确定";
			this.btnquery2.Click += new System.EventHandler(this.btnquery2_Click);
			// 
			// panel1
			// 
			this.panel1.Controls.Add(this.tabdisplay);
			this.panel1.Location = new System.Drawing.Point(0, 96);
			this.panel1.Name = "panel1";
			this.panel1.Size = new System.Drawing.Size(728, 416);
			this.panel1.TabIndex = 10;
			// 
			// tabdisplay
			// 
			this.tabdisplay.Controls.Add(this.tabmap);
			this.tabdisplay.Controls.Add(this.tabtrainresult);
			this.tabdisplay.Controls.Add(this.tabtraindetails);
			this.tabdisplay.Dock = System.Windows.Forms.DockStyle.Fill;
			this.tabdisplay.Location = new System.Drawing.Point(0, 0);
			this.tabdisplay.Name = "tabdisplay";
			this.tabdisplay.SelectedIndex = 0;
			this.tabdisplay.Size = new System.Drawing.Size(728, 416);
			this.tabdisplay.TabIndex = 0;
			this.tabdisplay.SelectedIndexChanged += new System.EventHandler(this.tabdisplay_SelectedIndexChanged);
			// 
			// tabmap
			// 
			this.tabmap.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("tabmap.BackgroundImage")));
			this.tabmap.Controls.Add(this.lbllogo);
			this.tabmap.Controls.Add(this.lbllz);
			this.tabmap.Controls.Add(this.lblkm);
			this.tabmap.Controls.Add(this.lblcd);
			this.tabmap.Controls.Add(this.lblxa);
			this.tabmap.Controls.Add(this.lblxl);
			this.tabmap.Controls.Add(this.lblym);
			this.tabmap.Controls.Add(this.lblgel);
			this.tabmap.Controls.Add(this.lblhm);
			this.tabmap.Controls.Add(this.lblwlmq);
			this.tabmap.Location = new System.Drawing.Point(4, 21);
			this.tabmap.Name = "tabmap";
			this.tabmap.Size = new System.Drawing.Size(720, 391);
			this.tabmap.TabIndex = 0;
			this.tabmap.Text = "中国铁路干线图";
			// 
			// lbllogo
			// 
			this.lbllogo.BackColor = System.Drawing.Color.Transparent;
			this.lbllogo.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.lbllogo.ForeColor = System.Drawing.SystemColors.ActiveCaption;
			this.lbllogo.Location = new System.Drawing.Point(584, 72);
			this.lbllogo.Name = "lbllogo";
			this.lbllogo.Size = new System.Drawing.Size(40, 304);
			this.lbllogo.TabIndex = 31;
			this.lbllogo.Text = "列车时刻查询系统";
			// 
			// lbllz
			// 
			this.lbllz.BackColor = System.Drawing.Color.Transparent;
			this.lbllz.Location = new System.Drawing.Point(296, 200);
			this.lbllz.Name = "lbllz";
			this.lbllz.Size = new System.Drawing.Size(24, 24);
			this.lbllz.TabIndex = 30;
			this.lbllz.Tag = "兰州";
			this.lbllz.Click += new System.EventHandler(this.lblwlmq_Click);
			// 
			// lblkm
			// 
			this.lblkm.BackColor = System.Drawing.Color.Transparent;
			this.lblkm.Location = new System.Drawing.Point(280, 328);
			this.lblkm.Name = "lblkm";
			this.lblkm.Size = new System.Drawing.Size(24, 24);
			this.lblkm.TabIndex = 29;
			this.lblkm.Tag = "昆明";
			this.lblkm.Click += new System.EventHandler(this.lblwlmq_Click);
			// 
			// lblcd
			// 
			this.lblcd.BackColor = System.Drawing.Color.Transparent;
			this.lblcd.Location = new System.Drawing.Point(296, 256);
			this.lblcd.Name = "lblcd";
			this.lblcd.Size = new System.Drawing.Size(24, 24);
			this.lblcd.TabIndex = 17;
			this.lblcd.Tag = "成都";
			this.lblcd.Click += new System.EventHandler(this.lblwlmq_Click);
			// 
			// lblxa
			// 
			this.lblxa.BackColor = System.Drawing.Color.Transparent;
			this.lblxa.Location = new System.Drawing.Point(320, 216);
			this.lblxa.Name = "lblxa";
			this.lblxa.Size = new System.Drawing.Size(24, 24);
			this.lblxa.TabIndex = 16;
			this.lblxa.Tag = "西安";
			this.lblxa.Click += new System.EventHandler(this.lblwlmq_Click);
			// 
			// lblxl
			// 
			this.lblxl.BackColor = System.Drawing.Color.Transparent;
			this.lblxl.Location = new System.Drawing.Point(272, 192);
			this.lblxl.Name = "lblxl";
			this.lblxl.Size = new System.Drawing.Size(24, 24);
			this.lblxl.TabIndex = 15;
			this.lblxl.Tag = "西宁";
			this.lblxl.Click += new System.EventHandler(this.lblwlmq_Click);
			// 
			// lblym
			// 
			this.lblym.BackColor = System.Drawing.Color.Transparent;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -