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 IMCS.UControl { /// /// 智能生产保障系统 /// public partial class UserControl6 : UserControl { public UserControl6() { InitializeComponent(); this.Load += UserControl6_Load; } private void UserControl6_Load(object sender, EventArgs e) { for (int y = 1; y < 11; y++) { for (int x = 1; x < 31; x++) { // this.tableLayoutPanel1.GetControlFromPosition Label lb = this.tableLayoutPanel1.GetControlFromPosition(x, y) as Label; lb.Text = (y + (x - 1) * 10).ToString(); lb.Tag = (y + (x - 1) * 10).ToString(); lb.AutoSize = false; lb.Width = 69; lb.Height = 30; lb.BackColor = System.Drawing.Color.AliceBlue; lb.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; } } int i = 0; for (int y = 5; y < 15; y++) { for (int x = 18; x < 21; x++) { i++; // this.tableLayoutPanel1.GetControlFromPosition Label lb = this.tableLayoutPanel1.GetControlFromPosition(y, x) as Label; lb.Text = i.ToString(); lb.Tag = "xia" + (i).ToString(); lb.AutoSize = false; lb.Width = 69; lb.Height = 30; lb.BackColor = System.Drawing.Color.AliceBlue; lb.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; } } this.BackgroundImage = global::IMCS.Properties.Resources.backgroup1; this.BackgroundImageLayout = ImageLayout.Stretch; this.tableLayoutPanel1.BackColor = System.Drawing.Color.Transparent; #region 私服舵机 this.uctl_SiFu.deviceStateDefaultList.Device_ConnectionMes = true; this.uctl_SiFu.deviceStateDefaultList.Device_Name = "私服舵机"; this.uctl_SiFu.deviceStateDefaultList.Device_OnLine = true; this.uctl_SiFu.deviceStateDefaultList.Device_Runing = DefaultList.EnumDeviceRunState.RunState_Run; #endregion #region AGV上下料站1 this.uctl_AGV1.deviceStateDefaultList.Device_ConnectionMes = true; this.uctl_AGV1.deviceStateDefaultList.Device_Name = "AGV上下料站1"; this.uctl_AGV1.deviceStateDefaultList.Device_OnLine = true; this.uctl_AGV1.deviceStateDefaultList.Device_Runing = DefaultList.EnumDeviceRunState.RunState_Run; #endregion #region AGV上下料站2 this.uctl_AGV2.deviceStateDefaultList.Device_ConnectionMes = true; this.uctl_AGV2.deviceStateDefaultList.Device_Name = "AGV上下料站2"; this.uctl_AGV2.deviceStateDefaultList.Device_OnLine = true; this.uctl_AGV2.deviceStateDefaultList.Device_Runing = DefaultList.EnumDeviceRunState.RunState_Run; #endregion #region 三坐标检测 this.uctl_SanZuoBiao.deviceStateDefaultList.Device_ConnectionMes = true; this.uctl_SanZuoBiao.deviceStateDefaultList.Device_Name = "三坐标检测"; this.uctl_SanZuoBiao.deviceStateDefaultList.Device_OnLine = true; this.uctl_SanZuoBiao.deviceStateDefaultList.Device_Runing = DefaultList.EnumDeviceRunState.RunState_Run; #endregion #region 激光打标机 this.uctl_DaBiaoJI.deviceStateDefaultList.Device_ConnectionMes = true; this.uctl_DaBiaoJI.deviceStateDefaultList.Device_Name = "激光打标机"; this.uctl_DaBiaoJI.deviceStateDefaultList.Device_OnLine = true; this.uctl_DaBiaoJI.deviceStateDefaultList.Device_Runing = DefaultList.EnumDeviceRunState.RunState_Run; #endregion #region 上下料站1 this.uctl_ShangXiaZhan1.deviceStateDefaultList.Device_ConnectionMes = true; this.uctl_ShangXiaZhan1.deviceStateDefaultList.Device_Name = "上下料站1"; this.uctl_ShangXiaZhan1.deviceStateDefaultList.Device_OnLine = true; this.uctl_ShangXiaZhan1.deviceStateDefaultList.Device_Runing = DefaultList.EnumDeviceRunState.RunState_Run; #endregion #region 上下料站2 this.uctl_ShangXiaZhan2.deviceStateDefaultList.Device_ConnectionMes = true; this.uctl_ShangXiaZhan2.deviceStateDefaultList.Device_Name = "上下料站2"; this.uctl_ShangXiaZhan2.deviceStateDefaultList.Device_OnLine = true; this.uctl_ShangXiaZhan2.deviceStateDefaultList.Device_Runing = DefaultList.EnumDeviceRunState.RunState_Run; #endregion #region 上下料站3 this.uctl_ShangXiaZhan3.deviceStateDefaultList.Device_ConnectionMes = true; this.uctl_ShangXiaZhan3.deviceStateDefaultList.Device_Name = "上下料站3"; this.uctl_ShangXiaZhan3.deviceStateDefaultList.Device_OnLine = true; this.uctl_ShangXiaZhan3.deviceStateDefaultList.Device_Runing = DefaultList.EnumDeviceRunState.RunState_Run; #endregion #region 上下料站4 this.uctl_ShangXiaZhan4.deviceStateDefaultList.Device_ConnectionMes = true; this.uctl_ShangXiaZhan4.deviceStateDefaultList.Device_Name = "上下料站4"; this.uctl_ShangXiaZhan4.deviceStateDefaultList.Device_OnLine = true; this.uctl_ShangXiaZhan4.deviceStateDefaultList.Device_Runing = DefaultList.EnumDeviceRunState.RunState_Run; #endregion #region 上下料站5 this.uctl_ShangXiaZhan5.deviceStateDefaultList.Device_ConnectionMes = true; this.uctl_ShangXiaZhan5.deviceStateDefaultList.Device_Name = "上下料站5"; this.uctl_ShangXiaZhan5.deviceStateDefaultList.Device_OnLine = true; this.uctl_ShangXiaZhan5.deviceStateDefaultList.Device_Runing = DefaultList.EnumDeviceRunState.RunState_Run; #endregion #region 上下料站6 this.uctl_ShangXiaZhan6.deviceStateDefaultList.Device_ConnectionMes = true; this.uctl_ShangXiaZhan6.deviceStateDefaultList.Device_Name = "上下料站6"; this.uctl_ShangXiaZhan6.deviceStateDefaultList.Device_OnLine = true; this.uctl_ShangXiaZhan6.deviceStateDefaultList.Device_Runing = DefaultList.EnumDeviceRunState.RunState_Run; #endregion } } }