using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace Core.LgMes.Client.LgJobMgt { public partial class frmCvtOperate : Form { public frmCvtOperate() { InitializeComponent(); } #region " Valiable " private int checkedNo = 0; public int SelectedNo = 0; public int InitNo = 0; public string Van = ""; #endregion private void frmCvtOperate_Load(object sender, EventArgs e) { //提钒 if (Van == "V") { rdbtnCas1.Enabled = false; rdbtnCas2.Enabled = false; rdbtnCas3.Enabled = false; rbGBL1.Enabled = false; rbGBL2.Enabled = false; rbQZJS.Enabled = false; } switch (InitNo) { case 0: if (this.rbDG.Checked) rbDG_CheckedChanged(this.rbDG, new System.EventArgs()); else this.rbDG.Checked = true; break; case 1: if (this.rbXDGX.Checked) rbXDGX_CheckedChanged(this.rbXDGX, new System.EventArgs()); else this.rbXDGX.Checked = true; this.rbDG.Enabled = false; break; } } /// /// 倒钢 /// /// /// private void rbDG_CheckedChanged(object sender, EventArgs e) { if (this.rbDG.Checked) { ClearChecked(this.rbDG); checkedNo = 1; } } /// /// 下道工序 /// /// /// private void rbXDGX_CheckedChanged(object sender, EventArgs e) { if (this.rbXDGX.Checked) { ClearChecked(this.rbXDGX); checkedNo = 2; } } private void ClearChecked(RadioButton rb) { if (this.rbDG.Checked && this.rbDG.Text != rb.Text) this.rbDG.Checked = false; if (this.rbXDGX.Checked && this.rbXDGX.Text != rb.Text) this.rbXDGX.Checked = false; if (this.rbGBL1.Checked && this.rbGBL1.Text != rb.Text) this.rbGBL1.Checked = false; if (this.rbGBL2.Checked && this.rbGBL2.Text != rb.Text) this.rbGBL2.Checked = false; if (this.rdbtnCas1.Checked && this.rdbtnCas1.Text != rb.Text) this.rdbtnCas1.Checked = false; if (this.rdbtnCas2.Checked && this.rdbtnCas2.Text != rb.Text) this.rdbtnCas2.Checked = false; if (this.rdbtnCas3.Checked && this.rdbtnCas3.Text != rb.Text) this.rdbtnCas3.Checked = false; if (this.rdbtnRhs1.Checked && this.rdbtnRhs1.Text != rb.Text) this.rdbtnRhs1.Checked = false; if (this.rbQZJS.Checked && this.rbQZJS.Text != rb.Text) this.rbQZJS.Checked = false; } // 1#精炼炉 private void rbGBL1_CheckedChanged(object sender, EventArgs e) { if (this.rbGBL1.Checked) { ClearChecked(this.rbGBL1); checkedNo = 6; } } // 2#精炼炉 private void rbGBL2_CheckedChanged(object sender, EventArgs e) { if (this.rbGBL2.Checked) { ClearChecked(this.rbGBL2); checkedNo = 7; } } // 强制结束 private void rbQZJS_CheckedChanged(object sender, EventArgs e) { if (this.rbQZJS.Checked) { ClearChecked(this.rbQZJS); checkedNo = 8; } } private void btnOk_Click(object sender, EventArgs e) { this.SelectedNo = this.checkedNo; this.Close(); } private void btnNo_Click(object sender, EventArgs e) { this.Close(); } // 1#吹氩 private void rdbtnCas1_CheckedChanged(object sender, EventArgs e) { if (rdbtnCas1.Checked) { ClearChecked(rdbtnCas1); checkedNo = 3; } } // 2#吹氩 private void rdbtnCas2_CheckedChanged(object sender, EventArgs e) { if (rdbtnCas2.Checked) { ClearChecked(rdbtnCas2); checkedNo = 4; } } // 3#吹氩 private void rdbtnCas3_CheckedChanged(object sender, EventArgs e) { if (rdbtnCas3.Checked) { ClearChecked(rdbtnCas3); checkedNo = 5; } } private void rdbtnRhs1_CheckedChanged(object sender, EventArgs e) { if (rdbtnRhs1.Checked) { ClearChecked(rdbtnRhs1); checkedNo = 9; } } } }