frmHmpOperate.cs 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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. using System.Collections;
  9. namespace Core.LgMes.Client.LgJobMgt
  10. {
  11. public partial class frmHmpOperate : Form
  12. {
  13. public frmHmpOperate()
  14. {
  15. InitializeComponent();
  16. }
  17. #region " Variable"
  18. public string _devPos = "";
  19. public int InitNo = 0;
  20. public bool m_bGW1 = true, m_bGW2 = true, m_bYLW = true, m_bNGW = true, m_bBGW = true;
  21. public bool m_bGWQH = false;
  22. public int CAST_ID = 0;
  23. public bool blFront = false; //1#小车位
  24. public bool blBack = false; //2#小车位
  25. public bool blDevice = false; //1#处理位
  26. public bool blDevice2 = false;//2#处理位
  27. #endregion
  28. private void frmHmpOperate_Load(object sender, EventArgs e)
  29. {
  30. //1#小车位进入
  31. if (blFront == true)
  32. {
  33. rbDevice2.Enabled = false;
  34. rbFront.Enabled = false;
  35. rbDevice.Checked = true;
  36. }
  37. //2#小车位进入
  38. if (blBack == true)
  39. {
  40. rbDevice.Enabled = false;
  41. rbBack.Enabled = false;
  42. rbDevice2.Checked = true;
  43. }
  44. //1#处理位
  45. if (blDevice == true)
  46. {
  47. rbDevice2.Enabled = false;
  48. rbDevice.Enabled = false;
  49. rbBack.Enabled = false;
  50. rbFront.Checked = true;
  51. }
  52. //2#处理位
  53. if (blDevice2 == true)
  54. {
  55. rbDevice2.Enabled = false;
  56. rbDevice.Enabled = false;
  57. rbFront.Enabled = false;
  58. rbBack.Checked = true;
  59. }
  60. }
  61. private void btnOk_Click(object sender, EventArgs e)
  62. {
  63. IEnumerator iControls = ultraGroupBox1.Controls.GetEnumerator();
  64. while (iControls.MoveNext())
  65. {
  66. object obj = iControls.Current;
  67. RadioButton rdbtn = obj as RadioButton;
  68. if (rdbtn != null)
  69. {
  70. if (rdbtn.Checked)
  71. this.Tag = rdbtn.Tag;
  72. }
  73. }
  74. iControls = ultraGroupBox2.Controls.GetEnumerator();
  75. while (iControls.MoveNext())
  76. {
  77. object obj = iControls.Current;
  78. RadioButton rdbtn = obj as RadioButton;
  79. if (rdbtn != null)
  80. {
  81. if (rdbtn.Checked)
  82. this.Tag = rdbtn.Tag;
  83. }
  84. }
  85. this.Close();
  86. }
  87. private void btnNo_Click(object sender, EventArgs e)
  88. {
  89. this.Close();
  90. }
  91. private void rbFront_Click(object sender, EventArgs e)
  92. {
  93. rbOver.Checked = false;
  94. }
  95. private void rbOver_Click(object sender, EventArgs e)
  96. {
  97. rbFront.Checked = false;
  98. rbBack.Checked = false;
  99. rbDevice.Checked = false;
  100. rbDevice2.Checked = false;
  101. }
  102. }
  103. }