📄 confirmsave.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace WindowsApplication3
{
/// <summary>
/// ConfirmSave 的摘要说明。
/// </summary>
public class ConfirmSave : System.Windows.Forms.Form
{
public static string scjgCD = "";
private System.Windows.Forms.Label label1;
public static bool hasPass = false;
private System.Windows.Forms.RadioButton rb1;
private System.Windows.Forms.RadioButton rb2;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.PictureBox pictureBox2;
private System.Windows.Forms.GroupBox groupBox1;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public ConfirmSave()
{
//
// 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(ConfirmSave));
this.rb1 = new System.Windows.Forms.RadioButton();
this.label1 = new System.Windows.Forms.Label();
this.rb2 = new System.Windows.Forms.RadioButton();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// rb1
//
this.rb1.BackColor = System.Drawing.Color.Transparent;
this.rb1.Location = new System.Drawing.Point(32, 24);
this.rb1.Name = "rb1";
this.rb1.Size = new System.Drawing.Size(88, 24);
this.rb1.TabIndex = 0;
this.rb1.Text = "审核无误";
//
// label1
//
this.label1.BackColor = System.Drawing.Color.Transparent;
this.label1.ForeColor = System.Drawing.Color.Red;
this.label1.Location = new System.Drawing.Point(16, 32);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(320, 32);
this.label1.TabIndex = 1;
this.label1.Text = "你所需要存储的数据没有进行审核,请确定一个审核结论:";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// rb2
//
this.rb2.BackColor = System.Drawing.Color.Transparent;
this.rb2.ForeColor = System.Drawing.SystemColors.ControlText;
this.rb2.Location = new System.Drawing.Point(152, 24);
this.rb2.Name = "rb2";
this.rb2.Size = new System.Drawing.Size(88, 24);
this.rb2.TabIndex = 2;
this.rb2.Text = "查无此人";
//
// pictureBox1
//
this.pictureBox1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBox1.BackgroundImage")));
this.pictureBox1.Location = new System.Drawing.Point(168, 192);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(56, 24);
this.pictureBox1.TabIndex = 4;
this.pictureBox1.TabStop = false;
this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click);
this.pictureBox1.MouseEnter += new System.EventHandler(this.pictureBox1_MouseEnter);
this.pictureBox1.MouseLeave += new System.EventHandler(this.pictureBox1_MouseLeave);
//
// pictureBox2
//
this.pictureBox2.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBox2.BackgroundImage")));
this.pictureBox2.Location = new System.Drawing.Point(248, 192);
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new System.Drawing.Size(56, 24);
this.pictureBox2.TabIndex = 5;
this.pictureBox2.TabStop = false;
this.pictureBox2.Click += new System.EventHandler(this.pictureBox2_Click);
this.pictureBox2.MouseEnter += new System.EventHandler(this.pictureBox2_MouseEnter);
this.pictureBox2.MouseLeave += new System.EventHandler(this.pictureBox2_MouseLeave);
//
// groupBox1
//
this.groupBox1.BackColor = System.Drawing.Color.Transparent;
this.groupBox1.Controls.Add(this.rb2);
this.groupBox1.Controls.Add(this.rb1);
this.groupBox1.Location = new System.Drawing.Point(32, 104);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(272, 64);
this.groupBox1.TabIndex = 6;
this.groupBox1.TabStop = false;
//
// ConfirmSave
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
this.ClientSize = new System.Drawing.Size(354, 256);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.pictureBox2);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.label1);
this.ForeColor = System.Drawing.SystemColors.ControlText;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "ConfirmSave";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "信息存储窗口";
this.Load += new System.EventHandler(this.ConfirmSave_Load);
this.groupBox1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private void ConfirmSave_Load(object sender, System.EventArgs e)
{
rb1.Checked = false;
rb2.Checked = false;
}
private void pictureBox1_Click(object sender, System.EventArgs e)
{
if((rb1.Checked == false)&&(rb2.Checked == false))
{
MessageBox.Show("请选择审查结果!");
return;
}
if ( rb1.Checked )
{
hasPass = true;
this.DialogResult = DialogResult.OK;
scjgCD = "审核无误";
}
else
{
hasPass = false;
this.DialogResult = DialogResult.OK;
scjgCD = "查无此人";
}
}
private void pictureBox2_Click(object sender, System.EventArgs e)
{
if ( scjgCD == "")
{
scjgCD = "未经审查";
}
this.DialogResult = DialogResult.Cancel;
}
private void pictureBox2_MouseEnter(object sender, System.EventArgs e)
{
pictureBox2.Image = Image.FromFile( "img\\button-取消02.GIF" );
}
private void pictureBox2_MouseLeave(object sender, System.EventArgs e)
{
pictureBox2.Image = Image.FromFile( "img\\button-取消01.GIF" );
}
private void pictureBox1_MouseEnter(object sender, System.EventArgs e)
{
pictureBox1.Image = Image.FromFile( "img\\button-确定02.GIF" );
}
private void pictureBox1_MouseLeave(object sender, System.EventArgs e)
{
pictureBox1.Image = Image.FromFile( "img\\button-确定01.GIF" );
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -