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

📄 mainview.cs

📁 火车订票系统 火车订票系统 火车订票系统
💻 CS
📖 第 1 页 / 共 5 页
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using Business_Logic;
using Model;
using System.IO;
using System.Drawing.Printing;

namespace Railroad_Trip
{
	/// <summary>
	/// MainView 的摘要说明。
	/// </summary>
	public class MainView : System.Windows.Forms.Form
	{
		#region  定义控件与变量
		private System.Windows.Forms.Panel panel1;
		private System.Windows.Forms.Panel panel2;
		private System.Windows.Forms.Panel panel3;
		public System.Windows.Forms.TabControl tabControl1;
		private System.Windows.Forms.TabPage tabPage1;
		private System.Windows.Forms.TabPage tabPage2;
		private System.Windows.Forms.TabPage tabPage3;
		private System.Windows.Forms.TabPage tabPage4;
		private System.Windows.Forms.Panel panel4;
		private System.Windows.Forms.Panel panel6;
		private System.Windows.Forms.Panel panel8;
		private System.Windows.Forms.Panel panel9;
		private System.Windows.Forms.Panel panel7;
		private System.Windows.Forms.Panel panel10;
		private System.Windows.Forms.Label lblXinjiang;
		private System.Windows.Forms.Label lblXizang;
		private System.Windows.Forms.Label lblQinghai;
		private System.Windows.Forms.Label lblNei;
		private System.Windows.Forms.Label lblGu;
		private System.Windows.Forms.Label lblMeng;
		private System.Windows.Forms.Label lblXinjiang2;
		private System.Windows.Forms.Label lblXinjiang3;
		private System.Windows.Forms.Label lblXizang1;
		private System.Windows.Forms.Label lblXizang2;
		private System.Windows.Forms.Label lblSichuan;
		private System.Windows.Forms.Label lblGansu;
		private System.Windows.Forms.Label lblLinxia;
		private System.Windows.Forms.Label lblHubei;
		private System.Windows.Forms.Label lblNeiMengGu;
		private System.Windows.Forms.Label lblSichuan2;
		private System.Windows.Forms.Label lblShanxi;
		private System.Windows.Forms.Label lblGuangxi;
		private System.Windows.Forms.Label lblYunlan;
		private System.Windows.Forms.Label lblGuangdong;
		private System.Windows.Forms.Label lblGuizhou;
		private System.Windows.Forms.Label lblChongqing;
		private System.Windows.Forms.Label lblHunan;
		private System.Windows.Forms.Label lblJiangxi;
		private System.Windows.Forms.Label lblFujian;
		private System.Windows.Forms.Label lblZhejiang;
		private System.Windows.Forms.Label lblSanxi;
		private System.Windows.Forms.Label lblBeijing;
		private System.Windows.Forms.Label lblAnhui;
		private System.Windows.Forms.Label lblHenam;
		private System.Windows.Forms.Label lblSandong;
		private System.Windows.Forms.Label lblHebei;
		private System.Windows.Forms.Label lblHeilong;
		private System.Windows.Forms.Label lblJiang;
		private System.Windows.Forms.Label lblJilin;
		private System.Windows.Forms.Label lblLiaonin;
		private System.Windows.Forms.Label lblTianjing;
		private System.Windows.Forms.Label lblJiangshu;
		private System.Windows.Forms.Label lblShanghai;
		private System.Windows.Forms.Label lblHainan;
		private System.Windows.Forms.Label lblTaiwan;
		private System.Windows.Forms.Label lblDWulumuqi;
		private System.Windows.Forms.Label lblDHami;
		private System.Windows.Forms.Label lblDLasa;
		private System.Windows.Forms.Label lblDGeerben;
		private System.Windows.Forms.Label lblDYumen;
		private System.Windows.Forms.Label lblDXiling;
		private System.Windows.Forms.Label lblDQiqihaer;
		private System.Windows.Forms.Label lblDHaerbing;
		private System.Windows.Forms.Label lblDChangchun;
		private System.Windows.Forms.Label lblDJilin;
		private System.Windows.Forms.Label lblDShenyang;
		private System.Windows.Forms.Label lblDChendou;
		private System.Windows.Forms.Label lblDKunming;
		private System.Windows.Forms.Label lblDNanling;
		private System.Windows.Forms.Label lblDTaibei;
		private System.Windows.Forms.Label lblDDalian;
		private System.Windows.Forms.Label lblDHainan;
		private System.Windows.Forms.Label lblDShenjiang;
		private System.Windows.Forms.Label lblDHongkong;
		private System.Windows.Forms.Label lblDShenzhen;
		private System.Windows.Forms.Label lblDGuangzhou;
		private System.Windows.Forms.Label lblDShantou;
		private System.Windows.Forms.Label lblDXiamen;
		private System.Windows.Forms.Label lblDLiuzhou;
		private System.Windows.Forms.Label lblDGuiyang;
		private System.Windows.Forms.Label lblDChongqing;
		private System.Windows.Forms.Label lblDFuzhou;
		private System.Windows.Forms.Label lblDWenzhou;
		private System.Windows.Forms.Label lblDHangzhou;
		private System.Windows.Forms.Label lblDShanghai;
		private System.Windows.Forms.Label lblDZhuzhou;
		private System.Windows.Forms.Label lblDChangsha;
		private System.Windows.Forms.Label lblDNanchuang;
		private System.Windows.Forms.Label lblDWuhan;
		private System.Windows.Forms.Label lblDXiangfan;
		private System.Windows.Forms.Label lblDAnkuang;
		private System.Windows.Forms.Label lblDXian;
		private System.Windows.Forms.Label lblDNanjing;
		private System.Windows.Forms.Label lblDXuzhou;
		private System.Windows.Forms.Label lblDYanan;
		private System.Windows.Forms.Label lblDYinchuan;
		private System.Windows.Forms.Label lblDBaotou;
		private System.Windows.Forms.Label lblDHuhehaote;
		private System.Windows.Forms.Label lblDBeijing;
		private System.Windows.Forms.Label lblDTianjing;
		private System.Windows.Forms.Label lblDShijiazhuang;
		private System.Windows.Forms.Label lblDTaiyuan;
		private System.Windows.Forms.Label lblDJinan;
		private System.Windows.Forms.Label lblDZhengzhou;
		private System.Windows.Forms.Label lblDLuoyang;
		private System.Windows.Forms.Label lblDLanzhou;
		private System.Windows.Forms.ToolTip toolTip1;
		private System.Windows.Forms.Label lblMin;
		private System.Windows.Forms.Label lblClose;
		private System.Windows.Forms.Label lblHelp;
		private System.Windows.Forms.NotifyIcon notifyIcon1;
		private System.Windows.Forms.Panel lblClearQidian;
		private System.Windows.Forms.Label lblZhongzhuangzhan;
		private System.Windows.Forms.Label lblClearZhongdian;
		private System.Windows.Forms.Label lblClearcheci;
		private System.Windows.Forms.Label lblOKChezhan;
		private System.Windows.Forms.Label lblOKcheci;
		private System.Windows.Forms.TextBox txtQishizhan;
		private System.Windows.Forms.TextBox txtZhongdianzhan;
		public System.Windows.Forms.TextBox txtCheci;
		private System.Windows.Forms.TextBox txtZhongzhuangzhan;
		private System.Windows.Forms.PictureBox piczhongzhuang;
		private System.Windows.Forms.Label lblFanhui;
		private System.ComponentModel.IContainer components;
		private System.Windows.Forms.Label lblClearZhongzhuan;
		private System.Windows.Forms.Label lblClearqidianzhan;
		public System.Windows.Forms.ListView lvTrainDetailInfo;
		private System.Windows.Forms.MenuItem menuOpen;
		private System.Windows.Forms.MenuItem menuClose;
		private System.Windows.Forms.Panel panel5;
		private System.Windows.Forms.Label lblcheci;
		private System.Windows.Forms.Label lblfacheshijian;
		private System.Windows.Forms.Label lbldaodashijian;
		private System.Windows.Forms.Label lblalltime;
		private System.Windows.Forms.Label lbljuli;
		private System.Windows.Forms.Label lblchezhancount;
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Label lblchengshi;
		private System.Windows.Forms.Label lblyinUp;
		private System.Windows.Forms.Label lblyinMid;
		private System.Windows.Forms.Label lblruanUp;
		private System.Windows.Forms.Label lblruanDown;
		private System.Windows.Forms.Label lblyinzuo;
		private System.Windows.Forms.Label lblruanzuo;
		private System.Windows.Forms.Label lblyinDown;
		private System.Windows.Forms.Label lblstu;
		private System.Windows.Forms.Label lblputong;
		private System.Windows.Forms.Label lblcanban;
		private System.Windows.Forms.PictureBox pictureBoxshen;
		private System.Windows.Forms.Label lblreturn;
		private System.Windows.Forms.Label lbljiudian;
		private System.Windows.Forms.Label lblplane;
		private System.Windows.Forms.Label lblprall;
		private System.Windows.Forms.Label lblprdeatil;
		private System.Windows.Forms.Label lblupdate;
		public System.Windows.Forms.ListView lvreturn;
		private System.Windows.Forms.PrintPreviewDialog ppdlgPrintPreviewDialog;
		private System.Drawing.Printing.PrintDocument pdocPrintDocument;
		private System.Windows.Forms.PrintDialog pdlgPrintDialog;
		private System.Windows.Forms.ListBox listBoxCity;
		private System.Windows.Forms.Label lblPro;
		public System.Windows.Forms.ListView lvTrainInfo;
	    private System.Windows.Forms.ContextMenu cMenuTrain; //界面是否被点击的变量
		private bool zhongzhuan=false;//中转站开启关闭的变量
		private System.Windows.Forms.Label lbldatetime;
		private System.Windows.Forms.Label lblfujingchezhan;
		private System.Windows.Forms.ContextMenu cmenuDaochu;
		private System.Windows.Forms.MenuItem menuItem1;
		private System.Windows.Forms.MenuItem menuItem2;
		private bool isclick=false;
		Point oldpoint=new Point(0,0);//界面的初始焦点
		#endregion
 
	

		public MainView()
		{
			//
			// Windows 窗体设计器支持所必需的
			//
			InitializeComponent();
			lbldatetime.Text="    "+DateTime.Now+"";
			this.BuildreturnTrainColumnHeader();  //返回列车信息列表头信息
            this.BuildTrainColumnHeader();        //列车信息列表头信息
			this.BuildTrainDetailColumnHeader();  //列车信详细息列表头信息
			//
			// 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()
		{
			this.components = new System.ComponentModel.Container();
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(MainView));
			this.panel1 = new System.Windows.Forms.Panel();
			this.txtZhongzhuangzhan = new System.Windows.Forms.TextBox();
			this.lblFanhui = new System.Windows.Forms.Label();
			this.lblClearZhongzhuan = new System.Windows.Forms.Label();
			this.txtZhongdianzhan = new System.Windows.Forms.TextBox();
			this.txtQishizhan = new System.Windows.Forms.TextBox();
			this.lblOKChezhan = new System.Windows.Forms.Label();
			this.lblClearZhongdian = new System.Windows.Forms.Label();
			this.lblClearqidianzhan = new System.Windows.Forms.Label();
			this.lblZhongzhuangzhan = new System.Windows.Forms.Label();
			this.lblHelp = new System.Windows.Forms.Label();
			this.lblClose = new System.Windows.Forms.Label();
			this.lblMin = new System.Windows.Forms.Label();
			this.piczhongzhuang = new System.Windows.Forms.PictureBox();
			this.label1 = new System.Windows.Forms.Label();
			this.txtCheci = new System.Windows.Forms.TextBox();
			this.lblOKcheci = new System.Windows.Forms.Label();
			this.lblClearcheci = new System.Windows.Forms.Label();
			this.panel2 = new System.Windows.Forms.Panel();
			this.tabControl1 = new System.Windows.Forms.TabControl();
			this.tabPage1 = new System.Windows.Forms.TabPage();
			this.panel7 = new System.Windows.Forms.Panel();
			this.lblupdate = new System.Windows.Forms.Label();
			this.panel6 = new System.Windows.Forms.Panel();
			this.lblDLanzhou = new System.Windows.Forms.Label();
			this.lblDLuoyang = new System.Windows.Forms.Label();
			this.lblDZhengzhou = new System.Windows.Forms.Label();
			this.lblDJinan = new System.Windows.Forms.Label();
			this.lblDTaiyuan = new System.Windows.Forms.Label();
			this.lblDShijiazhuang = new System.Windows.Forms.Label();
			this.lblDTianjing = new System.Windows.Forms.Label();
			this.lblDBeijing = new System.Windows.Forms.Label();
			this.lblDHuhehaote = new System.Windows.Forms.Label();
			this.lblDBaotou = new System.Windows.Forms.Label();
			this.lblDYinchuan = new System.Windows.Forms.Label();
			this.lblDYanan = new System.Windows.Forms.Label();
			this.lblDXuzhou = new System.Windows.Forms.Label();
			this.lblDNanjing = new System.Windows.Forms.Label();
			this.lblDXian = new System.Windows.Forms.Label();
			this.lblDAnkuang = new System.Windows.Forms.Label();
			this.lblDXiangfan = new System.Windows.Forms.Label();

⌨️ 快捷键说明

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