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

📄 helpform.cs

📁 工交车查询系统
💻 CS
📖 第 1 页 / 共 2 页
字号:
			// 
			// 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;
			// 
			// 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;
			// 
			// panel2
			// 
			this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
			this.panel2.Controls.AddRange(new System.Windows.Forms.Control[] {
																				 this.lbTitle});
			this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
			this.panel2.Location = new System.Drawing.Point(4, 26);
			this.panel2.Name = "panel2";
			this.panel2.Size = new System.Drawing.Size(592, 20);
			this.panel2.TabIndex = 17;
			// 
			// lbTitle
			// 
			this.lbTitle.Dock = System.Windows.Forms.DockStyle.Fill;
			this.lbTitle.ForeColor = System.Drawing.Color.MintCream;
			this.lbTitle.Image = ((System.Drawing.Bitmap)(resources.GetObject("lbTitle.Image")));
			this.lbTitle.Name = "lbTitle";
			this.lbTitle.Size = new System.Drawing.Size(588, 16);
			this.lbTitle.TabIndex = 4;
			this.lbTitle.Text = "系统帮助";
			this.lbTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// panel3
			// 
			this.panel3.Controls.AddRange(new System.Windows.Forms.Control[] {
																				 this.wbBrow});
			this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
			this.panel3.Location = new System.Drawing.Point(4, 48);
			this.panel3.Name = "panel3";
			this.panel3.Size = new System.Drawing.Size(592, 376);
			this.panel3.TabIndex = 18;
			// 
			// wbBrow
			// 
			this.wbBrow.ContainingControl = this;
			this.wbBrow.Dock = System.Windows.Forms.DockStyle.Fill;
			this.wbBrow.Enabled = true;
			this.wbBrow.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("wbBrow.OcxState")));
			this.wbBrow.Size = new System.Drawing.Size(592, 376);
			this.wbBrow.TabIndex = 0;
			// 
			// panel4
			// 
			this.panel4.Controls.AddRange(new System.Windows.Forms.Control[] {
																				 this.statusBar1});
			this.panel4.Dock = System.Windows.Forms.DockStyle.Bottom;
			this.panel4.Location = new System.Drawing.Point(4, 424);
			this.panel4.Name = "panel4";
			this.panel4.Size = new System.Drawing.Size(592, 22);
			this.panel4.TabIndex = 19;
			// 
			// statusBar1
			// 
			this.statusBar1.Name = "statusBar1";
			this.statusBar1.Panels.AddRange(new System.Windows.Forms.StatusBarPanel[] {
																						  this.statusBarPanel1,
																						  this.statusBarPanel2,
																						  this.statusBarPanel3});
			this.statusBar1.ShowPanels = true;
			this.statusBar1.Size = new System.Drawing.Size(592, 22);
			this.statusBar1.TabIndex = 2;
			// 
			// statusBarPanel1
			// 
			this.statusBarPanel1.Icon = ((System.Drawing.Icon)(resources.GetObject("statusBarPanel1.Icon")));
			this.statusBarPanel1.Width = 160;
			// 
			// statusBarPanel2
			// 
			this.statusBarPanel2.Icon = ((System.Drawing.Icon)(resources.GetObject("statusBarPanel2.Icon")));
			this.statusBarPanel2.Width = 200;
			// 
			// statusBarPanel3
			// 
			this.statusBarPanel3.Width = 240;
			// 
			// panel5
			// 
			this.panel5.Dock = System.Windows.Forms.DockStyle.Top;
			this.panel5.Location = new System.Drawing.Point(4, 46);
			this.panel5.Name = "panel5";
			this.panel5.Size = new System.Drawing.Size(592, 2);
			this.panel5.TabIndex = 20;
			// 
			// timerHide
			// 
			this.timerHide.Tick += new System.EventHandler(this.timerHide_Tick);
			// 
			// timerShow
			// 
			this.timerShow.Tick += new System.EventHandler(this.timerShow_Tick);
			// 
			// HelpForm
			// 
			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.panel3,
																		  this.panel5,
																		  this.panel4,
																		  this.panel2,
																		  this.plRight,
																		  this.plLeft,
																		  this.plBotton,
																		  this.plTop});
			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
			this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
			this.Name = "HelpForm";
			this.Text = "阳光公交宝典";
			this.Load += new System.EventHandler(this.HelpForm_Load);
			this.plRight.ResumeLayout(false);
			this.plLeft.ResumeLayout(false);
			this.plBotton.ResumeLayout(false);
			this.plTop.ResumeLayout(false);
			this.panel2.ResumeLayout(false);
			this.panel3.ResumeLayout(false);
			((System.ComponentModel.ISupportInitialize)(this.wbBrow)).EndInit();
			this.panel4.ResumeLayout(false);
			((System.ComponentModel.ISupportInitialize)(this.statusBarPanel1)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.statusBarPanel2)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.statusBarPanel3)).EndInit();
			this.ResumeLayout(false);

		}
		#endregion		

		#region 移动窗口===============================================
		private void pictureBox4_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
		{
			if(e.Button == MouseButtons.Left)
			{
				Point mousePoint = Control.MousePosition;
				mousePoint.Offset(this.m_pOffset.X,this.m_pOffset.Y);
				this.Location = mousePoint;
				this.xPos = mousePoint.X;
				this.yPos = mousePoint.Y;
				if(xPos < 0)
				{
					xPos = 0;
				}
				if(yPos < 0)
				{
					yPos = 0;
				}
				this.locationMain.X = xPos;
				this.locationMain.Y = yPos;
			}
		}

		private void pictureBox4_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
		{
			this.m_pOffset = new Point(-e.X,-e.Y);
		}
		#endregion

		#region 绘制窗体标题===========================================
		private void pictureBox4_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
		{
			try
			{
				Point p = new Point(this.pictureBox4.Location.X-40,this.pictureBox4.Location.Y+5);
				Graphics g = e.Graphics;
				g.DrawString(SystemMessage.SYSTEM_TITLE+"系统帮助",new Font("宋体",10),Brushes.Yellow,p);
				Point p2 = new Point(p.X+1,p.Y+1);
				g.DrawString(SystemMessage.SYSTEM_TITLE+"系统帮助",new Font("宋体",10),Brushes.DarkBlue,p2);
				//g.Dispose();
			
			}
			catch(System.Exception ex)
			{
				throw new Exception(ex.Message);
			}
		}
		#endregion

		#region 当前时间日期===========================================
		private void tmClock_Tick(object sender, System.EventArgs e)
		{
			this.statusBarPanel1.Text = DateTime.Now.ToLongDateString()+" "+DateTime.Now.ToLongTimeString();
		}
		#endregion

		#region 状态栏处理=============================================
		private void StatusBar()
		{
			this.statusBarPanel2.Text = "作者:陈志峰 sunboy@sun188.com";
			this.statusBarPanel3.Text = "阳光商务在线 http://www.sun188.com";
		}
		#endregion	

		#region 设置最小化关闭按钮=====================================
		/// <summary>
		/// 设置最小化关闭按钮
		/// </summary>
		/// <param name="buttonType">1.btnMin 2.btnClose</param>
		private void DrawButton(int buttonType)
		{				
			switch(buttonType)
			{
				case 1:
					if(btnMinMouseOver)
					{
						if(btnMinMouseDown)
						{
							this.btnMinBmp = new Bitmap("images/btnMinDown.jpg");
						}
						else
						{
							this.btnMinBmp = new Bitmap("images/btnMinOver.jpg");
						}
					}
					else
					{
						this.btnMinBmp = new Bitmap("images/btnMin.jpg");
					}
					break;
				case 2:
					if(btnCloseMouseOver)
					{
						if(btnCloseMouseDown)
						{
							this.btnCloseBmp = new Bitmap("images/btnCloseDown.jpg");
						}
						else
						{
							this.btnCloseBmp = new Bitmap("images/btnCloseOver.jpg");
						}
					}
					else
					{
						this.btnCloseBmp = new Bitmap("images/btnClose.jpg");
					}
					break;
			}
			//邦定按钮图片
			this.btnMin.Image = this.btnMinBmp;
			this.btnClose.Image = this.btnCloseBmp;		
			
		}
		#endregion
	
		#region 最小化,关闭按钮事件处理================================
		private void btnMin_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
		{
			this.btnMinMouseOver = true;
			this.DrawButton(1);
		}

		private void btnMin_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
		{
			this.btnMinMouseDown = true;
			this.DrawButton(1);			
		}
		private void btnMin_MouseLeave(object sender, System.EventArgs e)
		{
			this.btnMinMouseOver = false;
			this.btnMinMouseDown = false;
			this.DrawButton(1);
		}
		private void btnMin_Click(object sender, System.EventArgs e)
		{
			MainForm.ActiveForm.WindowState=FormWindowState.Minimized;
		}
		private void btnClose_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
		{
			this.btnCloseMouseOver = true;
			this.DrawButton(2);

		}
		private void btnClose_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
		{
			this.btnCloseMouseDown = true;
			this.DrawButton(2);			
		}
		private void btnClose_MouseLeave(object sender, System.EventArgs e)
		{
			this.btnCloseMouseOver = false;
			this.btnCloseMouseDown = false;
			this.DrawButton(2);
		}
		private void btnClose_Click(object sender, System.EventArgs e)
		{
			this.timerHide.Enabled = true;
		}		
		#endregion			

		#region 读取相关的网页=========================================
		/// <summary>
		/// 读取相关的网页
		/// </summary>
		private void ReadUrl()
		{
			object refObject = "";
			string page = "\\Readme\\SoftwareInfo\\index.htm";
			if(type==2)
			{
				page = "\\Readme\\index.htm";
				this.lbTitle.Text = "开发文档资料";
			}
			string url = Application.StartupPath.ToString()+page;
			this.wbBrow.Navigate(url,ref refObject,ref refObject,ref refObject,ref refObject);
		}
		#endregion	

		#region 窗口淡入淡出特效处理===================================
		private void timerHide_Tick(object sender, System.EventArgs e)
		{
			this.hideForm -= 0.2;
			this.Opacity = this.hideForm;
			if(this.hideForm <= 0)
			{
				this.timerHide.Enabled = false;
				this.Close();
			}
		}

		private void timerShow_Tick(object sender, System.EventArgs e)
		{
			this.showForm += 0.2;
			this.Opacity = this.showForm;
			if(this.showForm >= 1)
			{
				this.timerShow.Enabled = false;
			}
		}
		#endregion	
		
	}
}

⌨️ 快捷键说明

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