| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197 |
- 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;
- }
- }
- /// <summary>
- /// 倒钢
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void rbDG_CheckedChanged(object sender, EventArgs e)
- {
- if (this.rbDG.Checked)
- {
- ClearChecked(this.rbDG);
- checkedNo = 1;
- }
- }
- /// <summary>
- /// 下道工序
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- 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;
- }
- }
- }
- }
|