📄 resultform.cs
字号:
this.tbtnClose.Text = "关闭窗口";
this.tbtnClose.ToolTipText = "关闭窗口";
//
// imageList1
//
this.imageList1.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
this.imageList1.ImageSize = new System.Drawing.Size(16, 16);
this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
//
// imageList2
//
this.imageList2.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
this.imageList2.ImageSize = new System.Drawing.Size(16, 16);
this.imageList2.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList2.ImageStream")));
this.imageList2.TransparentColor = System.Drawing.Color.Transparent;
//
// tmClock
//
this.tmClock.Interval = 1000;
this.tmClock.Tick += new System.EventHandler(this.tmClock_Tick);
//
// plTop
//
this.plTop.Controls.AddRange(new System.Windows.Forms.Control[] {
this.btnClose,
this.btnMax,
this.btnMin,
this.pictureBox7,
this.pictureBox6,
this.pictureBox5,
this.pictureBox4,
this.pictureBox3,
this.pictureBox2,
this.pictureBox1});
this.plTop.Dock = System.Windows.Forms.DockStyle.Top;
this.plTop.Name = "plTop";
this.plTop.Size = new System.Drawing.Size(600, 26);
this.plTop.TabIndex = 5;
//
// btnClose
//
this.btnClose.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnClose.Image = ((System.Drawing.Bitmap)(resources.GetObject("btnClose.Image")));
this.btnClose.Location = new System.Drawing.Point(570, 3);
this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(20, 20);
this.btnClose.TabIndex = 13;
this.btnClose.TabStop = false;
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
this.btnClose.MouseMove += new System.Windows.Forms.MouseEventHandler(this.btnClose_MouseMove);
this.btnClose.MouseLeave += new System.EventHandler(this.btnClose_MouseLeave);
this.btnClose.MouseDown += new System.Windows.Forms.MouseEventHandler(this.btnClose_MouseDown);
//
// btnMax
//
this.btnMax.Image = ((System.Drawing.Bitmap)(resources.GetObject("btnMax.Image")));
this.btnMax.Location = new System.Drawing.Point(546, 3);
this.btnMax.Name = "btnMax";
this.btnMax.Size = new System.Drawing.Size(20, 20);
this.btnMax.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
this.btnMax.TabIndex = 12;
this.btnMax.TabStop = false;
//
// btnMin
//
this.btnMin.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnMin.Image = ((System.Drawing.Bitmap)(resources.GetObject("btnMin.Image")));
this.btnMin.Location = new System.Drawing.Point(522, 3);
this.btnMin.Name = "btnMin";
this.btnMin.Size = new System.Drawing.Size(20, 20);
this.btnMin.TabIndex = 11;
this.btnMin.TabStop = false;
this.btnMin.Click += new System.EventHandler(this.btnMin_Click);
this.btnMin.MouseMove += new System.Windows.Forms.MouseEventHandler(this.btnMin_MouseMove);
this.btnMin.MouseLeave += new System.EventHandler(this.btnMin_MouseLeave);
this.btnMin.MouseDown += new System.Windows.Forms.MouseEventHandler(this.btnMin_MouseDown);
//
// pictureBox7
//
this.pictureBox7.Dock = System.Windows.Forms.DockStyle.Right;
this.pictureBox7.Image = ((System.Drawing.Bitmap)(resources.GetObject("pictureBox7.Image")));
this.pictureBox7.Location = new System.Drawing.Point(596, 0);
this.pictureBox7.Name = "pictureBox7";
this.pictureBox7.Size = new System.Drawing.Size(4, 26);
this.pictureBox7.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
this.pictureBox7.TabIndex = 7;
this.pictureBox7.TabStop = false;
//
// pictureBox6
//
this.pictureBox6.BackgroundImage = ((System.Drawing.Bitmap)(resources.GetObject("pictureBox6.BackgroundImage")));
this.pictureBox6.Dock = System.Windows.Forms.DockStyle.Fill;
this.pictureBox6.Image = ((System.Drawing.Bitmap)(resources.GetObject("pictureBox6.Image")));
this.pictureBox6.Location = new System.Drawing.Point(518, 0);
this.pictureBox6.Name = "pictureBox6";
this.pictureBox6.Size = new System.Drawing.Size(82, 26);
this.pictureBox6.TabIndex = 6;
this.pictureBox6.TabStop = false;
//
// pictureBox5
//
this.pictureBox5.Dock = System.Windows.Forms.DockStyle.Left;
this.pictureBox5.Image = ((System.Drawing.Bitmap)(resources.GetObject("pictureBox5.Image")));
this.pictureBox5.Location = new System.Drawing.Point(504, 0);
this.pictureBox5.Name = "pictureBox5";
this.pictureBox5.Size = new System.Drawing.Size(14, 26);
this.pictureBox5.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
this.pictureBox5.TabIndex = 5;
this.pictureBox5.TabStop = false;
//
// pictureBox4
//
this.pictureBox4.BackgroundImage = ((System.Drawing.Bitmap)(resources.GetObject("pictureBox4.BackgroundImage")));
this.pictureBox4.Cursor = System.Windows.Forms.Cursors.Hand;
this.pictureBox4.Dock = System.Windows.Forms.DockStyle.Left;
this.pictureBox4.Location = new System.Drawing.Point(38, 0);
this.pictureBox4.Name = "pictureBox4";
this.pictureBox4.Size = new System.Drawing.Size(466, 26);
this.pictureBox4.TabIndex = 4;
this.pictureBox4.TabStop = false;
this.pictureBox4.Paint += new System.Windows.Forms.PaintEventHandler(this.pictureBox4_Paint);
this.pictureBox4.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pictureBox4_MouseMove);
this.pictureBox4.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pictureBox4_MouseDown);
//
// pictureBox3
//
this.pictureBox3.Dock = System.Windows.Forms.DockStyle.Left;
this.pictureBox3.Image = ((System.Drawing.Bitmap)(resources.GetObject("pictureBox3.Image")));
this.pictureBox3.Location = new System.Drawing.Point(25, 0);
this.pictureBox3.Name = "pictureBox3";
this.pictureBox3.Size = new System.Drawing.Size(13, 26);
this.pictureBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
this.pictureBox3.TabIndex = 3;
this.pictureBox3.TabStop = false;
//
// pictureBox2
//
this.pictureBox2.Dock = System.Windows.Forms.DockStyle.Left;
this.pictureBox2.Image = ((System.Drawing.Bitmap)(resources.GetObject("pictureBox2.Image")));
this.pictureBox2.Location = new System.Drawing.Point(4, 0);
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new System.Drawing.Size(21, 26);
this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
this.pictureBox2.TabIndex = 2;
this.pictureBox2.TabStop = false;
//
// pictureBox1
//
this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Left;
this.pictureBox1.Image = ((System.Drawing.Bitmap)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(4, 26);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
this.pictureBox1.TabIndex = 1;
this.pictureBox1.TabStop = false;
//
// plLeft
//
this.plLeft.Controls.AddRange(new System.Windows.Forms.Control[] {
this.pictureBox8});
this.plLeft.Dock = System.Windows.Forms.DockStyle.Left;
this.plLeft.Location = new System.Drawing.Point(0, 26);
this.plLeft.Name = "plLeft";
this.plLeft.Size = new System.Drawing.Size(4, 420);
this.plLeft.TabIndex = 7;
//
// pictureBox8
//
this.pictureBox8.BackgroundImage = ((System.Drawing.Bitmap)(resources.GetObject("pictureBox8.BackgroundImage")));
this.pictureBox8.Dock = System.Windows.Forms.DockStyle.Fill;
this.pictureBox8.Name = "pictureBox8";
this.pictureBox8.Size = new System.Drawing.Size(4, 420);
this.pictureBox8.TabIndex = 0;
this.pictureBox8.TabStop = false;
//
// timerHide
//
this.timerHide.Tick += new System.EventHandler(this.timerHide_Tick);
//
// timeShow
//
this.timeShow.Tick += new System.EventHandler(this.timeShow_Tick);
//
// ResultForm
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(600, 450);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.plLeft,
this.plMain,
this.plRight,
this.plBotton,
this.plTop});
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "ResultForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "阳光公交宝典";
this.Load += new System.EventHandler(this.ResultForm_Load);
this.plRight.ResumeLayout(false);
this.plBotton.ResumeLayout(false);
this.plMain.ResumeLayout(false);
this.panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.statusBarPanel1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.statusBarPanel2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.statusBarPanel3)).EndInit();
this.panel1.ResumeLayout(false);
this.panel6.ResumeLayout(false);
this.panel5.ResumeLayout(false);
this.groupBox2.ResumeLayout(false);
this.panel4.ResumeLayout(false);
this.groupBox1.ResumeLayout(false);
this.panel3.ResumeLayout(false);
this.plToolbar.ResumeLayout(false);
this.plTop.ResumeLayout(false);
this.plLeft.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
#region 获取汽车详细资料=======================================
/// <summary>
/// 获取汽车详细资料
/// </summary>
private void GetBusInfo()
{
try
{
DataSet ds = new DataAccess.Bus().GetBusDataset(this.busID);
DataTable dt = MainForm.ds.Tables[0];
for(int i = 0;i < dt.Rows.Count;i++)
{
if((int)dt.Rows[i]["BusID"] == this.busID)
{
this.txbName.Text = dt.Rows[i]["BusName"].ToString();
this.txbType.Text = dt.Rows[i]["BusType"].ToString();
this.txbBusStartStop.Text = dt.Rows[i]["BusStartStop"].ToString();
this.txbBusEndStop.Text = dt.Rows[i]["BusEndStop"].ToString();
this.txbDescription.Text = dt.Rows[i]["BusDescription"].ToString();
this.recordIndex = i;
break;
}
}
this.totalRecordCount = dt.Rows.Count;
}
catch
{
}
}
/// <summary>
/// 获取汽车详细资料
/// </summary>
/// <param name="recordIndex">当前记录指针</param>
private void GetBusInfo(int recordIndex)
{
try
{
DataRow dr = MainForm.ds.Tables[0].Rows[recordIndex];
if(dr != null)
{
this.busID = (int)dr["BusID"];
this.txbName.Text = dr["BusName"].ToString();
this.txbType.Text = dr["BusType"].ToString();
this.txbBusStartStop.Text = dr["BusStartStop"].ToString();
this.txbBusEndStop.Text = dr["BusEndStop"].ToString();
this.txbDescription.Text = dr["BusDescription"].ToString();
//清除站点列表
this.lVStopList.Items.Clear();
//获取站点列表
this.GetStopList();
}
}
catch
{
}
}
#endregion
#region 获取站点列表===========================================
/// <summary>
/// 获取站点列表
/// </summary>
private void GetStopList()
{
try
{
DataSet ds = new DataAccess.Stop().GetStopDataset(this.busID);
DataTable dt = ds.Tables[0];
for(int i=0;i<dt.Rows.Count;i++)
{
string[] str = new string[]{dt.Rows[i][0].ToString(),dt.Rows[i][1].ToString()};
this.lVStopList.Items.Add(new ListViewItem(str));
}
}
catch
{
}
}
#endregion
#region 浏览按钮事件处理=======================================
private void btnFirst_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
this.btnBrowseFirstMouseOver = true;
this.DrawBrowseButton(1);
}
private void btnFirst_MouseLeave(object sender, System.EventArgs e)
{
this.btnBrowseFirstMouseDown = false;
this.btnBrowseFirstMouseOver = false;
this.DrawBrowseButton(1);
}
private void btnFirst_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
this.btnBrowseFirstMouseDown = true;
this.DrawBrowseButton(1);
}
private void btnPrv_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
this.btnBrowsePrvMouseOver = true;
this.DrawBrowseButton(2);
}
private void btnPrv_MouseLeave(object sender, System.EventArgs e)
{
this.btnBrowsePrvMouseDown = false;
this.btnBrowsePrvMouseOver = false;
this.DrawBrowseButton(2);
}
private void btnPrv_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
this.btnBrowsePrvMouseDown = true;
this.DrawBrowseButton(2);
}
private void btnNext_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
this.btnBrowseNextMouseOver = true;
this.DrawBrowseButton(3);
}
private void btnNext_MouseLeave(object sender, System.EventArgs e)
{
this.btnBrowseNextMouseDown = false;
this.btnBrowseNextMouseOver = false;
this.DrawBrowseButton(3);
}
private void btnNext_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
this.btnBrowseNextMouseDown = true;
this.DrawBrowseButton(3);
}
private void btnLast_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
this.btnBrowseLastMouseOver = true;
this.DrawBrowseButton(4);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -