?? dataio.cs
字號:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace Railroad_Trip
{
/// <summary>
/// DataIO 的摘要說明。
/// </summary>
public class DataIO : System.Windows.Forms.Form
{
private System.Windows.Forms.Label lblhtml;
private System.Windows.Forms.Label lblexcel;
private System.Windows.Forms.Label lbltxt;
private System.Windows.Forms.Label lblMin;
private System.Windows.Forms.Label lblClose;
/// <summary>
/// 必需的設計器變量。
/// </summary>
private System.ComponentModel.Container components = null;
public DataIO()
{
//
// Windows 窗體設計器支持所必需的
//
InitializeComponent();
//
// 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(DataIO));
this.lblhtml = new System.Windows.Forms.Label();
this.lblexcel = new System.Windows.Forms.Label();
this.lbltxt = new System.Windows.Forms.Label();
this.lblMin = new System.Windows.Forms.Label();
this.lblClose = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// lblhtml
//
this.lblhtml.BackColor = System.Drawing.Color.Transparent;
this.lblhtml.Cursor = System.Windows.Forms.Cursors.Hand;
this.lblhtml.Location = new System.Drawing.Point(4, 138);
this.lblhtml.Name = "lblhtml";
this.lblhtml.Size = new System.Drawing.Size(138, 16);
this.lblhtml.TabIndex = 27;
this.lblhtml.Click += new System.EventHandler(this.lblhtml_Click);
//
// lblexcel
//
this.lblexcel.BackColor = System.Drawing.Color.Transparent;
this.lblexcel.Cursor = System.Windows.Forms.Cursors.Hand;
this.lblexcel.Location = new System.Drawing.Point(4, 118);
this.lblexcel.Name = "lblexcel";
this.lblexcel.Size = new System.Drawing.Size(138, 16);
this.lblexcel.TabIndex = 26;
this.lblexcel.Click += new System.EventHandler(this.lblexcel_Click);
//
// lbltxt
//
this.lbltxt.BackColor = System.Drawing.Color.Transparent;
this.lbltxt.Cursor = System.Windows.Forms.Cursors.Hand;
this.lbltxt.Location = new System.Drawing.Point(4, 98);
this.lbltxt.Name = "lbltxt";
this.lbltxt.Size = new System.Drawing.Size(138, 16);
this.lbltxt.TabIndex = 25;
this.lbltxt.Click += new System.EventHandler(this.lbltxt_Click);
//
// lblMin
//
this.lblMin.BackColor = System.Drawing.Color.Transparent;
this.lblMin.Location = new System.Drawing.Point(100, 4);
this.lblMin.Name = "lblMin";
this.lblMin.Size = new System.Drawing.Size(18, 16);
this.lblMin.TabIndex = 28;
this.lblMin.Click += new System.EventHandler(this.lblMin_Click);
//
// lblClose
//
this.lblClose.BackColor = System.Drawing.Color.Transparent;
this.lblClose.Location = new System.Drawing.Point(122, 4);
this.lblClose.Name = "lblClose";
this.lblClose.Size = new System.Drawing.Size(16, 16);
this.lblClose.TabIndex = 29;
this.lblClose.Click += new System.EventHandler(this.lblClose_Click);
//
// DataIO
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.BackColor = System.Drawing.Color.White;
this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
this.ClientSize = new System.Drawing.Size(146, 224);
this.Controls.Add(this.lblClose);
this.Controls.Add(this.lblMin);
this.Controls.Add(this.lblhtml);
this.Controls.Add(this.lblexcel);
this.Controls.Add(this.lbltxt);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.Name = "DataIO";
this.Text = "數據導出";
this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.DataIO_MouseDown);
this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.DataIO_MouseMove);
this.ResumeLayout(false);
}
#endregion
//縮小
private void lblMin_Click(object sender, System.EventArgs e)
{
this.WindowState= FormWindowState.Minimized;
}
//關閉
private void lblClose_Click(object sender, System.EventArgs e)
{
this.Dispose();
}
//導出為txt
private void lbltxt_Click(object sender, System.EventArgs e)
{
}
//導出為excel
private void lblexcel_Click(object sender, System.EventArgs e)
{
}
//導出為html
private void lblhtml_Click(object sender, System.EventArgs e)
{
}
private bool isclick=false;
Point oldpoint=new Point(0,0);//界面的初始焦點
private void DataIO_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
if(isclick)
{
Point newpoint=new Point(this.Location.X,this.Location.Y);
newpoint.X=this.Location.X+e.X-oldpoint.X;
newpoint.Y=this.Location.Y+e.Y-oldpoint.Y;
this.Location=newpoint;
}
}
private void DataIO_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
if(isclick)
{
isclick=false;
}
else
{
isclick=true;
oldpoint.X=e.X;
oldpoint.Y=e.Y;
}
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -