📄 form2.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace SKXT
{
/// <summary>
/// Form2 的摘要说明。
/// </summary>
public class Form2 : System.Windows.Forms.Form
{
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.RadioButton radioButton1;
private System.Windows.Forms.RadioButton radioButton2;
private System.Windows.Forms.DateTimePicker dateTimePicker1;
private System.Windows.Forms.DateTimePicker dateTimePicker2;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label7;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.Label label8;
public string flag;
public string kzb;
public Form2()
{
//
// 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()
{
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.radioButton1 = new System.Windows.Forms.RadioButton();
this.radioButton2 = new System.Windows.Forms.RadioButton();
this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
this.dateTimePicker2 = new System.Windows.Forms.DateTimePicker();
this.button2 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.label6 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.label8 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// label1
//
this.label1.BackColor = System.Drawing.Color.CadetBlue;
this.label1.Font = new System.Drawing.Font("黑体", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label1.Location = new System.Drawing.Point(0, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(536, 32);
this.label1.TabIndex = 1;
this.label1.Text = " 数 据 上 报";
//
// label2
//
this.label2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label2.Location = new System.Drawing.Point(8, 64);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(128, 24);
this.label2.TabIndex = 2;
this.label2.Text = " > 阅读程序说明";
//
// label5
//
this.label5.Location = new System.Drawing.Point(8, 184);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(128, 24);
this.label5.TabIndex = 7;
this.label5.Text = " > 生成数据文件";
//
// label4
//
this.label4.Location = new System.Drawing.Point(8, 144);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(128, 24);
this.label4.TabIndex = 6;
this.label4.Text = " > 选择保存地址";
this.label4.Click += new System.EventHandler(this.label4_Click);
//
// label3
//
this.label3.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label3.Location = new System.Drawing.Point(8, 104);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(128, 24);
this.label3.TabIndex = 5;
this.label3.Text = " > 选择上传数据";
//
// radioButton1
//
this.radioButton1.Location = new System.Drawing.Point(152, 56);
this.radioButton1.Name = "radioButton1";
this.radioButton1.Size = new System.Drawing.Size(184, 24);
this.radioButton1.TabIndex = 8;
this.radioButton1.Text = "水库基本情况表(考证表)";
this.radioButton1.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);
//
// radioButton2
//
this.radioButton2.Location = new System.Drawing.Point(152, 96);
this.radioButton2.Name = "radioButton2";
this.radioButton2.Size = new System.Drawing.Size(184, 32);
this.radioButton2.TabIndex = 9;
this.radioButton2.Text = "观测记录";
this.radioButton2.CheckedChanged += new System.EventHandler(this.radioButton2_CheckedChanged);
//
// dateTimePicker1
//
this.dateTimePicker1.Location = new System.Drawing.Point(264, 168);
this.dateTimePicker1.Name = "dateTimePicker1";
this.dateTimePicker1.Size = new System.Drawing.Size(120, 21);
this.dateTimePicker1.TabIndex = 10;
//
// dateTimePicker2
//
this.dateTimePicker2.Location = new System.Drawing.Point(264, 208);
this.dateTimePicker2.Name = "dateTimePicker2";
this.dateTimePicker2.Size = new System.Drawing.Size(120, 21);
this.dateTimePicker2.TabIndex = 11;
//
// button2
//
this.button2.Location = new System.Drawing.Point(400, 280);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(64, 24);
this.button2.TabIndex = 13;
this.button2.Text = "下一步>";
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// button1
//
this.button1.Location = new System.Drawing.Point(304, 280);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(64, 24);
this.button1.TabIndex = 12;
this.button1.Text = "<上一步";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// label6
//
this.label6.Location = new System.Drawing.Point(184, 168);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(64, 16);
this.label6.TabIndex = 14;
this.label6.Text = "起始日期";
//
// label7
//
this.label7.Location = new System.Drawing.Point(184, 208);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(64, 16);
this.label7.TabIndex = 15;
this.label7.Text = "结束日期";
//
// comboBox1
//
this.comboBox1.Items.AddRange(new object[] {
"水库编码",
"坝面竖向位移-考证表",
"坝面水平位移-考证表",
"测压管考证表",
"电磁式、干簧管式沉降仪测管理埋设考证表",
"电磁式、干簧管式沉降仪测管理考证——主表",
"电位器式位移计埋设考证表",
"量水堰考证表",
"水管式沉降仪考证表"});
this.comboBox1.Location = new System.Drawing.Point(280, 144);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(144, 20);
this.comboBox1.TabIndex = 16;
this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
//
// label8
//
this.label8.Location = new System.Drawing.Point(152, 144);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(128, 24);
this.label8.TabIndex = 17;
this.label8.Text = "请选择要导出的考证表";
//
// Form2
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(528, 333);
this.Controls.Add(this.label8);
this.Controls.Add(this.comboBox1);
this.Controls.Add(this.label7);
this.Controls.Add(this.label6);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.dateTimePicker2);
this.Controls.Add(this.dateTimePicker1);
this.Controls.Add(this.radioButton2);
this.Controls.Add(this.radioButton1);
this.Controls.Add(this.label5);
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Name = "Form2";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "数据上报";
this.Load += new System.EventHandler(this.Form2_Load);
this.ResumeLayout(false);
}
#endregion
private void Form2_Load(object sender, System.EventArgs e)
{
radioButton1.Checked=true;
}
private void button1_Click(object sender, System.EventArgs e)
{
this.Visible = false;
Form1 f1=new Form1();
f1.Show();
}
private void button2_Click(object sender, System.EventArgs e)
{
if(radioButton1.Checked==true)
{
flag="1";
}
else
{
flag="0";
}
kzb=comboBox1.Text;
this.Visible = false;
Form3 f3=new Form3(flag,kzb);
f3.Show();
}
private void radioButton1_CheckedChanged(object sender, System.EventArgs e)
{
label6.Visible=false;
label7.Visible=false;
label8.Visible=true;
dateTimePicker1.Visible=false;
dateTimePicker2.Visible=false;
comboBox1.Visible=true;
}
private void radioButton2_CheckedChanged(object sender, System.EventArgs e)
{
label6.Visible=true;
label7.Visible=true;
label8.Visible=false;
dateTimePicker1.Visible=true;
dateTimePicker2.Visible=true;
comboBox1.Visible=false;
}
private void label4_Click(object sender, System.EventArgs e)
{
}
private void comboBox1_SelectedIndexChanged(object sender, System.EventArgs e)
{
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -