FrmCcmResetStatus.cs 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. using System;
  2. using System.Drawing;
  3. using System.Collections;
  4. using System.ComponentModel;
  5. using System.Windows.Forms;
  6. namespace Core.StlMes.Client.LgIntegrationQuery
  7. {
  8. /// <summary>
  9. /// FrmCcmResetStatus 的摘要说明。
  10. /// </summary>
  11. public class FrmCcmResetStatus : System.Windows.Forms.Form
  12. {
  13. private System.Windows.Forms.GroupBox groupBox1;
  14. private System.Windows.Forms.RadioButton radioButton1;
  15. private System.Windows.Forms.RadioButton radioButton2;
  16. private System.Windows.Forms.RadioButton radioButton3;
  17. private System.Windows.Forms.RadioButton radioButton4;
  18. private System.Windows.Forms.RadioButton radioButton5;
  19. private System.Windows.Forms.Button btnConfirm;
  20. private System.Windows.Forms.Button button2;
  21. /// <summary>
  22. /// 必需的设计器变量。
  23. /// </summary>
  24. private System.ComponentModel.Container components = null;
  25. public FrmCcmResetStatus()
  26. {
  27. //
  28. // Windows 窗体设计器支持所必需的
  29. //
  30. InitializeComponent();
  31. //
  32. // TODO: 在 InitializeComponent 调用后添加任何构造函数代码
  33. //
  34. }
  35. /// <summary>
  36. /// 清理所有正在使用的资源。
  37. /// </summary>
  38. protected override void Dispose( bool disposing )
  39. {
  40. if( disposing )
  41. {
  42. if(components != null)
  43. {
  44. components.Dispose();
  45. }
  46. }
  47. base.Dispose( disposing );
  48. }
  49. #region Windows 窗体设计器生成的代码
  50. /// <summary>
  51. /// 设计器支持所需的方法 - 不要使用代码编辑器修改
  52. /// 此方法的内容。
  53. /// </summary>
  54. private void InitializeComponent()
  55. {
  56. this.groupBox1 = new System.Windows.Forms.GroupBox();
  57. this.radioButton5 = new System.Windows.Forms.RadioButton();
  58. this.radioButton4 = new System.Windows.Forms.RadioButton();
  59. this.radioButton3 = new System.Windows.Forms.RadioButton();
  60. this.radioButton2 = new System.Windows.Forms.RadioButton();
  61. this.radioButton1 = new System.Windows.Forms.RadioButton();
  62. this.btnConfirm = new System.Windows.Forms.Button();
  63. this.button2 = new System.Windows.Forms.Button();
  64. this.groupBox1.SuspendLayout();
  65. this.SuspendLayout();
  66. //
  67. // groupBox1
  68. //
  69. this.groupBox1.Controls.Add(this.radioButton5);
  70. this.groupBox1.Controls.Add(this.radioButton4);
  71. this.groupBox1.Controls.Add(this.radioButton3);
  72. this.groupBox1.Controls.Add(this.radioButton2);
  73. this.groupBox1.Controls.Add(this.radioButton1);
  74. this.groupBox1.Location = new System.Drawing.Point(24, 12);
  75. this.groupBox1.Name = "groupBox1";
  76. this.groupBox1.Size = new System.Drawing.Size(205, 122);
  77. this.groupBox1.TabIndex = 0;
  78. this.groupBox1.TabStop = false;
  79. this.groupBox1.Text = "去向";
  80. //
  81. // radioButton5
  82. //
  83. this.radioButton5.Location = new System.Drawing.Point(110, 81);
  84. this.radioButton5.Name = "radioButton5";
  85. this.radioButton5.Size = new System.Drawing.Size(64, 24);
  86. this.radioButton5.TabIndex = 5;
  87. this.radioButton5.Tag = "";
  88. this.radioButton5.CheckedChanged += new System.EventHandler(this.radioButton_CheckedChanged);
  89. //
  90. // radioButton4
  91. //
  92. this.radioButton4.Location = new System.Drawing.Point(110, 54);
  93. this.radioButton4.Name = "radioButton4";
  94. this.radioButton4.Size = new System.Drawing.Size(64, 24);
  95. this.radioButton4.TabIndex = 4;
  96. this.radioButton4.Tag = "";
  97. this.radioButton4.CheckedChanged += new System.EventHandler(this.radioButton_CheckedChanged);
  98. //
  99. // radioButton3
  100. //
  101. this.radioButton3.Location = new System.Drawing.Point(110, 27);
  102. this.radioButton3.Name = "radioButton3";
  103. this.radioButton3.Size = new System.Drawing.Size(64, 24);
  104. this.radioButton3.TabIndex = 3;
  105. this.radioButton3.Tag = "";
  106. this.radioButton3.CheckedChanged += new System.EventHandler(this.radioButton_CheckedChanged);
  107. //
  108. // radioButton2
  109. //
  110. this.radioButton2.Location = new System.Drawing.Point(16, 54);
  111. this.radioButton2.Name = "radioButton2";
  112. this.radioButton2.Size = new System.Drawing.Size(64, 24);
  113. this.radioButton2.TabIndex = 2;
  114. this.radioButton2.Tag = "";
  115. this.radioButton2.CheckedChanged += new System.EventHandler(this.radioButton_CheckedChanged);
  116. //
  117. // radioButton1
  118. //
  119. this.radioButton1.Checked = true;
  120. this.radioButton1.Location = new System.Drawing.Point(16, 27);
  121. this.radioButton1.Name = "radioButton1";
  122. this.radioButton1.Size = new System.Drawing.Size(64, 24);
  123. this.radioButton1.TabIndex = 1;
  124. this.radioButton1.TabStop = true;
  125. this.radioButton1.Tag = "";
  126. this.radioButton1.CheckedChanged += new System.EventHandler(this.radioButton_CheckedChanged);
  127. //
  128. // btnConfirm
  129. //
  130. this.btnConfirm.Location = new System.Drawing.Point(29, 153);
  131. this.btnConfirm.Name = "btnConfirm";
  132. this.btnConfirm.Size = new System.Drawing.Size(75, 23);
  133. this.btnConfirm.TabIndex = 1;
  134. this.btnConfirm.Text = "确认";
  135. this.btnConfirm.Click += new System.EventHandler(this.btnConfirm_Click);
  136. //
  137. // button2
  138. //
  139. this.button2.Location = new System.Drawing.Point(134, 153);
  140. this.button2.Name = "button2";
  141. this.button2.Size = new System.Drawing.Size(75, 23);
  142. this.button2.TabIndex = 2;
  143. this.button2.Text = "取消";
  144. this.button2.Click += new System.EventHandler(this.button2_Click);
  145. //
  146. // FrmCcmResetStatus
  147. //
  148. this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
  149. this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(213)))), ((int)(((byte)(228)))), ((int)(((byte)(242)))));
  150. this.ClientSize = new System.Drawing.Size(259, 200);
  151. this.Controls.Add(this.button2);
  152. this.Controls.Add(this.btnConfirm);
  153. this.Controls.Add(this.groupBox1);
  154. this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
  155. this.MaximizeBox = false;
  156. this.MinimizeBox = false;
  157. this.Name = "FrmCcmResetStatus";
  158. this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
  159. this.Text = "设置";
  160. this.Load += new System.EventHandler(this.FrmCcmResetStatus_Load);
  161. this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmCcmResetStatus_FormClosing);
  162. this.groupBox1.ResumeLayout(false);
  163. this.ResumeLayout(false);
  164. }
  165. #endregion
  166. public string WorkShopN0 = ""; //体系号
  167. public string _strSet = "";
  168. public string _strSta = "";
  169. private string str = "";
  170. private void btnConfirm_Click(object sender, System.EventArgs e)
  171. {
  172. _strSet = str;
  173. _strSta = "LADLEARRIVE";
  174. this.Close();
  175. }
  176. private void button2_Click(object sender, System.EventArgs e)
  177. {
  178. _strSet = "";
  179. _strSta = "";
  180. this.Close();
  181. }
  182. private void radioButton_CheckedChanged(object sender, System.EventArgs e)
  183. {
  184. this.str = ((RadioButton)sender).Tag.ToString();
  185. }
  186. private void FrmCcmResetStatus_Load(object sender, EventArgs e)
  187. {
  188. SetVisibleCheckBox();
  189. }
  190. /// <summary>
  191. /// 根据体系设置可显示的CheckBox
  192. /// </summary>
  193. private void SetVisibleCheckBox()
  194. {
  195. try
  196. {
  197. if (WorkShopN0 == "") return;
  198. if (WorkShopN0 == "1")
  199. {
  200. radioButton1.Visible = true;
  201. radioButton1.Text = "1#LF炉";
  202. radioButton1.Tag = "LFS01";
  203. radioButton2.Visible = false;
  204. radioButton3.Visible = true;
  205. radioButton3.Text = "1#铸机";
  206. radioButton3.Tag = "CCM01";
  207. radioButton4.Visible = true;
  208. radioButton4.Text = "2#铸机";
  209. radioButton4.Tag = "CCM02";
  210. radioButton5.Visible = false;
  211. }
  212. if (WorkShopN0 == "2")
  213. {
  214. radioButton1.Visible = true;
  215. radioButton1.Text = "2#LF炉";
  216. radioButton1.Tag = "LFS02";
  217. radioButton2.Visible = true;
  218. radioButton2.Text = "3#LF炉";
  219. radioButton2.Tag = "LFS03";
  220. radioButton3.Visible = true;
  221. radioButton3.Text = "3#铸机";
  222. radioButton3.Tag = "CCM03";
  223. radioButton4.Visible = true;
  224. radioButton4.Text = "4#铸机";
  225. radioButton4.Tag = "CCM04";
  226. radioButton5.Visible = true;
  227. radioButton5.Text = "5#铸机";
  228. radioButton5.Tag = "CCM05";
  229. }
  230. }
  231. catch { }
  232. }
  233. private void FrmCcmResetStatus_FormClosing(object sender, FormClosingEventArgs e)
  234. {
  235. //_strSet = "";
  236. //_strSta = "";
  237. }
  238. }
  239. }