private int boardDataInit() { int result = 2; bool flag = false; switch (this.FreshFlg_DashBoard) { case 1: if (!EcoGlobalVar.gl_isProcessThreadRuning()) { EcoGlobalVar.gl_StartProcessfThread(false); flag = true; } this.devManDCFloorGrid1.Hide(); this.tlpRackInfo = this.devManDCFloorGrid1.getRackCtrl(); this.tlpRackInfo.SuspendLayout(); this.m_allRacks = ClientAPI.getRackInfo(); foreach (RackInfo rackInfo in this.m_allRacks) { int startPoint_X = rackInfo.StartPoint_X; int startPoint_Y = rackInfo.StartPoint_Y; int endPoint_X = rackInfo.EndPoint_X; int arg_9F_0 = rackInfo.EndPoint_Y; int num; if (startPoint_X == endPoint_X) { num = 0; } else { num = 1; } Label label = new Label(); label.Tag = rackInfo.RackID; label.ForeColor = Color.Silver; label.BackColor = Color.Silver; label.BorderStyle = BorderStyle.FixedSingle; label.Dock = DockStyle.Fill; label.Margin = new Padding(0); label.MouseHover += new System.EventHandler(this.Rack_MouseHover); label.MouseLeave += new System.EventHandler(this.Rack_MouseLeave); this.tlpRackInfo.Controls.Add(label, startPoint_Y, startPoint_X); if (num == 0) { this.tlpRackInfo.SetColumnSpan(label, 2); this.tlpRackInfo.SetRowSpan(label, 1); } else { if (num == 1) { this.tlpRackInfo.SetColumnSpan(label, 1); this.tlpRackInfo.SetRowSpan(label, 2); } } } this.tlpRackInfo.ResumeLayout(); this.m_TitleData_Info = ClientAPI.getDataSet(0); this.FreshFlg_DashBoard = -1; this.devManDCFloorGrid1.Show(); if (flag) { EcoGlobalVar.gl_StopProcessfThread(); } return(0); case 2: this.m_allRacks = ClientAPI.getRackInfo(); this.m_TitleData_Info = ClientAPI.getDataSet(0); this.FreshFlg_DashBoard = -1; return(0); default: return(result); } }
private int boardDataInit() { bool flag = false; switch (this.FreshFlg_DashBoard) { case 1: commUtil.ShowInfo_DEBUG("boardDataInit ---FLGAppAct_DrawRack Begin " + System.DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss:fff")); if (!EcoGlobalVar.gl_isProcessThreadRuning()) { EcoGlobalVar.gl_StartProcessfThread(false); flag = true; } this.devManDCFloorGrid1.Hide(); this.devRackInfo = this.devManDCFloorGrid1.getRackCtrl(); this.devRackInfo.SuspendLayout(); this.m_allRacks = ClientAPI.getRackInfo(); foreach (RackInfo rackInfo in this.m_allRacks) { int startPoint_X = rackInfo.StartPoint_X; int startPoint_Y = rackInfo.StartPoint_Y; int endPoint_X = rackInfo.EndPoint_X; int arg_BE_0 = rackInfo.EndPoint_Y; int num; if (startPoint_X == endPoint_X) { num = 0; } else { num = 1; } Label label = new Label(); label.Tag = rackInfo.RackID; label.ForeColor = Color.Silver; label.BackColor = Color.Silver; label.BorderStyle = BorderStyle.FixedSingle; label.Dock = DockStyle.Fill; label.Margin = new Padding(0); label.MouseHover += new System.EventHandler(this.Rack_MouseHover); label.MouseLeave += new System.EventHandler(this.Rack_MouseLeave); this.devRackInfo.Controls.Add(label, startPoint_Y, startPoint_X); if (num == 0) { this.devRackInfo.SetColumnSpan(label, 2); this.devRackInfo.SetRowSpan(label, 1); } else { if (num == 1) { this.devRackInfo.SetColumnSpan(label, 1); this.devRackInfo.SetRowSpan(label, 2); } } } this.devRackInfo.ResumeLayout(); commUtil.ShowInfo_DEBUG("boardDataInit ---FLGAppAct_DrawRack End " + System.DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss:fff")); this.m_TitleData_Info = ClientAPI.getDataSet(0); this.FreshFlg_DashBoard = -1; this.devManDCFloorGrid1.Show(); if (flag) { EcoGlobalVar.gl_StopProcessfThread(); } return(0); case 2: commUtil.ShowInfo_DEBUG("boardDataInit ---FLGAppAct_modifydata Begin " + System.DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss:fff")); this.m_allRacks = ClientAPI.getRackInfo(); this.m_TitleData_Info = ClientAPI.getDataSet(0); this.FreshFlg_DashBoard = -1; commUtil.ShowInfo_DEBUG("boardDataInit ---FLGAppAct_modifydata End " + System.DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss:fff")); return(0); default: return(1); } }