using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Runtime.InteropServices; using System.Threading; using System.Windows.Forms; using AgvCar; using AGVSystem.A17168; using AGVSystem.Cls; using AGVSystem.Properties; using Automation.BDaq; using HxBusiness; namespace AGVSystem { // Token: 0x02000003 RID: 3 public partial class Frm_A17168 : Form { // Token: 0x0600001C RID: 28 [DllImport("kernel32")] public static extern uint GetTickCount(); // Token: 0x0600001D RID: 29 RVA: 0x00002A3C File Offset: 0x00000C3C public Frm_A17168() { this.InitializeComponent(); Frm_A17168.frm = this; mainfrm.Map1 = this.panel3; mainfrm.Map2 = this.panel2; mainfrm.Map3 = this.panel1; Frm_A17168.businessCtrl = new BusinessManage(); bool flag = Frm_A17168.businessCtrl != null && Frm_A17168.businessCtrl.apiModel != null; if (flag) { Frm_A17168.TraffAutoTimet = Frm_A17168.businessCtrl.apiModel.AutoTime; bool flag2 = !string.IsNullOrEmpty(Frm_A17168.businessCtrl.apiModel.waitRfidList); if (flag2) { Frm_A17168.autoLeavedDic = new List(); foreach (string areaCode in Frm_A17168.businessCtrl.apiModel.waitRfidList.Split(new char[] { ',' })) { Frm_A17168.autoLeavedDic.Add(new TrafficModel { areaCode = areaCode }); } } } base.ControlBox = false; base.Width = mainfrm.newmainfrm.ClientSize.Width - 5; base.Height = mainfrm.newmainfrm.ClientSize.Height - 29 - 74 - 22 - 5; Func.db_conn = new ClsDBConn_sql(); bool flag3 = Param.Card1_Interval > 0; if (flag3) { try { this.instantDiCtrl1.SelectedDevice = mainfrm.myDevice_DI0; this.instantDoCtrl1.SelectedDevice = mainfrm.myDevice_DO0; this.tm_card.Interval = Param.Card1_Interval; this.tm_card.Enabled = true; this.instantDiCtrl1.SnapStart(); } catch { } } bool flag4 = Param.Card2_Interval > 0; if (flag4) { try { this.instantDiCtrl2.SelectedDevice = mainfrm.myDevice_DI1; this.instantDoCtrl2.SelectedDevice = mainfrm.myDevice_DO1; this.tm_card.Interval = Param.Card2_Interval; this.tm_card.Enabled = true; this.instantDiCtrl2.SnapStart(); } catch { } } bool flag5 = Param.Card3_Interval > 0; if (flag5) { try { this.instantDiCtrl3.SelectedDevice = mainfrm.myDevice_DI2; this.instantDoCtrl3.SelectedDevice = mainfrm.myDevice_DO2; this.tm_card.Interval = Param.Card3_Interval; this.tm_card.Enabled = true; this.instantDiCtrl3.SnapStart(); } catch { } } this.pnl1.Height = Param.Icon_Size; this.pnl2.Height = Param.Icon_Size; this.pnl3.Height = Param.Icon_Size; this.pnl4.Height = Param.Icon_Size; this.pnl5.Height = Param.Icon_Size; this.pnl6.Height = Param.Icon_Size; this.pnl7.Height = Param.Icon_Size; this.pnl8.Height = Param.Icon_Size; this.pnl9.Height = Param.Icon_Size; this.pnl10.Height = Param.Icon_Size; this.pnl11.Height = Param.Icon_Size; Frm_A17168.P1 = this.pnl1; Frm_A17168.P2 = this.pnl2; Frm_A17168.P3 = this.pnl3; Frm_A17168.P4 = this.pnl4; Frm_A17168.P5 = this.pnl5; Frm_A17168.P6 = this.pnl6; Frm_A17168.P7 = this.pnl7; Frm_A17168.P8 = this.pnl8; Frm_A17168.P9 = this.pnl9; Frm_A17168.P10 = this.pnl10; Frm_A17168.P11 = this.pnl11; this.pnl[0] = Frm_A17168.P1; this.pnl[1] = Frm_A17168.P2; this.pnl[2] = Frm_A17168.P3; this.pnl[3] = Frm_A17168.P4; this.pnl[4] = Frm_A17168.P5; this.pnl[5] = Frm_A17168.P6; this.pnl[6] = Frm_A17168.P7; this.pnl[7] = Frm_A17168.P8; this.pnl[8] = Frm_A17168.P9; this.pnl[9] = Frm_A17168.P10; this.pnl[10] = Frm_A17168.P11; this.agvLocation = new Frm_A17168.agvlocation(Frm_A17168.AgvLocation); this.pictureboxSet = new Frm_A17168.pictureboxset(Frm_A17168.PictureboxSet); Control.CheckForIllegalCrossThreadCalls = false; ClsDBConn_sql clsDBConn_sql = new ClsDBConn_sql(); string str = "SELECT [ID] as '设备编号' ,[Loc_ID] as '设备位置' ,'' as '状态' , '0' as '复位','' as '在线状态' FROM [AgvInfo] order by id"; this.agv_list = clsDBConn_sql.connDt(str).Copy(); this.dataGridView1.DataSource = this.agv_list.Tables[0]; str = "SELECT Line_name FROM [Assembly_Line] order by ID"; mainfrm.ds_ProductLine.Tables.Clear(); mainfrm.ds_ProductLine = clsDBConn_sql.connDt(str); this.vScrollBar1.Maximum = mainfrm.ds_ProductLine.Tables[0].Rows.Count; for (int j = 0; j < mainfrm.ds_ProductLine.Tables[0].Rows.Count; j++) { bool flag6 = j == 0; if (flag6) { this.lab1.Text = mainfrm.ds_ProductLine.Tables[0].Rows[j][0].ToString(); this.pnl1.Visible = true; } else { bool flag7 = j == 1; if (flag7) { this.lab2.Text = mainfrm.ds_ProductLine.Tables[0].Rows[j][0].ToString(); this.pnl2.Visible = true; } else { bool flag8 = j == 2; if (flag8) { this.lab3.Text = mainfrm.ds_ProductLine.Tables[0].Rows[j][0].ToString(); this.pnl3.Visible = true; } else { bool flag9 = j == 3; if (flag9) { this.lab4.Text = mainfrm.ds_ProductLine.Tables[0].Rows[j][0].ToString(); this.pnl4.Visible = true; } else { bool flag10 = j == 4; if (flag10) { this.lab5.Text = mainfrm.ds_ProductLine.Tables[0].Rows[j][0].ToString(); this.pnl5.Visible = true; } else { bool flag11 = j == 5; if (flag11) { this.lab6.Text = mainfrm.ds_ProductLine.Tables[0].Rows[j][0].ToString(); this.pnl6.Visible = true; } else { bool flag12 = j == 6; if (flag12) { this.lab7.Text = mainfrm.ds_ProductLine.Tables[0].Rows[j][0].ToString(); this.pnl7.Visible = true; } else { bool flag13 = j == 7; if (flag13) { this.lab8.Text = mainfrm.ds_ProductLine.Tables[0].Rows[j][0].ToString(); this.pnl8.Visible = true; } else { bool flag14 = j == 8; if (flag14) { this.lab9.Text = mainfrm.ds_ProductLine.Tables[0].Rows[j][0].ToString(); this.pnl9.Visible = true; } else { bool flag15 = j == 9; if (flag15) { this.pnl10.Visible = true; } else { bool flag16 = j == 10; if (flag16) { this.lab11.Text = mainfrm.ds_ProductLine.Tables[0].Rows[j][0].ToString(); this.pnl11.Visible = true; } else { bool flag17 = j == 12; if (flag17) { this.lab13.Text = mainfrm.ds_ProductLine.Tables[0].Rows[j][0].ToString(); this.pnl10.Visible = true; } } } } } } } } } } } } } bool flag18 = mainfrm.ds_ProductLine.Tables[0].Rows.Count <= 3; if (flag18) { this.panel8.Height = Param.Icon_Size * mainfrm.ds_ProductLine.Tables[0].Rows.Count; bool flag19 = mainfrm.ds_ProductLine.Tables[0].Rows.Count == 1; if (flag19) { this.lab1.Text = "设备列表:"; } } else { this.panel8.Height = Param.Icon_Size * 3; } Func.agvcar = new Agv[(int)Param.AGV_Qty]; new Thread(new ThreadStart(UPDateDBList.UpDateDb)) { IsBackground = true }.Start(); new Thread(new ThreadStart(TrafficCtrl.Listen)) { IsBackground = true }.Start(); Param.th_GetData = new Thread[(int)Param.AGV_Qty]; str = "SELECT [ID] ,[LOC_ID] ,[Warn_ID] FROM [Agv_Info_Interface]"; Frm_A17168.ds_Agv_Info_Interface = Frm_A17168.db_Agv_Info.connDt(str); int num = Frm_A17168.ds_Agv_Info_Interface.Tables[0].Rows.Count; str = "select id , line_name from Assembly_Line"; mainfrm.ds_ProductLine.Clear(); mainfrm.ds_ProductLine = clsDBConn_sql.connDt(str).Copy(); str = "SELECT [Warn_ID] ,[Warn_Info] ,[Warn_Level] FROM [Warn_Info] order by Warn_ID"; this.ds_warn = clsDBConn_sql.connDt(str).Copy(); for (int k = 0; k < mainfrm.ds_Agvlist.Tables[0].Rows.Count; k++) { this.CreateBtnAgv(mainfrm.ds_Agvlist.Tables[0].Rows[k]["Internal_ID"].ToString(), mainfrm.ds_Agvlist.Tables[0].Rows[k]["Assembly_Line"].ToString(), mainfrm.ds_Agvlist.Tables[0].Rows[k]["ID"].ToString(), mainfrm.ds_Agvlist.Tables[0].Rows[k]["IPAddress"].ToString(), mainfrm.ds_Agvlist.Tables[0].Rows[k]["line_Name"].ToString()); } str = "SELECT distinct Loc_ID, Flag_Value, Loc_X, Loc_Y, Binding, Area, Assembly_ID ,Assembly_Line FROM LandMarkInfo order by Loc_ID"; DataSet dataSet = clsDBConn_sql.connDt(str); string a = ""; int width = Screen.PrimaryScreen.Bounds.Width; int height = Screen.PrimaryScreen.Bounds.Height; foreach (object obj in dataSet.Tables[0].Rows) { DataRow dataRow = (DataRow)obj; bool flag20 = a == ""; if (flag20) { Func.CreatePanelLocation(dataRow["Loc_ID"].ToString(), (int)Convert.ToInt16(dataRow["Binding"]), (int)Convert.ToInt16(dataRow["Loc_x"]), (int)Convert.ToInt16(dataRow["loc_y"]), (int)Convert.ToInt16(dataRow["Area"]), dataRow["Assembly_ID"].ToString()); a = dataRow["Loc_ID"].ToString(); } else { bool flag21 = dataRow["Loc_ID"].ToString() != a; if (flag21) { Func.CreatePanelLocation(dataRow["Loc_ID"].ToString(), (int)Convert.ToInt16(dataRow["Binding"]), (int)Convert.ToInt16(dataRow["Loc_x"]), (int)Convert.ToInt16(dataRow["loc_y"]), (int)Convert.ToInt16(dataRow["Area"]), dataRow["Assembly_ID"].ToString()); } } } str = "SELECT [Current_Line_ID] ,[Current_Landmark] ,[Reset_Line_ID] ,[Reset_Landmark] FROM [Reset_Relation]"; mainfrm.ds_Reset_Relation = Frm_A17168.newdb.connDt(str).Copy(); str = "SELECT [Start_Point] ,[End_Point] ,[Distance] FROM [Mileage]"; mainfrm.ds_Mileage = Frm_A17168.newdb.connDt(str).Copy(); this.agvcontrol_init(); for (int l = 0; l < (int)Param.AGV_Qty; l++) { Frm_A17168.Agvcontrol.AGV_start(Func.AgvInfo[l]); } } // Token: 0x0600001E RID: 30 RVA: 0x000038C4 File Offset: 0x00001AC4 public static void PictureboxSet(PictureBox pb, string str) { bool flag = str == "hui"; if (flag) { pb.BackgroundImage = Resources.hui; } else { bool flag2 = str == "ledlow"; if (flag2) { pb.BackgroundImage = Resources.ledLow; } else { bool flag3 = str == "_0"; if (flag3) { pb.BackgroundImage = Resources._0; } else { bool flag4 = str == "_1"; if (flag4) { pb.BackgroundImage = Resources._1; } } } } } // Token: 0x0600001F RID: 31 RVA: 0x00003944 File Offset: 0x00001B44 private void agvcontrol_init() { Frm_A17168.Agvcontrol.StartFlag = Param.StartFlag; Frm_A17168.Agvcontrol.th_GetData = Param.th_GetData; Frm_A17168.Agvcontrol.ConnectStr = Param.connectStr; Frm_A17168.Agvcontrol.ds_Mileage = mainfrm.ds_Mileage; for (byte b = 0; b < 17; b += 1) { Frm_A17168.Btn_Filter[(int)b, 0] = 0; Frm_A17168.Btn_Filter[(int)b, 1] = 0; } byte b2 = 0; while ((int)b2 < Frm_A17168.Array_Robot_Status.Length / 8) { for (byte b3 = 0; b3 < 8; b3 += 1) { Frm_A17168.Array_Robot_Status[(int)b2, (int)b3] = 0; Frm_A17168.Array_Robot_Set[(int)b2, (int)b3] = 0; } b2 += 1; } } // Token: 0x06000020 RID: 32 RVA: 0x00003A10 File Offset: 0x00001C10 private void Form1_Load(object sender, EventArgs e) { bool map1_status = Param.map1_status; if (map1_status) { this.panel3.Dock = DockStyle.Fill; this.panel3.BackgroundImage = Image.FromFile(Application.StartupPath + "\\map\\" + Param.Pro_id + "_1"); } bool map2_status = Param.map2_status; if (map2_status) { this.panel2.Dock = DockStyle.Fill; this.panel2.BackgroundImage = Image.FromFile(Application.StartupPath + "\\map\\" + Param.Pro_id + "_2"); } bool map3_status = Param.map3_status; if (map3_status) { this.panel1.Dock = DockStyle.Fill; this.panel1.BackgroundImage = Image.FromFile(Application.StartupPath + "\\map\\" + Param.Pro_id + "_3"); } this.panel3.Visible = true; this.panel2.Visible = false; this.panel1.Visible = false; this.tm_AgvInfo.Enabled = true; } // Token: 0x06000021 RID: 33 RVA: 0x00003B18 File Offset: 0x00001D18 public static void label12_DoubleClick(object sender, EventArgs e) { bool flag = ((Label)sender).Tag.ToString() == ""; if (!flag) { bool flag2 = MessageBox.Show("是否复位该路口?", "消息", MessageBoxButtons.YesNo, MessageBoxIcon.Asterisk) == DialogResult.No; if (!flag2) { int[] array = new int[] { (int)Convert.ToInt16(((Label)sender).Tag.ToString().Split(new char[] { '-' })[0]), (int)Convert.ToInt16(((Label)sender).Tag.ToString().Split(new char[] { '-' })[1]) }; for (int i = 0; i < mainfrm.ds_CrossInfo.Tables[0].Rows.Count; i++) { string text = mainfrm.ds_CrossInfo.Tables[0].Rows[i]["当前地标编号"].ToString(); string text2 = mainfrm.ds_CrossInfo.Tables[0].Rows[i]["AGV编号"].ToString(); bool flag3 = mainfrm.ds_CrossInfo.Tables[0].Rows[i]["当前产线编号"].ToString() == array[0].ToString() && mainfrm.ds_CrossInfo.Tables[0].Rows[i]["当前地标编号"].ToString() == array[1].ToString() && mainfrm.ds_CrossInfo.Tables[0].Rows[i]["AGV编号"].ToString() != "0"; if (flag3) { MessageBox.Show("AGV-" + mainfrm.ds_CrossInfo.Tables[0].Rows[i]["AGV编号"].ToString() + "占用路口信息被清除!"); mainfrm.ds_CrossInfo.Tables[0].Rows[i]["AGV编号"] = 0; } } } } } // Token: 0x06000022 RID: 34 RVA: 0x00003D74 File Offset: 0x00001F74 public static void AgvLocation(string LandMarkID, int agvnum, int map_id) { bool flag = LandMarkID == "0"; if (!flag) { Panel panel = new Panel(); Panel panel2 = new Panel(); bool flag2 = false; Panel panel3 = new Panel(); bool flag3 = map_id == 1; if (flag3) { panel3 = mainfrm.Map1; } else { bool flag4 = map_id == 2; if (flag4) { panel3 = mainfrm.Map2; } else { panel3 = mainfrm.Map3; } } foreach (object obj in panel3.Controls) { Control control = (Control)obj; bool flag5 = control.GetType().Name == "Panel"; if (flag5) { bool flag6 = control.Tag.ToString().Split(new char[] { '-' })[0] == LandMarkID; if (flag6) { panel = (Panel)control; bool flag7 = panel == (Panel)Func.agvcar[agvnum - 1].Parent; flag2 = !flag7; break; } } } bool flag8 = !flag2; if (!flag8) { panel2 = (Panel)Func.agvcar[agvnum - 1].Parent; Func.agvcar[agvnum - 1].Parent = panel; bool flag9 = panel.Tag.ToString().Trim() != ""; if (flag9) { bool flag10 = panel.Tag.ToString().Split(new char[] { '-' })[1] == "1"; if (flag10) { Func.agvcar[agvnum - 1].Dock = DockStyle.Left; Func.agvcar[agvnum - 1].Width = (Func.agvcar[agvnum - 1].Height = 32); Func.agvcar[agvnum - 1].BringToFront(); } else { bool flag11 = panel.Tag.ToString().Split(new char[] { '-' })[1] == "2"; if (flag11) { Func.agvcar[agvnum - 1].Dock = DockStyle.Left; Func.agvcar[agvnum - 1].Width = (Func.agvcar[agvnum - 1].Height = 32); Func.agvcar[agvnum - 1].BringToFront(); } else { bool flag12 = panel.Tag.ToString().Split(new char[] { '-' })[1] == "3"; if (flag12) { Func.agvcar[agvnum - 1].Dock = DockStyle.Top; Func.agvcar[agvnum - 1].Width = (Func.agvcar[agvnum - 1].Height = 32); Func.agvcar[agvnum - 1].BringToFront(); } else { bool flag13 = panel.Tag.ToString().Split(new char[] { '-' })[1] == "4"; if (flag13) { Func.agvcar[agvnum - 1].Dock = DockStyle.Top; Func.agvcar[agvnum - 1].Width = (Func.agvcar[agvnum - 1].Height = 32); Func.agvcar[agvnum - 1].BringToFront(); } } } } } int num = 0; foreach (object obj2 in panel.Controls) { Control control2 = (Control)obj2; bool flag14 = panel.Tag.ToString().Split(new char[] { '-' })[1] == "3" || panel.Tag.ToString().Split(new char[] { '-' })[1] == "4"; if (flag14) { num += control2.Height; } else { num += control2.Width; } } bool flag15 = panel.Tag.ToString().Split(new char[] { '-' })[1] == "3" || panel.Tag.ToString().Split(new char[] { '-' })[1] == "4"; if (flag15) { panel.Height = num; } else { panel.Width = num; } } } } // Token: 0x06000023 RID: 35 RVA: 0x00004218 File Offset: 0x00002418 public void CreateBtnAgv(string agvID, string assembly, string agvID_tot, string ip, string linename) { Agv agv = new Agv(); agv.Tag = agvID_tot + "-" + assembly; agv.Label = agvID; agv.Width = Param.Icon_Size; agv.Height = Param.Icon_Size; agv.Font = new Font("宋体", 9f, FontStyle.Regular); agv.ForeColor = Color.Blue; bool flag = assembly == "1"; if (flag) { agv.Parent = this.pnl1; } else { bool flag2 = assembly == "2"; if (flag2) { agv.Parent = this.pnl2; } else { bool flag3 = assembly == "3"; if (flag3) { agv.Parent = this.pnl3; } else { bool flag4 = assembly == "4"; if (flag4) { agv.Parent = this.pnl4; } else { bool flag5 = assembly == "5"; if (flag5) { agv.Parent = this.pnl5; } else { bool flag6 = assembly == "6"; if (flag6) { agv.Parent = this.pnl6; } else { bool flag7 = assembly == "7"; if (flag7) { agv.Parent = this.pnl7; } else { bool flag8 = assembly == "8"; if (flag8) { agv.Parent = this.pnl8; } } } } } } } } agv.Font = new Font("宋体", 9f); agv.Dock = DockStyle.Left; agv.BringToFront(); Func.agvcar[(int)(Convert.ToInt16(agvID_tot) - 1)] = agv; } // Token: 0x06000024 RID: 36 RVA: 0x000043B8 File Offset: 0x000025B8 public static void Map_Display(byte i) { bool flag = i == 1; if (flag) { mainfrm.Map1.Visible = true; mainfrm.Map2.Visible = false; mainfrm.Map3.Visible = false; } else { bool flag2 = i == 2; if (flag2) { mainfrm.Map1.Visible = false; mainfrm.Map2.Visible = true; mainfrm.Map3.Visible = false; } else { bool flag3 = i == 3; if (flag3) { mainfrm.Map1.Visible = false; mainfrm.Map2.Visible = false; mainfrm.Map3.Visible = true; } } } } // Token: 0x06000025 RID: 37 RVA: 0x00004454 File Offset: 0x00002654 private void button6_MouseEnter(object sender, EventArgs e) { Label label = (Label)sender; label.Font = new Font("宋体", 16f, FontStyle.Regular); label.TextAlign = ContentAlignment.MiddleCenter; } // Token: 0x06000026 RID: 38 RVA: 0x0000448C File Offset: 0x0000268C private void button6_MouseLeave(object sender, EventArgs e) { Label label = (Label)sender; label.Font = new Font("宋体", 9f, FontStyle.Regular); label.TextAlign = ContentAlignment.BottomLeft; } // Token: 0x06000027 RID: 39 RVA: 0x000044C4 File Offset: 0x000026C4 private void panel1_MouseMove(object sender, MouseEventArgs e) { mainfrm.Lab_location.Text = "X: " + e.X.ToString() + " ,Y: " + e.Y.ToString(); bool flag = e.Y > this.panel1.Height - 10; if (flag) { bool flag2 = !this.panel8.Visible; if (flag2) { this.panel8.Visible = true; base.Location = new Point(0, 103); } } else { bool visible = this.panel8.Visible; if (visible) { this.panel8.Visible = false; base.Location = new Point(0, 29); } } bool flag3 = e.Y < 10; if (flag3) { bool flag4 = !mainfrm.toolStrip.Visible; if (flag4) { mainfrm.toolStrip.Visible = true; } base.Height = mainfrm.newmainfrm.ClientSize.Height - 130; } else { bool visible2 = mainfrm.toolStrip.Visible; if (visible2) { mainfrm.toolStrip.Visible = false; } base.Height = mainfrm.newmainfrm.ClientSize.Height - 56; } } // Token: 0x06000028 RID: 40 RVA: 0x00004614 File Offset: 0x00002814 private void panel2_MouseMove(object sender, MouseEventArgs e) { mainfrm.Lab_location.Text = "X: " + e.X.ToString() + " ,Y: " + e.Y.ToString(); bool flag = e.Y > this.panel2.Height - 10; if (flag) { bool flag2 = !this.panel8.Visible; if (flag2) { this.panel8.Visible = true; } } else { bool visible = this.panel8.Visible; if (visible) { this.panel8.Visible = false; } } bool flag3 = e.Y < 10; if (flag3) { bool flag4 = !mainfrm.toolStrip.Visible; if (flag4) { mainfrm.toolStrip.Visible = true; } base.Height = mainfrm.newmainfrm.ClientSize.Height - 130; } else { bool visible2 = mainfrm.toolStrip.Visible; if (visible2) { mainfrm.toolStrip.Visible = false; } base.Height = mainfrm.newmainfrm.ClientSize.Height - 56; } bool flag5 = e.Y > ((Panel)sender).Width - 10; if (flag5) { bool flag6 = !this.panel4.Visible; if (flag6) { this.panel4.Visible = true; } } else { bool visible3 = this.panel4.Visible; if (visible3) { this.panel4.Visible = false; } } } // Token: 0x06000029 RID: 41 RVA: 0x000047A4 File Offset: 0x000029A4 private void panel3_MouseMove(object sender, MouseEventArgs e) { mainfrm.Lab_location.Text = "X: " + e.X.ToString() + " ,Y: " + e.Y.ToString(); bool flag = e.Y > this.panel3.Height - 10; if (flag) { bool flag2 = !this.panel8.Visible; if (flag2) { this.panel8.Visible = true; } } else { bool visible = this.panel8.Visible; if (visible) { this.panel8.Visible = false; } } bool flag3 = e.Y < 10; if (flag3) { bool flag4 = !mainfrm.toolStrip.Visible; if (flag4) { mainfrm.toolStrip.Visible = true; } base.Height = mainfrm.newmainfrm.ClientSize.Height - 130; } else { bool visible2 = mainfrm.toolStrip.Visible; if (visible2) { mainfrm.toolStrip.Visible = false; } base.Height = mainfrm.newmainfrm.ClientSize.Height - 56; } bool flag5 = e.X > ((Panel)sender).Width - 10; if (flag5) { bool flag6 = !this.panel4.Visible; if (flag6) { this.panel4.Visible = true; } } else { bool visible3 = this.panel4.Visible; if (visible3) { this.panel4.Visible = false; } } } // Token: 0x0600002A RID: 42 RVA: 0x00004934 File Offset: 0x00002B34 private void panel3_DoubleClick(object sender, EventArgs e) { this.b = !this.b; bool flag = this.b; if (flag) { this.panel3.MouseMove -= this.panel3_MouseMove; this.panel1.MouseMove -= this.panel1_MouseMove; this.panel2.MouseMove -= this.panel2_MouseMove; bool flag2 = !mainfrm.toolStrip.Visible; if (flag2) { mainfrm.toolStrip.Visible = true; } base.Height = mainfrm.newmainfrm.ClientSize.Height - 130; mainfrm.toolStrip_info.Text = "Locked."; } else { this.panel3.MouseMove += this.panel3_MouseMove; this.panel1.MouseMove += this.panel1_MouseMove; this.panel2.MouseMove += this.panel2_MouseMove; mainfrm.toolStrip_info.Text = ""; } mainfrm.Lab_location.Text = "W:" + this.panel3.Width.ToString() + " , H:" + this.panel3.Height.ToString(); } // Token: 0x0600002B RID: 43 RVA: 0x00004A90 File Offset: 0x00002C90 private void timer1_Tick(object sender, EventArgs e) { for (int i = 0; i < (int)Param.AGV_Qty; i++) { Func.Agv_Car_Status(Func.AgvInfo[i].Agv_ID, Func.AgvInfo[i].Run_Status == 1, Func.AgvInfo[i].Warn_Level, Func.AgvInfo[i].Location_Display, Func.AgvInfo[i].Area, (int)Func.AgvInfo[i].Run_Direction); } } // Token: 0x0600002C RID: 44 RVA: 0x00004B0C File Offset: 0x00002D0C private void tm_Tick(object sender, EventArgs e) { bool flag = Param.Map_ID != this.map_id; if (flag) { this.map_id = Param.Map_ID; bool flag2 = this.map_id == 0; if (flag2) { this.panel3.Visible = true; this.panel2.Visible = false; this.panel1.Visible = false; } else { bool flag3 = this.map_id == 1; if (flag3) { this.panel2.Visible = true; this.panel3.Visible = false; this.panel1.Visible = false; } else { bool flag4 = this.map_id == 2; if (flag4) { this.panel1.Visible = true; this.panel2.Visible = false; this.panel3.Visible = false; } } } } bool flag5 = Frm_A17168.Agvcontrol.StartFlag != Param.StartFlag; if (flag5) { bool flag6 = Param.Thread_Count == (int)Param.AGV_Qty; if (flag6) { Frm_A17168.Agvcontrol.ClosedFlag = (int)Param.AGV_Qty; } Frm_A17168.Agvcontrol.StartFlag = Param.StartFlag; } bool flag7 = Param.StartFlag && Param.Thread_Count == 0; if (flag7) { for (int i = 0; i < (int)Param.AGV_Qty; i++) { Frm_A17168.Agvcontrol.AGV_start(Func.AgvInfo[i]); } Param.Thread_Count = -1; } bool flag8 = Param.Thread_Count != -1 && Frm_A17168.Agvcontrol.ClosedFlag != -1 && Param.Thread_Count != Frm_A17168.Agvcontrol.ClosedFlag; if (flag8) { Param.Thread_Count = Frm_A17168.Agvcontrol.ClosedFlag; } } // Token: 0x0600002D RID: 45 RVA: 0x00004CC8 File Offset: 0x00002EC8 private void Form1_FormClosed(object sender, FormClosedEventArgs e) { Frm_A17168.Agvcontrol.ClosedFlag = (int)Param.AGV_Qty; int num = 15; while (Frm_A17168.Agvcontrol.ClosedFlag > 0 && num > 0) { Thread.Sleep(80); num--; } bool flag = !Param.Load_Path_His; if (flag) { } for (int i = 0; i < (int)Param.AGV_Qty; i++) { Frm_A17168.newdb.Command(string.Concat(new string[] { "UPDATE [AgvInfo] SET [Loc_ID] = ", (Param.Load_Path_His ? Func.AgvInfo[i].Cross_Location_Go : 0).ToString(), " ,[Path_ID] = ", (Param.Load_Path_His ? Func.AgvInfo[i].Cross_Path_Id : 0).ToString(), ", [Mileage]=", Func.AgvInfo[i].Mileage.ToString(), " WHERE id=", Func.AgvInfo[i].Agv_ID.ToString() })); try { Func.AgvInfo[i].Soc.Close(); Func.AgvInfo[i].Soc = null; } catch { } } } // Token: 0x0600002E RID: 46 RVA: 0x00004E1C File Offset: 0x0000301C private void button3_Click(object sender, EventArgs e) { Frm_A17168.agv_alarm_insert(0, "NEISHIXIAN", "1", 1, "FZ", 4); } // Token: 0x0600002F RID: 47 RVA: 0x00004E38 File Offset: 0x00003038 private static void agv_alarm_insert(int del_agv_no, string Assembly_Name, string Assembly_Id, int AGV_Internal_No, string AlarmInfo, int agv_no) { bool flag = del_agv_no == 0; if (flag) { bool flag2 = false; bool flag3 = mainfrm.ds_AgvWarn.Tables[0].Rows.Count > 0; if (flag3) { for (int i = 0; i < mainfrm.ds_AgvWarn.Tables[0].Rows.Count; i++) { string text = mainfrm.ds_AgvWarn.Tables[0].Rows[i][3].ToString(); bool flag4 = (int)Convert.ToInt16(mainfrm.ds_AgvWarn.Tables[0].Rows[i][3].ToString()) == agv_no; if (flag4) { mainfrm.ds_AgvWarn.Tables[0].Rows[i][0] = DateTime.Now.ToString(); mainfrm.ds_AgvWarn.Tables[0].Rows[i][1] = Assembly_Id; mainfrm.ds_AgvWarn.Tables[0].Rows[i][2] = Assembly_Name; mainfrm.ds_AgvWarn.Tables[0].Rows[i][3] = agv_no; mainfrm.ds_AgvWarn.Tables[0].Rows[i][4] = AGV_Internal_No; mainfrm.ds_AgvWarn.Tables[0].Rows[i][5] = AlarmInfo; flag2 = true; break; } } } bool flag5 = !flag2; if (flag5) { DataRow dataRow = mainfrm.ds_AgvWarn.Tables[0].NewRow(); dataRow[0] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"); dataRow[1] = Assembly_Id; dataRow[2] = Assembly_Name; dataRow[3] = agv_no; dataRow[4] = AGV_Internal_No; dataRow[5] = AlarmInfo; mainfrm.ds_AgvWarn.Tables[0].Rows.Add(dataRow); } } else { for (int j = 0; j < mainfrm.ds_AgvWarn.Tables[0].Rows.Count; j++) { bool flag6 = (int)Convert.ToInt16(mainfrm.ds_AgvWarn.Tables[0].Rows[j][3]) == del_agv_no; if (flag6) { ClsDBConn_sql clsDBConn_sql = Frm_A17168.newdb; string[] array = new string[9]; array[0] = "INSERT INTO [Warn_Log] ([Dt] ,[Agv_id] ,[Type] ,[Reset]) VALUES ('"; int num = 1; object obj = mainfrm.ds_AgvWarn.Tables[0].Rows[j][0]; array[num] = ((obj != null) ? obj.ToString() : null); array[2] = "',"; int num2 = 3; object obj2 = mainfrm.ds_AgvWarn.Tables[0].Rows[j][3]; array[num2] = ((obj2 != null) ? obj2.ToString() : null); array[4] = ",'"; int num3 = 5; object obj3 = mainfrm.ds_AgvWarn.Tables[0].Rows[j][5]; array[num3] = ((obj3 != null) ? obj3.ToString() : null); array[6] = "','"; array[7] = DateTime.Now.ToString(); array[8] = "')"; clsDBConn_sql.Command(string.Concat(array)); mainfrm.ds_AgvWarn.Tables[0].Rows.RemoveAt(j); j--; } } } } // Token: 0x06000030 RID: 48 RVA: 0x00005214 File Offset: 0x00003414 private void button4_Click(object sender, EventArgs e) { Frm_A17168.agv_alarm_insert(4, "NEISHIXIAN", "1", 1, "FZ", 4); } // Token: 0x06000031 RID: 49 RVA: 0x0000522F File Offset: 0x0000342F private void checkBox1_MouseEnter(object sender, EventArgs e) { ((CheckBox)sender).ForeColor = Color.Red; } // Token: 0x06000032 RID: 50 RVA: 0x00005243 File Offset: 0x00003443 private void checkBox1_MouseLeave(object sender, EventArgs e) { ((CheckBox)sender).ForeColor = Color.Black; } // Token: 0x06000033 RID: 51 RVA: 0x00005258 File Offset: 0x00003458 private void vScrollBar1_ValueChanged(object sender, EventArgs e) { byte b = 0; while ((int)b < this.vScrollBar1.Maximum) { bool flag = (int)b < this.vScrollBar1.Value; if (flag) { this.pnl[(int)b].Visible = false; } else { this.pnl[(int)b].Visible = true; } b += 1; } } // Token: 0x06000034 RID: 52 RVA: 0x000052B8 File Offset: 0x000034B8 private void panel3_MouseClick(object sender, MouseEventArgs e) { bool flag = Param.UserName_temp == ""; if (!flag) { bool flag2 = e.Button == MouseButtons.Right; if (flag2) { Point_loc_Set point_loc_Set = new Point_loc_Set(e.X, e.Y); point_loc_Set.Show(); } } } // Token: 0x06000035 RID: 53 RVA: 0x00005308 File Offset: 0x00003508 private void button5_Click(object sender, EventArgs e) { Func.AgvInfo[1].Run_Status = 1; Func.AgvInfo[1].Warn_Level = 1; Func.AgvInfo[1].Location_Display = 1; Func.AgvInfo[1].Area = 1; Func.AgvInfo[1].Run_Direction = 1; } // Token: 0x06000036 RID: 54 RVA: 0x00005358 File Offset: 0x00003558 private void button6_Click(object sender, EventArgs e) { Func.AgvInfo[1].Run_Status = 1; Func.AgvInfo[1].Warn_Level = 3; Func.AgvInfo[1].Location_Display = 1; Func.AgvInfo[1].Area = 1; Func.AgvInfo[1].Run_Direction = 1; } // Token: 0x06000037 RID: 55 RVA: 0x000053A8 File Offset: 0x000035A8 private void button7_Click(object sender, EventArgs e) { Func.AgvInfo[1].Run_Status = 1; Func.AgvInfo[1].Warn_Level = 1; Func.AgvInfo[1].Location_Display = 2; Func.AgvInfo[1].Area = 1; Func.AgvInfo[1].Run_Direction = 1; } // Token: 0x06000038 RID: 56 RVA: 0x000053F8 File Offset: 0x000035F8 private void card1_Tick() { byte b = 0; byte b2 = 0; while ((int)b2 < this.instantDiCtrl1.Features.PortCount) { for (byte b3 = 0; b3 < 8; b3 += 1) { ErrorCode errorCode = this.instantDiCtrl1.ReadBit((int)b2, (int)b3, out b); bool flag = mainfrm.Card_DI1[(int)b2, (int)b3] == 0 && b == 1; if (flag) { mainfrm.Card_DI1[(int)b2, (int)b3] = this.count; } bool flag2 = errorCode > ErrorCode.Success; if (flag2) { this.tm_card.Enabled = false; this.HandleError(errorCode, 1); return; } } b2 += 1; } byte b4 = 0; while ((int)b4 < this.instantDoCtrl1.Features.PortCount) { for (byte b5 = 0; b5 < 8; b5 += 1) { ErrorCode errorCode = this.instantDoCtrl1.WriteBit((int)b4, (int)b5, mainfrm.Card_DO1[(int)b4, (int)b5]); bool flag3 = errorCode > ErrorCode.Success; if (flag3) { this.tm_card.Enabled = false; this.HandleError(errorCode, 1); return; } } b4 += 1; } } // Token: 0x06000039 RID: 57 RVA: 0x0000552C File Offset: 0x0000372C private void HandleError(ErrorCode err, byte card_id) { bool flag = err > ErrorCode.Success; if (flag) { MessageBox.Show("Sorry ! Some errors happened, the error code is: " + err.ToString() + " , this card id = " + card_id.ToString(), "Static DI OR DO"); } } // Token: 0x0600003A RID: 58 RVA: 0x00005574 File Offset: 0x00003774 private void card2_Tick() { byte b = 0; byte b2 = 0; while ((int)b2 < this.instantDiCtrl2.Features.PortCount) { for (byte b3 = 0; b3 < 8; b3 += 1) { ErrorCode errorCode = this.instantDiCtrl2.ReadBit((int)b2, (int)b3, out b); bool flag = mainfrm.Card_DI2[(int)b2, (int)b3] == 0 && b == 1; if (flag) { mainfrm.Card_DI2[(int)b2, (int)b3] = this.count; } bool flag2 = errorCode > ErrorCode.Success; if (flag2) { this.tm_card.Enabled = false; this.HandleError(errorCode, 2); return; } } b2 += 1; } byte b4 = 0; while ((int)b4 < this.instantDoCtrl2.Features.PortCount) { for (byte b5 = 0; b5 < 8; b5 += 1) { ErrorCode errorCode = this.instantDoCtrl2.WriteBit((int)b4, (int)b5, mainfrm.Card_DO2[(int)b4, (int)b5]); bool flag3 = errorCode > ErrorCode.Success; if (flag3) { this.tm_card.Enabled = false; this.HandleError(errorCode, 2); return; } } b4 += 1; } } // Token: 0x0600003B RID: 59 RVA: 0x000056A8 File Offset: 0x000038A8 private void card3_Tick() { byte b = 0; byte b2 = 0; while ((int)b2 < this.instantDiCtrl3.Features.PortCount) { for (byte b3 = 0; b3 < 8; b3 += 1) { ErrorCode errorCode = this.instantDiCtrl3.ReadBit((int)b2, (int)b3, out b); bool flag = mainfrm.Card_DI3[(int)b2, (int)b3] == 0 && b == 1; if (flag) { mainfrm.Card_DI3[(int)b2, (int)b3] = this.count; } bool flag2 = errorCode > ErrorCode.Success; if (flag2) { this.tm_card.Enabled = false; this.HandleError(errorCode, 3); return; } } b2 += 1; } byte b4 = 0; while ((int)b4 < this.instantDoCtrl3.Features.PortCount) { for (byte b5 = 0; b5 < 8; b5 += 1) { ErrorCode errorCode = this.instantDoCtrl3.WriteBit((int)b4, (int)b5, mainfrm.Card_DO3[(int)b4, (int)b5]); bool flag3 = errorCode > ErrorCode.Success; if (flag3) { this.tm_card.Enabled = false; this.HandleError(errorCode, 3); return; } } b4 += 1; } } // Token: 0x0600003C RID: 60 RVA: 0x000057DC File Offset: 0x000039DC private void tm_card_Tick(object sender, EventArgs e) { for (byte b = 0; b < 4; b += 1) { for (byte b2 = 0; b2 < 8; b2 += 1) { mainfrm.Card_DO1[(int)b, (int)b2] = 0; mainfrm.Card_DO2[(int)b, (int)b2] = 0; mainfrm.Card_DO3[(int)b, (int)b2] = 0; bool flag = mainfrm.Card_DI1[(int)b, (int)b2] > 1; if (flag) { ref byte ptr = ref mainfrm.Card_DI1[(int)b, (int)b2]; ptr -= 1; } else { bool flag2 = mainfrm.ds_Card_DI_Call.Tables[0].Rows.Count > 0; if (flag2) { DataTable dataTable = new DataView(mainfrm.ds_Card_DI_Call.Tables[0]) { RowFilter = string.Concat(new string[] { "Card_ID=1 and Port=", b.ToString(), " and bit= ", b2.ToString(), " and value=1 and class =0" }), RowStateFilter = DataViewRowState.OriginalRows }.ToTable(); bool flag3 = dataTable.Rows.Count == 1; if (!flag3) { mainfrm.Card_DI1[(int)b, (int)b2] = 0; } } } bool flag4 = mainfrm.Card_DI2[(int)b, (int)b2] > 1; if (flag4) { ref byte ptr2 = ref mainfrm.Card_DI2[(int)b, (int)b2]; ptr2 -= 1; } else { DataView dataView = new DataView(mainfrm.ds_Card_DI_Call.Tables[0]); bool flag5 = mainfrm.ds_Card_DI_Call.Tables[0].Rows.Count > 0; if (flag5) { dataView.RowFilter = string.Concat(new string[] { "Card_ID=2 and Port=", b.ToString(), " and bit= ", b2.ToString(), " and value=1 and class =0" }); dataView.RowStateFilter = DataViewRowState.OriginalRows; DataTable dataTable2 = dataView.ToTable(); bool flag6 = dataTable2.Rows.Count == 1; if (!flag6) { mainfrm.Card_DI2[(int)b, (int)b2] = 0; } } } bool flag7 = mainfrm.Card_DI3[(int)b, (int)b2] > 1; if (flag7) { ref byte ptr3 = ref mainfrm.Card_DI3[(int)b, (int)b2]; ptr3 -= 1; } else { DataTable dataTable3 = new DataView(mainfrm.ds_Card_DI_Call.Tables[0]) { RowFilter = string.Concat(new string[] { "Card_ID=3 and Port=", b.ToString(), " and bit= ", b2.ToString(), " and value=1 and class =0" }), RowStateFilter = DataViewRowState.OriginalRows }.ToTable(); bool flag8 = dataTable3.Rows.Count == 1; if (!flag8) { mainfrm.Card_DI3[(int)b, (int)b2] = 0; } } } } bool flag9 = mainfrm.ds_Card_DO.Tables[0].Rows.Count > 0; if (flag9) { int[,] array = new int[3, 16]; for (int i = 0; i < mainfrm.ds_Card_DO.Tables[0].Rows.Count; i++) { for (int j = 0; j < (int)Param.AGV_Qty; j++) { bool flag10 = Func.AgvInfo[j].Cross_Location_Go == Func.AgvInfo[j].Location_Display && Func.AgvInfo[j].Cross_Location_Go == (int)Convert.ToInt16(mainfrm.ds_Card_DO.Tables[0].Rows[i]["Loc_ID"].ToString()); if (flag10) { bool flag11 = mainfrm.ds_Card_DO.Tables[0].Rows[i]["Value"].ToString() == "1"; if (flag11) { int num = (int)Convert.ToInt16(mainfrm.ds_Card_DO.Tables[0].Rows[i]["Card_ID"].ToString()); int num2 = (int)Convert.ToInt16(mainfrm.ds_Card_DO.Tables[0].Rows[i]["Bit"].ToString()); array[num - 1, num2 - 1]++; } } } } for (int k = 0; k < 3; k++) { int num3 = 0; int num4 = 0; for (int l = 0; l < 16; l++) { bool flag12 = l >= 0 && l < 8; if (flag12) { num4 = 0; num3 = l; } else { bool flag13 = l >= 8 && l < 16; if (flag13) { num4 = 1; num3 = l - 8; } } bool flag14 = array[k, l] != 0; if (flag14) { bool flag15 = k == 0; if (flag15) { mainfrm.Card_DO1[num4, num3] = 1; } else { bool flag16 = k == 1; if (flag16) { mainfrm.Card_DO2[num4, num3] = 1; } else { bool flag17 = k == 2; if (flag17) { mainfrm.Card_DO3[num4, num3] = 1; } } } } else { bool flag18 = k == 0; if (flag18) { mainfrm.Card_DO1[num4, num3] = 0; } else { bool flag19 = k == 1; if (flag19) { mainfrm.Card_DO2[num4, num3] = 0; } else { bool flag20 = k == 2; if (flag20) { mainfrm.Card_DO3[num4, num3] = 0; } } } } } } } bool flag21 = Param.Card1_Interval > 0; if (flag21) { this.card1_Tick(); } bool flag22 = Param.Card2_Interval > 0; if (flag22) { this.card2_Tick(); } bool flag23 = Param.Card3_Interval > 0; if (flag23) { this.card3_Tick(); } } // Token: 0x0600003D RID: 61 RVA: 0x00005E0C File Offset: 0x0000400C private void pictureBox106_Click(object sender, EventArgs e) { PictureBox pictureBox = (PictureBox)sender; int num = (int)(Convert.ToInt16(pictureBox.Tag.ToString().Split(new char[] { ',' })[0]) - 1); int num2 = (int)(Convert.ToInt16(pictureBox.Tag.ToString().Split(new char[] { ',' })[1]) - 1); bool flag = (num2 >= 0 && num2 < 4) || num2 == 6 || num2 == 7; if (flag) { bool flag2 = num2 >= 0 && num2 < 4; if (flag2) { bool flag3 = MessageBox.Show(string.Concat(new string[] { "是否要重置 ", Frm_A17168.ds_Station_Info.Tables[0].Rows[num][1].ToString().Trim(), " 工位 ", (num2 + 1).ToString(), " 位置编号: ", Frm_A17168.ds_Station_Info.Tables[0].Rows[num][2 + num2].ToString(), " 的状态?" }), "信息", MessageBoxButtons.YesNo, MessageBoxIcon.Asterisk) == DialogResult.Yes; if (flag3) { bool flag4 = Frm_A17168.ds_Station_Info.Tables[0].Rows[num][8 + num2].ToString() == "0"; if (flag4) { Frm_A17168.Array_Station_Info[num, 6 + num2] = 1; Frm_A17168.ds_Station_Info.Tables[0].Rows[num][8 + num2] = 1; Frm_A17168.PB[num, num2].BackgroundImage = Resources._1; } else { Frm_A17168.Array_Station_Info[num, 6 + num2] = 0; Frm_A17168.ds_Station_Info.Tables[0].Rows[num][8 + num2] = 0; Frm_A17168.PB[num, num2].BackgroundImage = Resources._0; } } } else { bool flag5 = num2 == 6 || num2 == 7; if (flag5) { bool flag6 = MessageBox.Show(string.Concat(new string[] { "是否要重置 ", Frm_A17168.ds_Station_Info.Tables[0].Rows[num][1].ToString().Trim(), " 工位 ", (num2 - 3).ToString(), " 位置编号: ", Frm_A17168.ds_Station_Info.Tables[0].Rows[num][(num2 == 6) ? "Station5_LandMark" : "Station6_LandMark"].ToString(), " 的状态?" }), "信息", MessageBoxButtons.YesNo, MessageBoxIcon.Asterisk) == DialogResult.Yes; if (flag6) { bool flag7 = Frm_A17168.ds_Station_Info.Tables[0].Rows[num][(num2 == 6) ? "station5" : "station6"].ToString() == "0"; if (flag7) { Frm_A17168.Array_Station_Info[num, num2 + 8] = 1; Frm_A17168.ds_Station_Info.Tables[0].Rows[num][(num2 == 6) ? "station5" : "station6"] = 1; Frm_A17168.PB[num, num2].BackgroundImage = Resources._1; } else { Frm_A17168.Array_Station_Info[num, 8 + num2] = 0; Frm_A17168.ds_Station_Info.Tables[0].Rows[num][(num2 == 6) ? "station5" : "station6"] = 0; Frm_A17168.PB[num, num2].BackgroundImage = Resources._0; } } } } Frm_A17168.db_station.dtCommit(Frm_A17168.ds_Station_Info); } } // Token: 0x0600003E RID: 62 RVA: 0x00006218 File Offset: 0x00004418 private static int Agv_Count_Area(int worktype, int[] landmark) { int num = 0; for (int i = 0; i < Func.AgvInfo.Length; i++) { bool flag = Func.AgvInfo[i].WorkType == worktype; if (flag) { for (int j = 0; j < landmark.Length; j++) { bool flag2 = Func.AgvInfo[i].Location_Display == landmark[j]; if (flag2) { num++; } } } } return num; } // Token: 0x0600003F RID: 63 RVA: 0x00006290 File Offset: 0x00004490 private void toolStripMenuItem_Save_Location_X_Y_Click(object sender, EventArgs e) { bool flag = MessageBox.Show("是否保存坐标数据?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) == DialogResult.Yes; if (flag) { ClsDBConn_sql clsDBConn_sql = new ClsDBConn_sql(); foreach (object obj in this.panel3.Controls) { Control control = (Control)obj; bool flag2 = control.GetType().Name == "Panel"; if (flag2) { bool flag3 = control.Tag != null; if (flag3) { int x = control.Location.X; int y = control.Location.Y; int num = (int)Convert.ToInt16(control.Tag.ToString().Split(new char[] { '-' })[0]); string sqlstr = string.Concat(new string[] { "update LandMarkInfo set Loc_X=", x.ToString(), ",Loc_Y=", y.ToString(), " where Loc_ID=", num.ToString() }); bool flag4 = clsDBConn_sql.Command(sqlstr).Length > 6; if (flag4) { WriteTxt.SaveLog1("保存坐标数据失败,地标:" + num.ToString(), "坐标数据保存日志", "Syslog"); } } } } } Frm_A17168.maplandmarkisEdit = false; } // Token: 0x06000040 RID: 64 RVA: 0x0000642C File Offset: 0x0000462C private void toolStripMenuItem_Update_location_X_Y_Click(object sender, EventArgs e) { bool flag = MessageBox.Show("是否更改坐标数据?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) == DialogResult.Yes; if (flag) { Frm_A17168.maplandmarkisEdit = true; } else { Frm_A17168.maplandmarkisEdit = false; } } // Token: 0x06000041 RID: 65 RVA: 0x00006468 File Offset: 0x00004668 private void timer3_Tick(object sender, EventArgs e) { bool flag = this.dataGridView1.Rows.Count == 0; if (!flag) { for (int i = 0; i < Func.AgvInfo.Length; i++) { bool flag2 = this.dataGridView1.Rows[i].Cells["设备位置"].Value.ToString() != Func.AgvInfo[i].Location_Display.ToString(); if (flag2) { this.dataGridView1.Rows[i].Cells["设备位置"].Value = Func.AgvInfo[i].Location_Display; } bool flag3 = this.dataGridView1.Rows[i].Cells["状态"].Value.ToString() != Func.AgvInfo[i].Warn_info; if (flag3) { this.dataGridView1.Rows[i].Cells["状态"].Value = Func.AgvInfo[i].Warn_info; } bool bPlcLinked = Func.AgvInfo[i].bPlcLinked; if (bPlcLinked) { bool flag4 = this.dataGridView1.Rows[i].Cells["在线状态"].Value.ToString() != "Onine"; if (flag4) { this.dataGridView1.Rows[i].Cells["在线状态"].Value = "Online"; } } else { bool flag5 = !Func.AgvInfo[i].bPlcLinked; if (flag5) { bool flag6 = this.dataGridView1.Rows[i].Cells["在线状态"].Value.ToString() != "网络中断"; if (flag6) { this.dataGridView1.Rows[i].Cells["在线状态"].Value = "网络中断"; } } } } } } // Token: 0x06000042 RID: 66 RVA: 0x00002460 File Offset: 0x00000660 private void dataGridView1_DataError(object sender, DataGridViewDataErrorEventArgs e) { } // Token: 0x04000009 RID: 9 public static int iJsState = 0; // Token: 0x0400000A RID: 10 public static ClsDBConn_sql newdb = new ClsDBConn_sql(); // Token: 0x0400000B RID: 11 public static Cls_A17168 Agvcontrol = new Cls_A17168(); // Token: 0x0400000C RID: 12 public static Frm_A17168 frm; // Token: 0x0400000D RID: 13 public static DataSet ds_Station_Info = new DataSet(); // Token: 0x0400000E RID: 14 public static DataSet ds_Agv_Info_Interface = new DataSet(); // Token: 0x0400000F RID: 15 public static ClsDBConn_sql db_station = new ClsDBConn_sql(); // Token: 0x04000010 RID: 16 public static ClsDBConn_sql db_Agv_Info = new ClsDBConn_sql(); // Token: 0x04000011 RID: 17 public static BusinessManage businessCtrl; // Token: 0x04000012 RID: 18 public static int TraffAutoTimet = 0; // Token: 0x04000013 RID: 19 public static List autoLeavedDic = new List(); // Token: 0x04000014 RID: 20 public static Dictionary leavedDic = new Dictionary(); // Token: 0x04000015 RID: 21 public static int[,] Array_Station_Info = new int[17, 17]; // Token: 0x04000016 RID: 22 public static int[,] Btn_Filter = new int[17, 3]; // Token: 0x04000017 RID: 23 public static int[,] btn_line = new int[17, 2]; // Token: 0x04000018 RID: 24 public static int[,] Array_Robot_Status = new int[4, 8]; // Token: 0x04000019 RID: 25 public static byte[,] Array_Robot_Set = new byte[4, 8]; // Token: 0x0400001A RID: 26 public static byte[,] Array_Robot_Set_temp = new byte[4, 8]; // Token: 0x0400001B RID: 27 public static int[] nLine_Point_AGV_Num = new int[17]; // Token: 0x0400001C RID: 28 public static PictureBox[,] PB = new PictureBox[17, 9]; // Token: 0x0400001D RID: 29 public static Panel P1; // Token: 0x0400001E RID: 30 public static Panel P2; // Token: 0x0400001F RID: 31 public static Panel P3; // Token: 0x04000020 RID: 32 public static Panel P4; // Token: 0x04000021 RID: 33 public static Panel P5; // Token: 0x04000022 RID: 34 public static Panel P6; // Token: 0x04000023 RID: 35 public static Panel P7; // Token: 0x04000024 RID: 36 public static Panel P8; // Token: 0x04000025 RID: 37 public static Panel P9; // Token: 0x04000026 RID: 38 public static Panel P10; // Token: 0x04000027 RID: 39 public static Panel P11; // Token: 0x04000028 RID: 40 private PictureBox[] led = new PictureBox[16]; // Token: 0x04000029 RID: 41 private Panel[] pnl = new Panel[] { Frm_A17168.P1, Frm_A17168.P2, Frm_A17168.P3, Frm_A17168.P4, Frm_A17168.P5, Frm_A17168.P6, Frm_A17168.P7, Frm_A17168.P8, Frm_A17168.P9, Frm_A17168.P10, Frm_A17168.P11 }; // Token: 0x0400002A RID: 42 public static bool AGV_Running = true; // Token: 0x0400002B RID: 43 public static ArrayList al_AGVClientCls = new ArrayList(); // Token: 0x0400002C RID: 44 private DataSet agv_list = new DataSet(); // Token: 0x0400002D RID: 45 public Frm_A17168.pictureboxset pictureboxSet; // Token: 0x0400002E RID: 46 public Frm_A17168.agvlocation agvLocation; // Token: 0x0400002F RID: 47 private bool b = false; // Token: 0x04000030 RID: 48 private DataSet ds_warn = new DataSet(); // Token: 0x04000031 RID: 49 private byte map_id = 1; // Token: 0x04000032 RID: 50 private byte count = 10; // Token: 0x04000033 RID: 51 public const byte Number = 10; // Token: 0x04000034 RID: 52 public static bool maplandmarkisEdit = false; // Token: 0x02000038 RID: 56 // (Invoke) Token: 0x060002CD RID: 717 public delegate void pictureboxset(PictureBox pb, string str); // Token: 0x02000039 RID: 57 // (Invoke) Token: 0x060002D1 RID: 721 public delegate void agvlocation(string LandMarkID, int agvnum, int map_id); } }