Form_materInMontior2.cs 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. namespace WCS_Client.From
  11. {
  12. public partial class Form_materInMontior2 : Form
  13. {
  14. public Form_materInMontior2()
  15. {
  16. InitializeComponent();
  17. Init();
  18. }
  19. private void Init()
  20. {
  21. conveyor_1021.button1.Text = "1021";
  22. conveyor_1022.button1.Text = "1022";
  23. conveyor_1040.button1.Text = "1040";
  24. conveyor_1039.button1.Text = "1039";
  25. conveyor_1038.button1.Text = "1038";
  26. conveyor_1027.button1.Text = "1037";
  27. conveyor_1036.button1.Text = "1036";
  28. conveyor_1027.button1.Text = "1027";
  29. conveyor_1029.button1.Text = "1029";
  30. conveyor_1019.button1.Text = "1019";
  31. conveyor_1046.button1.Text = "1046";
  32. conveyor_1018.button1.Text = "1018";
  33. conveyor_1048.button1.Text = "1048";
  34. conveyor_1017.button1.Text = "1017";
  35. conveyor_1030.button1.Text = "1030";
  36. conveyor_1031.button1.Text = "1031";
  37. conveyor_1015.button1.Text = "1015";
  38. conveyor_1033.button1.Text = "1033";
  39. conveyor_1013.button1.Text = "1013";
  40. conveyor_1012.button1.Text = "1012";
  41. conveyor_1011.button1.Text = "1011";
  42. conveyor_1032.button1.Text = "1032";
  43. conveyor_1035.button1.Text = "1035";
  44. rgv01.btn02.Text = "1024";
  45. rgv01.btn01.Text = "1023";
  46. rgv02.btn02.Text = "1008";
  47. rgv02.btn01.Text = "1007";
  48. rgv03.btn02.Text = "1057";
  49. rgv03.btn01.Text = "1056";
  50. conveyor_1041.button1.Text = "1041";
  51. conveyor_1044.button1.Text = "1044";
  52. conveyor_1118.button1.Text = "1118";
  53. conveyor_1116.button1.Text = "1116";
  54. conveyor_1115.button1.Text = "1115";
  55. conveyor_1112.button1.Text = "1112";
  56. conveyor_1111.button1.Text = "1111";
  57. conveyor_1110.button1.Text = "1110";
  58. conveyor_1138.button1.Text = "1138";
  59. conveyor_1139.button1.Text = "1139";
  60. conveyor_1001.button1.Text = "1001";
  61. conveyor_1002.button1.Text = "1002";
  62. conveyor_1003.button1.Text = "1003";
  63. conveyor_1004.button1.Text = "1004";
  64. conveyor_1005.button1.Text = "1005";
  65. conveyor_1006.button1.Text = "1006";
  66. conveyor_1050.button1.Text = "1050";
  67. conveyor_1051.button1.Text = "1051";
  68. conveyor_1052.button1.Text = "1052";
  69. conveyor_1053.button1.Text = "1053";
  70. conveyor_1054.button1.Text = "1054";
  71. conveyor_1055.button1.Text = "1055";
  72. conveyor_1061.button1.Text = "1061";
  73. conveyor_1062.button1.Text = "1062";
  74. conveyor_1063.button1.Text = "1063";
  75. conveyor_1064.button1.Text = "1064";
  76. conveyor_1065.button1.Text = "1065";
  77. conveyor_1066.button1.Text = "1066";
  78. conveyor_1067.button1.Text = "1067";
  79. conveyor_1068.button1.Text = "1068";
  80. conveyor_1069.button1.Text = "1069";
  81. conveyor_1070.button1.Text = "1070";
  82. conveyor_1071.button1.Text = "1071";
  83. conveyor_1072.button1.Text = "1072";
  84. }
  85. private static Form_materInMontior2 childFromInstanc;
  86. public static Form_materInMontior2 ChildFromInstanc
  87. {
  88. get
  89. {
  90. if (childFromInstanc == null || childFromInstanc.IsDisposed)
  91. {
  92. childFromInstanc = new Form_materInMontior2();
  93. }
  94. return childFromInstanc;
  95. }
  96. }
  97. private void myTableLayoutPanel1_CellPaint(object sender, TableLayoutCellPaintEventArgs e)
  98. {
  99. #region RGV01轨道边框
  100. if(e.Row==2 && e.Column == 9)
  101. {
  102. float x = e.CellBounds.Location.X;
  103. float x2 = e.CellBounds.Right;
  104. float y = e.CellBounds.Location.Y;
  105. float y2 = e.CellBounds.Bottom;
  106. e.Graphics.DrawLine(new Pen(Color.Blue), x, y, x, y2);//竖线
  107. e.Graphics.DrawLine(new Pen(Color.Blue), x, y, x2, y);//横线
  108. }
  109. if (e.Row == 3 && e.Column >= 9 && e.Column <=19)
  110. {
  111. float x = e.CellBounds.Location.X;
  112. float x2 = e.CellBounds.Right;
  113. float y = e.CellBounds.Location.Y;
  114. float y2 = e.CellBounds.Bottom;
  115. e.Graphics.DrawLine(new Pen(Color.Blue), x, y, x2, y);//横线
  116. }
  117. if (e.Row == 2 && e.Column >= 9 && e.Column <= 19)
  118. {
  119. float x = e.CellBounds.Location.X;
  120. float x2 = e.CellBounds.Right;
  121. float y = e.CellBounds.Location.Y;
  122. float y2 = e.CellBounds.Bottom;
  123. e.Graphics.DrawLine(new Pen(Color.Blue), x, y, x2, y);//横线
  124. }
  125. //if (e.Row == 2 && e.Column == 17)
  126. //{
  127. // float x = e.CellBounds.Location.X;
  128. // float x2 = e.CellBounds.Right;
  129. // float y = e.CellBounds.Location.Y;
  130. // float y2 = e.CellBounds.Bottom;
  131. // e.Graphics.DrawLine(new Pen(Color.Blue), x, y, x, y2);//竖线
  132. //}
  133. //e.Graphics.DrawRectangle(new Pen(Color.Blue), e.CellBounds);
  134. #endregion;
  135. #region RGV02轨道边框
  136. if(e.Row==3 && e.Column == 24)
  137. {
  138. float x = e.CellBounds.Location.X;
  139. float x2 = e.CellBounds.Right;
  140. float y = e.CellBounds.Location.Y;
  141. float y2 = e.CellBounds.Bottom;
  142. e.Graphics.DrawLine(new Pen(Color.Blue), x, y, x2, y);//横线
  143. }
  144. if (e.Row >= 3 && e.Row <= 18 && e.Column == 24)
  145. {
  146. float x = e.CellBounds.Location.X;
  147. float x2 = e.CellBounds.Right;
  148. float y = e.CellBounds.Location.Y;
  149. float y2 = e.CellBounds.Bottom;
  150. e.Graphics.DrawLine(new Pen(Color.Blue), x, y, x, y2);//竖线
  151. }
  152. if (e.Row >= 3 && e.Row <= 18 && e.Column == 25)
  153. {
  154. float x = e.CellBounds.Location.X;
  155. float x2 = e.CellBounds.Right;
  156. float y = e.CellBounds.Location.Y;
  157. float y2 = e.CellBounds.Bottom;
  158. e.Graphics.DrawLine(new Pen(Color.Blue), x, y, x, y2);//竖线
  159. }
  160. if (e.Row == 19 && e.Column == 24)
  161. {
  162. float x = e.CellBounds.Location.X;
  163. float x2 = e.CellBounds.Right;
  164. float y = e.CellBounds.Location.Y;
  165. float y2 = e.CellBounds.Bottom;
  166. e.Graphics.DrawLine(new Pen(Color.Blue), x, y, x2, y);//横线
  167. }
  168. #endregion;
  169. #region RGV03轨道边框
  170. if (e.Row == 5 && e.Column == 2)
  171. {
  172. float x = e.CellBounds.Location.X;
  173. float x2 = e.CellBounds.Right;
  174. float y = e.CellBounds.Location.Y;
  175. float y2 = e.CellBounds.Bottom;
  176. e.Graphics.DrawLine(new Pen(Color.Blue), x, y, x2, y);//横线
  177. }
  178. if (e.Row >= 5 && e.Row <= 19 && e.Column == 2)
  179. {
  180. float x = e.CellBounds.Location.X;
  181. float x2 = e.CellBounds.Right;
  182. float y = e.CellBounds.Location.Y;
  183. float y2 = e.CellBounds.Bottom;
  184. e.Graphics.DrawLine(new Pen(Color.Blue), x, y, x, y2);//竖线
  185. }
  186. if (e.Row >= 5 && e.Row <= 19 && e.Column == 3)
  187. {
  188. float x = e.CellBounds.Location.X;
  189. float x2 = e.CellBounds.Right;
  190. float y = e.CellBounds.Location.Y;
  191. float y2 = e.CellBounds.Bottom;
  192. e.Graphics.DrawLine(new Pen(Color.Blue), x, y, x, y2);//竖线
  193. }
  194. if (e.Row == 20 && e.Column == 2)
  195. {
  196. float x = e.CellBounds.Location.X;
  197. float x2 = e.CellBounds.Right;
  198. float y = e.CellBounds.Location.Y;
  199. float y2 = e.CellBounds.Bottom;
  200. e.Graphics.DrawLine(new Pen(Color.Blue), x, y, x2, y);//横线
  201. }
  202. #endregion;
  203. }
  204. }
  205. }