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

📄 resultform.cs

📁 工交车查询系统
💻 CS
📖 第 1 页 / 共 4 页
字号:
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
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>
	/// ResultForm 的摘要说明。
	/// </summary>
	public class ResultForm : System.Windows.Forms.Form
	{
		#region 控件定义===============================================
		private System.Windows.Forms.Panel plRight;
		private System.Windows.Forms.PictureBox pictureBox9;
		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.ImageList imageList3;
		private System.Windows.Forms.Panel plMain;
		private System.Windows.Forms.Panel panel2;
		private System.Windows.Forms.Panel panel1;
		private System.Windows.Forms.Panel panel3;
		private System.Windows.Forms.Panel plToolbar;
		private System.Windows.Forms.ImageList imageList2;
		private System.Windows.Forms.Timer tmClock;
		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 plLeft;
		private System.Windows.Forms.PictureBox pictureBox8;
		private System.Windows.Forms.Label lbTitle;
		private System.Windows.Forms.Panel panel4;
		private System.Windows.Forms.Panel panel5;
		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.ComponentModel.IContainer components;
		private System.Windows.Forms.GroupBox groupBox2;
		private System.Windows.Forms.ListView lVStopList;
		private System.Windows.Forms.ColumnHeader StopName;
		private System.Windows.Forms.ColumnHeader StopDescription;
		private System.Windows.Forms.GroupBox groupBox1;
		private System.Windows.Forms.TextBox txbDescription;
		private System.Windows.Forms.Label label4;
		private System.Windows.Forms.Label label3;
		private System.Windows.Forms.TextBox txbType;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.TextBox txbName;
		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.Label label1;
		private System.Windows.Forms.TextBox txbBusEndStop;
		private System.Windows.Forms.ImageList imageList1;
		private System.Windows.Forms.Panel panel6;
		private System.Windows.Forms.PictureBox btnLast;
		private System.Windows.Forms.PictureBox btnNext;
		private System.Windows.Forms.PictureBox btnPrv;
		private System.Windows.Forms.PictureBox btnFirst;
		private System.Windows.Forms.Timer timerHide;
		private System.Windows.Forms.Timer timeShow;
		private System.Windows.Forms.TextBox txbBusStartStop;
		#endregion
				
		#region 字段定义===============================================
		/// <summary>
		/// 当前BUSID
		/// </summary>
		private int busID;
		/// <summary>
		/// 总的记录数
		/// </summary>
		private int totalRecordCount = 0;		
		/// <summary>
		/// 当前记录指针
		/// </summary>
		private int recordIndex = 0;
		/// <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;
		/// <summary>
		/// 第一条按钮是否是MouseOver事件
		/// </summary>
		private bool btnBrowseFirstMouseOver = false;
		/// <summary>
		/// 第一条按钮是否是MouseDown事件
		/// </summary>
		private bool btnBrowseFirstMouseDown = false;
		/// <summary>
		/// 上一条按钮是否是MouseOver事件
		/// </summary>
		private bool btnBrowsePrvMouseOver = false;
		/// <summary>
		/// 上一条按钮是否是MouseDown事件
		/// </summary>
		private bool btnBrowsePrvMouseDown = false;
		/// <summary>
		/// 下一条按钮是否是MouseOver事件
		/// </summary>
		private bool btnBrowseNextMouseOver = false;
		/// <summary>
		/// 下一条按钮是否是MouseDown事件
		/// </summary>
		private bool btnBrowseNextMouseDown = false;
		/// <summary>
		/// 最末条按钮是否是MouseOver事件
		/// </summary>
		private bool btnBrowseLastMouseOver = false;
		/// <summary>
		/// 最末条按钮是否是MouseDown事件
		/// </summary>
		private bool btnBrowseLastMouseDown = false;
		/// <summary>
		/// 翻条按钮图片
		/// </summary>
		private Bitmap btnFirstBmp,btnPrvBmp,btnNextBmp,btnLastBmp;
		
		private double hideForm = 1;
		private double showForm = 0;
		#endregion		
		
		#region 窗体加载事件处理=======================================
		private void ResultForm_Load(object sender, System.EventArgs e)
		{
			this.timeShow.Enabled = true;

			//取回BUSID
			this.busID = MainForm.busID;
			//获取汽车详细资料
			this.GetBusInfo();
			//获取当前汽车经过的站点列表
			this.GetStopList();
			//统计信息
			this.StatisticInfo();
			//取动计时器
			this.tmClock.Enabled = true;
			//状态栏处理
			this.StatusBar();
			//设置最小化关闭按钮
			this.DrawButton(1);
			this.DrawButton(2);
			//绘制翻条按钮
			this.DrawBrowseButton(1);
			this.DrawBrowseButton(2);
			this.DrawBrowseButton(3);
			this.DrawBrowseButton(4);
		}
		#endregion

		#region 清理资源===============================================
		/// <summary>
		/// 清理所有正在使用的资源。
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if (components != null) 
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}
		#endregion

		#region 构造函数===============================================
		public ResultForm()
		{
			this.Opacity = this.showForm;
			InitializeComponent();
		}
		#endregion		

		#region Windows Form Designer generated code===================
		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{
			this.components = new System.ComponentModel.Container();
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(ResultForm));
			this.plRight = new System.Windows.Forms.Panel();
			this.pictureBox9 = new System.Windows.Forms.PictureBox();
			this.plBotton = new System.Windows.Forms.Panel();
			this.pictureBox12 = new System.Windows.Forms.PictureBox();
			this.pictureBox11 = new System.Windows.Forms.PictureBox();
			this.pictureBox10 = new System.Windows.Forms.PictureBox();
			this.imageList3 = new System.Windows.Forms.ImageList(this.components);
			this.plMain = new System.Windows.Forms.Panel();
			this.panel2 = new System.Windows.Forms.Panel();
			this.statusBar1 = new System.Windows.Forms.StatusBar();
			this.statusBarPanel1 = new System.Windows.Forms.StatusBarPanel();
			this.statusBarPanel2 = new System.Windows.Forms.StatusBarPanel();
			this.statusBarPanel3 = new System.Windows.Forms.StatusBarPanel();
			this.panel1 = new System.Windows.Forms.Panel();
			this.panel6 = new System.Windows.Forms.Panel();
			this.btnLast = new System.Windows.Forms.PictureBox();
			this.btnNext = new System.Windows.Forms.PictureBox();
			this.btnPrv = new System.Windows.Forms.PictureBox();
			this.btnFirst = new System.Windows.Forms.PictureBox();
			this.panel5 = new System.Windows.Forms.Panel();
			this.groupBox2 = new System.Windows.Forms.GroupBox();
			this.lVStopList = new System.Windows.Forms.ListView();
			this.StopName = new System.Windows.Forms.ColumnHeader();
			this.StopDescription = new System.Windows.Forms.ColumnHeader();
			this.panel4 = new System.Windows.Forms.Panel();
			this.groupBox1 = new System.Windows.Forms.GroupBox();
			this.txbDescription = new System.Windows.Forms.TextBox();
			this.txbBusEndStop = new System.Windows.Forms.TextBox();
			this.label4 = new System.Windows.Forms.Label();
			this.txbBusStartStop = new System.Windows.Forms.TextBox();
			this.label3 = new System.Windows.Forms.Label();
			this.txbType = new System.Windows.Forms.TextBox();
			this.label2 = new System.Windows.Forms.Label();
			this.txbName = new System.Windows.Forms.TextBox();
			this.label1 = new System.Windows.Forms.Label();
			this.panel3 = new System.Windows.Forms.Panel();
			this.lbTitle = new System.Windows.Forms.Label();
			this.plToolbar = new System.Windows.Forms.Panel();
			this.toolBar1 = new System.Windows.Forms.ToolBar();
			this.tbtnHelp = new System.Windows.Forms.ToolBarButton();
			this.tbtnAbout = new System.Windows.Forms.ToolBarButton();
			this.tbtnClose = new System.Windows.Forms.ToolBarButton();
			this.imageList1 = new System.Windows.Forms.ImageList(this.components);
			this.imageList2 = new System.Windows.Forms.ImageList(this.components);
			this.tmClock = new System.Windows.Forms.Timer(this.components);
			this.plTop = new System.Windows.Forms.Panel();
			this.btnClose = new System.Windows.Forms.PictureBox();
			this.btnMax = new System.Windows.Forms.PictureBox();
			this.btnMin = new System.Windows.Forms.PictureBox();
			this.pictureBox7 = new System.Windows.Forms.PictureBox();
			this.pictureBox6 = new System.Windows.Forms.PictureBox();
			this.pictureBox5 = new System.Windows.Forms.PictureBox();
			this.pictureBox4 = new System.Windows.Forms.PictureBox();
			this.pictureBox3 = new System.Windows.Forms.PictureBox();
			this.pictureBox2 = new System.Windows.Forms.PictureBox();
			this.pictureBox1 = new System.Windows.Forms.PictureBox();
			this.plLeft = new System.Windows.Forms.Panel();
			this.pictureBox8 = new System.Windows.Forms.PictureBox();
			this.timerHide = new System.Windows.Forms.Timer(this.components);
			this.timeShow = new System.Windows.Forms.Timer(this.components);
			this.plRight.SuspendLayout();
			this.plBotton.SuspendLayout();
			this.plMain.SuspendLayout();
			this.panel2.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.statusBarPanel1)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.statusBarPanel2)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.statusBarPanel3)).BeginInit();
			this.panel1.SuspendLayout();
			this.panel6.SuspendLayout();
			this.panel5.SuspendLayout();
			this.groupBox2.SuspendLayout();
			this.panel4.SuspendLayout();
			this.groupBox1.SuspendLayout();
			this.panel3.SuspendLayout();
			this.plToolbar.SuspendLayout();
			this.plTop.SuspendLayout();
			this.plLeft.SuspendLayout();
			this.SuspendLayout();
			// 
			// plRight
			// 
			this.plRight.Controls.AddRange(new System.Windows.Forms.Control[] {
																				  this.pictureBox9});
			this.plRight.Dock = System.Windows.Forms.DockStyle.Right;
			this.plRight.Location = new System.Drawing.Point(596, 26);
			this.plRight.Name = "plRight";
			this.plRight.Size = new System.Drawing.Size(4, 420);
			this.plRight.TabIndex = 9;
			// 
			// pictureBox9
			// 
			this.pictureBox9.BackgroundImage = ((System.Drawing.Bitmap)(resources.GetObject("pictureBox9.BackgroundImage")));
			this.pictureBox9.Dock = System.Windows.Forms.DockStyle.Fill;
			this.pictureBox9.Name = "pictureBox9";
			this.pictureBox9.Size = new System.Drawing.Size(4, 420);
			this.pictureBox9.TabIndex = 0;
			this.pictureBox9.TabStop = false;
			// 
			// plBotton
			// 
			this.plBotton.Controls.AddRange(new System.Windows.Forms.Control[] {
																				   this.pictureBox12,
																				   this.pictureBox11,
																				   this.pictureBox10});
			this.plBotton.Dock = System.Windows.Forms.DockStyle.Bottom;
			this.plBotton.Location = new System.Drawing.Point(0, 446);
			this.plBotton.Name = "plBotton";
			this.plBotton.Size = new System.Drawing.Size(600, 4);
			this.plBotton.TabIndex = 6;
			// 
			// pictureBox12
			// 
			this.pictureBox12.Dock = System.Windows.Forms.DockStyle.Right;
			this.pictureBox12.Image = ((System.Drawing.Bitmap)(resources.GetObject("pictureBox12.Image")));
			this.pictureBox12.Location = new System.Drawing.Point(596, 0);
			this.pictureBox12.Name = "pictureBox12";
			this.pictureBox12.Size = new System.Drawing.Size(4, 4);
			this.pictureBox12.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
			this.pictureBox12.TabIndex = 2;
			this.pictureBox12.TabStop = false;
			// 
			// pictureBox11
			// 
			this.pictureBox11.BackgroundImage = ((System.Drawing.Bitmap)(resources.GetObject("pictureBox11.BackgroundImage")));
			this.pictureBox11.Dock = System.Windows.Forms.DockStyle.Fill;
			this.pictureBox11.Location = new System.Drawing.Point(4, 0);
			this.pictureBox11.Name = "pictureBox11";
			this.pictureBox11.Size = new System.Drawing.Size(596, 4);
			this.pictureBox11.TabIndex = 1;
			this.pictureBox11.TabStop = false;
			// 
			// pictureBox10
			// 
			this.pictureBox10.Dock = System.Windows.Forms.DockStyle.Left;
			this.pictureBox10.Image = ((System.Drawing.Bitmap)(resources.GetObject("pictureBox10.Image")));
			this.pictureBox10.Name = "pictureBox10";
			this.pictureBox10.Size = new System.Drawing.Size(4, 4);

⌨️ 快捷键说明

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