📄 mainform.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace MainForm
{
/// <summary>
/// Summary description for MainForm.
/// </summary>
public class MainForm : System.Windows.Forms.Form
{
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Button btnQuery;
private System.Windows.Forms.Button btnIE;
private System.Windows.Forms.Button btnChart;
private System.Windows.Forms.Button btnAd;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public MainForm()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
[STAThread]
static void Main()
{
//Application.Run(new Form1());
Application.Run(new MainForm());
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.btnQuery = new System.Windows.Forms.Button();
this.btnIE = new System.Windows.Forms.Button();
this.btnChart = new System.Windows.Forms.Button();
this.btnAd = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// btnQuery
//
this.btnQuery.Location = new System.Drawing.Point(48, 32);
this.btnQuery.Name = "btnQuery";
this.btnQuery.Size = new System.Drawing.Size(144, 23);
this.btnQuery.TabIndex = 0;
this.btnQuery.Text = "Common &Query";
this.btnQuery.Click += new System.EventHandler(this.btnQuery_Click);
//
// btnIE
//
this.btnIE.Location = new System.Drawing.Point(48, 80);
this.btnIE.Name = "btnIE";
this.btnIE.Size = new System.Drawing.Size(144, 23);
this.btnIE.TabIndex = 1;
this.btnIE.Text = "Common &Import/Export";
this.btnIE.Click += new System.EventHandler(this.btnIE_Click);
//
// btnChart
//
this.btnChart.Location = new System.Drawing.Point(48, 120);
this.btnChart.Name = "btnChart";
this.btnChart.Size = new System.Drawing.Size(144, 23);
this.btnChart.TabIndex = 2;
this.btnChart.Text = "Common &Chart";
this.btnChart.Click += new System.EventHandler(this.btnChart_Click);
//
// btnAd
//
this.btnAd.Location = new System.Drawing.Point(48, 168);
this.btnAd.Name = "btnAd";
this.btnAd.Size = new System.Drawing.Size(144, 23);
this.btnAd.TabIndex = 3;
this.btnAd.Text = "&Ad Services";
this.btnAd.Click += new System.EventHandler(this.btnAd_Click);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.btnIE);
this.groupBox1.Controls.Add(this.btnChart);
this.groupBox1.Controls.Add(this.btnQuery);
this.groupBox1.Controls.Add(this.btnAd);
this.groupBox1.Location = new System.Drawing.Point(24, 24);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(240, 216);
this.groupBox1.TabIndex = 4;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Test Common Component";
//
// MainForm
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(292, 269);
this.Controls.Add(this.groupBox1);
this.Name = "MainForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "MainForm";
this.Load += new System.EventHandler(this.MainForm_Load);
this.groupBox1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private void MainForm_Load(object sender, System.EventArgs e)
{
}
private void btnQuery_Click(object sender, System.EventArgs e)
{
TestCommonQuery.TestCommonQueryForm query = new TestCommonQuery.TestCommonQueryForm();
query.Show();
}
private void btnIE_Click(object sender, System.EventArgs e)
{
TestCommonIE.TestCommonIEForm export = new TestCommonIE.TestCommonIEForm();
export.Show();
}
private void btnChart_Click(object sender, System.EventArgs e)
{
TestCommonChart.TestCommonChartForm chartForm = new TestCommonChart.TestCommonChartForm();
chartForm.Show();
}
private void btnAd_Click(object sender, System.EventArgs e)
{
TestAdServices.TestAdServicesForm adForm = new TestAdServices.TestAdServicesForm();
adForm.Show();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -