using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; namespace Core.StlMes.Client.LgResMgt { /// /// FrmSelDel 的摘要说明。 /// public class FrmSelDel : System.Windows.Forms.Form { private System.Windows.Forms.Button button1; private System.Windows.Forms.Button button2; private System.Windows.Forms.Button button3; private System.Windows.Forms.ToolTip toolTip1; private Button button4; private NumericUpDown numericUpDown1; private Label label2; private Label label3; private GroupBox groupBox1; private Label label1; private System.ComponentModel.IContainer components; public FrmSelDel() { // // Windows 窗体设计器支持所必需的 // InitializeComponent(); // // TODO: 在 InitializeComponent 调用后添加任何构造函数代码 // } /// /// 清理所有正在使用的资源。 /// protected override void Dispose( bool disposing ) { if( disposing ) { if(components != null) { components.Dispose(); } } base.Dispose( disposing ); } #region Windows 窗体设计器生成的代码 /// /// 设计器支持所需的方法 - 不要使用代码编辑器修改 /// 此方法的内容。 /// private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.button1 = new System.Windows.Forms.Button(); this.button2 = new System.Windows.Forms.Button(); this.button3 = new System.Windows.Forms.Button(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.button4 = new System.Windows.Forms.Button(); this.numericUpDown1 = new System.Windows.Forms.NumericUpDown(); this.label2 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.label1 = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit(); this.groupBox1.SuspendLayout(); this.SuspendLayout(); // // button1 // this.button1.Location = new System.Drawing.Point(19, 34); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(104, 23); this.button1.TabIndex = 0; this.button1.Text = "删除所选行"; this.toolTip1.SetToolTip(this.button1, "删除当前选择的行"); this.button1.Click += new System.EventHandler(this.button1_Click); // // button2 // this.button2.Location = new System.Drawing.Point(146, 34); this.button2.Name = "button2"; this.button2.Size = new System.Drawing.Size(98, 23); this.button2.TabIndex = 1; this.button2.Text = "删除所选炉号"; this.toolTip1.SetToolTip(this.button2, "删除该炉号的所有数据"); this.button2.Click += new System.EventHandler(this.button2_Click); // // button3 // this.button3.Location = new System.Drawing.Point(307, 9); this.button3.Name = "button3"; this.button3.Size = new System.Drawing.Size(120, 40); this.button3.TabIndex = 2; this.button3.Text = "取消"; this.toolTip1.SetToolTip(this.button3, "取消"); this.button3.Click += new System.EventHandler(this.button3_Click); // // button4 // this.button4.Location = new System.Drawing.Point(269, 33); this.button4.Name = "button4"; this.button4.Size = new System.Drawing.Size(104, 24); this.button4.TabIndex = 3; this.button4.Text = "删除所选支数"; this.toolTip1.SetToolTip(this.button4, "取消"); this.button4.Click += new System.EventHandler(this.button4_Click); // // numericUpDown1 // this.numericUpDown1.Location = new System.Drawing.Point(388, 35); this.numericUpDown1.Name = "numericUpDown1"; this.numericUpDown1.Size = new System.Drawing.Size(56, 21); this.numericUpDown1.TabIndex = 4; // // label2 // this.label2.Font = new System.Drawing.Font("宋体", 10F); this.label2.ForeColor = System.Drawing.Color.Red; this.label2.Location = new System.Drawing.Point(28, 151); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(383, 34); this.label2.TabIndex = 5; this.label2.Text = "说明:删除所选支数,删除的是所选炉号的最新生成的支数"; this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // label3 // this.label3.Font = new System.Drawing.Font("宋体", 11F); this.label3.Location = new System.Drawing.Point(43, 9); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(82, 40); this.label3.TabIndex = 7; this.label3.Text = "所选炉号:"; this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // groupBox1 // this.groupBox1.Controls.Add(this.button1); this.groupBox1.Controls.Add(this.button2); this.groupBox1.Controls.Add(this.button4); this.groupBox1.Controls.Add(this.numericUpDown1); this.groupBox1.Location = new System.Drawing.Point(12, 64); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(460, 74); this.groupBox1.TabIndex = 8; this.groupBox1.TabStop = false; this.groupBox1.Text = "选择删除方式:"; // // label1 // this.label1.Font = new System.Drawing.Font("宋体", 11F, System.Drawing.FontStyle.Bold); this.label1.ForeColor = System.Drawing.Color.Blue; this.label1.Location = new System.Drawing.Point(119, 8); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(97, 40); this.label1.TabIndex = 9; this.label1.Text = "13300000"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // FrmSelDel // this.AutoScaleBaseSize = new System.Drawing.Size(6, 14); this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(205)))), ((int)(((byte)(228)))), ((int)(((byte)(225))))); this.ClientSize = new System.Drawing.Size(495, 194); this.Controls.Add(this.label1); this.Controls.Add(this.button3); this.Controls.Add(this.groupBox1); this.Controls.Add(this.label3); this.Controls.Add(this.label2); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "FrmSelDel"; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; this.Text = "删除"; this.Load += new System.EventHandler(this.FrmSelDel_Load); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit(); this.groupBox1.ResumeLayout(false); this.ResumeLayout(false); } #endregion public string _Flag = "D"; public string heatno = ""; public int codeCount = 0; private void button1_Click(object sender, System.EventArgs e) { _Flag = "A"; this.Close(); } private void button2_Click(object sender, System.EventArgs e) { _Flag = "B"; this.Close(); } private void button4_Click(object sender, EventArgs e) { _Flag = "C"; try { codeCount = Convert.ToInt16(numericUpDown1.Value); } catch { MessageBox.Show("支数必须是大于零的整数!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); return; } if (codeCount <= 0) { MessageBox.Show("支数必须是大于零的整数!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); return; } this.Close(); } private void button3_Click(object sender, System.EventArgs e) { _Flag = "D"; this.Close(); } private void FrmSelDel_Load(object sender, EventArgs e) { label1.Text = heatno; } } }