📄 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 + -