123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace WCS_Client.From
- {
- public partial class Form_materInMontior2 : Form
- {
- public Form_materInMontior2()
- {
- InitializeComponent();
- Init();
- }
- private void Init()
- {
- conveyor_1021.button1.Text = "1021";
- conveyor_1022.button1.Text = "1022";
- conveyor_1040.button1.Text = "1040";
- conveyor_1039.button1.Text = "1039";
- conveyor_1038.button1.Text = "1038";
- conveyor_1027.button1.Text = "1037";
- conveyor_1036.button1.Text = "1036";
- conveyor_1027.button1.Text = "1027";
- conveyor_1029.button1.Text = "1029";
- conveyor_1019.button1.Text = "1019";
- conveyor_1046.button1.Text = "1046";
- conveyor_1018.button1.Text = "1018";
- conveyor_1048.button1.Text = "1048";
- conveyor_1017.button1.Text = "1017";
- conveyor_1030.button1.Text = "1030";
- conveyor_1031.button1.Text = "1031";
- conveyor_1015.button1.Text = "1015";
- conveyor_1033.button1.Text = "1033";
- conveyor_1013.button1.Text = "1013";
- conveyor_1012.button1.Text = "1012";
- conveyor_1011.button1.Text = "1011";
- conveyor_1032.button1.Text = "1032";
- conveyor_1035.button1.Text = "1035";
- rgv01.btn02.Text = "1024";
- rgv01.btn01.Text = "1023";
- rgv02.btn02.Text = "1008";
- rgv02.btn01.Text = "1007";
- rgv03.btn02.Text = "1057";
- rgv03.btn01.Text = "1056";
- conveyor_1041.button1.Text = "1041";
- conveyor_1044.button1.Text = "1044";
- conveyor_1118.button1.Text = "1118";
- conveyor_1116.button1.Text = "1116";
- conveyor_1115.button1.Text = "1115";
- conveyor_1112.button1.Text = "1112";
- conveyor_1111.button1.Text = "1111";
- conveyor_1110.button1.Text = "1110";
- conveyor_1138.button1.Text = "1138";
- conveyor_1139.button1.Text = "1139";
- conveyor_1001.button1.Text = "1001";
- conveyor_1002.button1.Text = "1002";
- conveyor_1003.button1.Text = "1003";
- conveyor_1004.button1.Text = "1004";
- conveyor_1005.button1.Text = "1005";
- conveyor_1006.button1.Text = "1006";
- conveyor_1050.button1.Text = "1050";
- conveyor_1051.button1.Text = "1051";
- conveyor_1052.button1.Text = "1052";
- conveyor_1053.button1.Text = "1053";
- conveyor_1054.button1.Text = "1054";
- conveyor_1055.button1.Text = "1055";
- conveyor_1061.button1.Text = "1061";
- conveyor_1062.button1.Text = "1062";
- conveyor_1063.button1.Text = "1063";
- conveyor_1064.button1.Text = "1064";
- conveyor_1065.button1.Text = "1065";
- conveyor_1066.button1.Text = "1066";
- conveyor_1067.button1.Text = "1067";
- conveyor_1068.button1.Text = "1068";
- conveyor_1069.button1.Text = "1069";
- conveyor_1070.button1.Text = "1070";
- conveyor_1071.button1.Text = "1071";
- conveyor_1072.button1.Text = "1072";
- }
- private static Form_materInMontior2 childFromInstanc;
- public static Form_materInMontior2 ChildFromInstanc
- {
- get
- {
- if (childFromInstanc == null || childFromInstanc.IsDisposed)
- {
- childFromInstanc = new Form_materInMontior2();
- }
- return childFromInstanc;
- }
- }
- private void myTableLayoutPanel1_CellPaint(object sender, TableLayoutCellPaintEventArgs e)
- {
- #region RGV01轨道边框
- if(e.Row==2 && e.Column == 9)
- {
- float x = e.CellBounds.Location.X;
- float x2 = e.CellBounds.Right;
- float y = e.CellBounds.Location.Y;
- float y2 = e.CellBounds.Bottom;
- e.Graphics.DrawLine(new Pen(Color.Blue), x, y, x, y2);//竖线
- e.Graphics.DrawLine(new Pen(Color.Blue), x, y, x2, y);//横线
- }
- if (e.Row == 3 && e.Column >= 9 && e.Column <=19)
- {
- float x = e.CellBounds.Location.X;
- float x2 = e.CellBounds.Right;
- float y = e.CellBounds.Location.Y;
- float y2 = e.CellBounds.Bottom;
- e.Graphics.DrawLine(new Pen(Color.Blue), x, y, x2, y);//横线
- }
- if (e.Row == 2 && e.Column >= 9 && e.Column <= 19)
- {
- float x = e.CellBounds.Location.X;
- float x2 = e.CellBounds.Right;
- float y = e.CellBounds.Location.Y;
- float y2 = e.CellBounds.Bottom;
- e.Graphics.DrawLine(new Pen(Color.Blue), x, y, x2, y);//横线
- }
- //if (e.Row == 2 && e.Column == 17)
- //{
- // float x = e.CellBounds.Location.X;
- // float x2 = e.CellBounds.Right;
- // float y = e.CellBounds.Location.Y;
- // float y2 = e.CellBounds.Bottom;
- // e.Graphics.DrawLine(new Pen(Color.Blue), x, y, x, y2);//竖线
- //}
- //e.Graphics.DrawRectangle(new Pen(Color.Blue), e.CellBounds);
- #endregion;
- #region RGV02轨道边框
- if(e.Row==3 && e.Column == 24)
- {
- float x = e.CellBounds.Location.X;
- float x2 = e.CellBounds.Right;
- float y = e.CellBounds.Location.Y;
- float y2 = e.CellBounds.Bottom;
- e.Graphics.DrawLine(new Pen(Color.Blue), x, y, x2, y);//横线
- }
- if (e.Row >= 3 && e.Row <= 18 && e.Column == 24)
- {
- float x = e.CellBounds.Location.X;
- float x2 = e.CellBounds.Right;
- float y = e.CellBounds.Location.Y;
- float y2 = e.CellBounds.Bottom;
- e.Graphics.DrawLine(new Pen(Color.Blue), x, y, x, y2);//竖线
- }
- if (e.Row >= 3 && e.Row <= 18 && e.Column == 25)
- {
- float x = e.CellBounds.Location.X;
- float x2 = e.CellBounds.Right;
- float y = e.CellBounds.Location.Y;
- float y2 = e.CellBounds.Bottom;
- e.Graphics.DrawLine(new Pen(Color.Blue), x, y, x, y2);//竖线
- }
- if (e.Row == 19 && e.Column == 24)
- {
- float x = e.CellBounds.Location.X;
- float x2 = e.CellBounds.Right;
- float y = e.CellBounds.Location.Y;
- float y2 = e.CellBounds.Bottom;
- e.Graphics.DrawLine(new Pen(Color.Blue), x, y, x2, y);//横线
- }
- #endregion;
- #region RGV03轨道边框
- if (e.Row == 5 && e.Column == 2)
- {
- float x = e.CellBounds.Location.X;
- float x2 = e.CellBounds.Right;
- float y = e.CellBounds.Location.Y;
- float y2 = e.CellBounds.Bottom;
- e.Graphics.DrawLine(new Pen(Color.Blue), x, y, x2, y);//横线
- }
- if (e.Row >= 5 && e.Row <= 19 && e.Column == 2)
- {
- float x = e.CellBounds.Location.X;
- float x2 = e.CellBounds.Right;
- float y = e.CellBounds.Location.Y;
- float y2 = e.CellBounds.Bottom;
- e.Graphics.DrawLine(new Pen(Color.Blue), x, y, x, y2);//竖线
- }
- if (e.Row >= 5 && e.Row <= 19 && e.Column == 3)
- {
- float x = e.CellBounds.Location.X;
- float x2 = e.CellBounds.Right;
- float y = e.CellBounds.Location.Y;
- float y2 = e.CellBounds.Bottom;
- e.Graphics.DrawLine(new Pen(Color.Blue), x, y, x, y2);//竖线
- }
- if (e.Row == 20 && e.Column == 2)
- {
- float x = e.CellBounds.Location.X;
- float x2 = e.CellBounds.Right;
- float y = e.CellBounds.Location.Y;
- float y2 = e.CellBounds.Bottom;
- e.Graphics.DrawLine(new Pen(Color.Blue), x, y, x2, y);//横线
- }
- #endregion;
- }
- }
- }
|