frmCvtOperate.cs 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Text;
  7. using System.Windows.Forms;
  8. namespace Core.LgMes.Client.LgJobMgt
  9. {
  10. public partial class frmCvtOperate : Form
  11. {
  12. public frmCvtOperate()
  13. {
  14. InitializeComponent();
  15. }
  16. #region " Valiable "
  17. private int checkedNo = 0;
  18. public int SelectedNo = 0;
  19. public int InitNo = 0;
  20. public string Van = "";
  21. #endregion
  22. private void frmCvtOperate_Load(object sender, EventArgs e)
  23. {
  24. //提钒
  25. if (Van == "V")
  26. {
  27. rdbtnCas1.Enabled = false;
  28. rdbtnCas2.Enabled = false;
  29. rdbtnCas3.Enabled = false;
  30. rbGBL1.Enabled = false;
  31. rbGBL2.Enabled = false;
  32. rbQZJS.Enabled = false;
  33. }
  34. switch (InitNo)
  35. {
  36. case 0:
  37. if (this.rbDG.Checked)
  38. rbDG_CheckedChanged(this.rbDG, new System.EventArgs());
  39. else
  40. this.rbDG.Checked = true;
  41. break;
  42. case 1:
  43. if (this.rbXDGX.Checked)
  44. rbXDGX_CheckedChanged(this.rbXDGX, new System.EventArgs());
  45. else
  46. this.rbXDGX.Checked = true;
  47. this.rbDG.Enabled = false;
  48. break;
  49. }
  50. }
  51. /// <summary>
  52. /// 倒钢
  53. /// </summary>
  54. /// <param name="sender"></param>
  55. /// <param name="e"></param>
  56. private void rbDG_CheckedChanged(object sender, EventArgs e)
  57. {
  58. if (this.rbDG.Checked)
  59. {
  60. ClearChecked(this.rbDG);
  61. checkedNo = 1;
  62. }
  63. }
  64. /// <summary>
  65. /// 下道工序
  66. /// </summary>
  67. /// <param name="sender"></param>
  68. /// <param name="e"></param>
  69. private void rbXDGX_CheckedChanged(object sender, EventArgs e)
  70. {
  71. if (this.rbXDGX.Checked)
  72. {
  73. ClearChecked(this.rbXDGX);
  74. checkedNo = 2;
  75. }
  76. }
  77. private void ClearChecked(RadioButton rb)
  78. {
  79. if (this.rbDG.Checked && this.rbDG.Text != rb.Text)
  80. this.rbDG.Checked = false;
  81. if (this.rbXDGX.Checked && this.rbXDGX.Text != rb.Text)
  82. this.rbXDGX.Checked = false;
  83. if (this.rbGBL1.Checked && this.rbGBL1.Text != rb.Text)
  84. this.rbGBL1.Checked = false;
  85. if (this.rbGBL2.Checked && this.rbGBL2.Text != rb.Text)
  86. this.rbGBL2.Checked = false;
  87. if (this.rdbtnCas1.Checked && this.rdbtnCas1.Text != rb.Text)
  88. this.rdbtnCas1.Checked = false;
  89. if (this.rdbtnCas2.Checked && this.rdbtnCas2.Text != rb.Text)
  90. this.rdbtnCas2.Checked = false;
  91. if (this.rdbtnCas3.Checked && this.rdbtnCas3.Text != rb.Text)
  92. this.rdbtnCas3.Checked = false;
  93. if (this.rdbtnRhs1.Checked && this.rdbtnRhs1.Text != rb.Text)
  94. this.rdbtnRhs1.Checked = false;
  95. if (this.rbQZJS.Checked && this.rbQZJS.Text != rb.Text)
  96. this.rbQZJS.Checked = false;
  97. }
  98. // 1#精炼炉
  99. private void rbGBL1_CheckedChanged(object sender, EventArgs e)
  100. {
  101. if (this.rbGBL1.Checked)
  102. {
  103. ClearChecked(this.rbGBL1);
  104. checkedNo = 6;
  105. }
  106. }
  107. // 2#精炼炉
  108. private void rbGBL2_CheckedChanged(object sender, EventArgs e)
  109. {
  110. if (this.rbGBL2.Checked)
  111. {
  112. ClearChecked(this.rbGBL2);
  113. checkedNo = 7;
  114. }
  115. }
  116. // 强制结束
  117. private void rbQZJS_CheckedChanged(object sender, EventArgs e)
  118. {
  119. if (this.rbQZJS.Checked)
  120. {
  121. ClearChecked(this.rbQZJS);
  122. checkedNo = 8;
  123. }
  124. }
  125. private void btnOk_Click(object sender, EventArgs e)
  126. {
  127. this.SelectedNo = this.checkedNo;
  128. this.Close();
  129. }
  130. private void btnNo_Click(object sender, EventArgs e)
  131. {
  132. this.Close();
  133. }
  134. // 1#吹氩
  135. private void rdbtnCas1_CheckedChanged(object sender, EventArgs e)
  136. {
  137. if (rdbtnCas1.Checked)
  138. {
  139. ClearChecked(rdbtnCas1);
  140. checkedNo = 3;
  141. }
  142. }
  143. // 2#吹氩
  144. private void rdbtnCas2_CheckedChanged(object sender, EventArgs e)
  145. {
  146. if (rdbtnCas2.Checked)
  147. {
  148. ClearChecked(rdbtnCas2);
  149. checkedNo = 4;
  150. }
  151. }
  152. // 3#吹氩
  153. private void rdbtnCas3_CheckedChanged(object sender, EventArgs e)
  154. {
  155. if (rdbtnCas3.Checked)
  156. {
  157. ClearChecked(rdbtnCas3);
  158. checkedNo = 5;
  159. }
  160. }
  161. private void rdbtnRhs1_CheckedChanged(object sender, EventArgs e)
  162. {
  163. if (rdbtnRhs1.Checked)
  164. {
  165. ClearChecked(rdbtnRhs1);
  166. checkedNo = 9;
  167. }
  168. }
  169. }
  170. }