public static void iniform() { try { string state; #region 从本地读取配置信息到内存 string realDisplaySync = RealInterfaceFuction.ReadConfig("RealDisplaySync"); if (realDisplaySync == "1") { OprFuction.ReadRealConfigFromDB();//修改支持多个客户端显示设置同步 20180113 } OprFuction.ReadRealDataDisplayConfig(); OprFuction.ReadDefalutDataConfig(); OprFuction.ReadCustomConfig(); #endregion lock (StaticClass.allPointDtLockObj) { StaticClass.AllPointDt = RealInterfaceFuction.GetAllPoint(); for (int i = 0; i < StaticClass.AllPointDt.Rows.Count; i++) { state = StaticClass.AllPointDt.Rows[i]["zt"].ToString(); if (state == StaticClass.itemStateToClient.EqpState24.ToString() || state == StaticClass.itemStateToClient.EqpState43.ToString()) { StaticClass.AllPointDt.Rows[i]["statecolor"] = StaticClass.AllPointDt.Rows[i]["sszcolor"] = OprFuction.GetShowColor(state, StaticClass.AllPointDt.Rows[i]["0tcolor"].ToString(), StaticClass.AllPointDt.Rows[i]["bj"].ToString()); } else if (state == StaticClass.itemStateToClient.EqpState44.ToString() || state == StaticClass.itemStateToClient.EqpState25.ToString()) { StaticClass.AllPointDt.Rows[i]["statecolor"] = StaticClass.AllPointDt.Rows[i]["sszcolor"] = OprFuction.GetShowColor(state, StaticClass.AllPointDt.Rows[i]["1tcolor"].ToString(), StaticClass.AllPointDt.Rows[i]["bj"].ToString()); } else if (state == StaticClass.itemStateToClient.EqpState26.ToString()) { StaticClass.AllPointDt.Rows[i]["statecolor"] = StaticClass.AllPointDt.Rows[i]["sszcolor"] = OprFuction.GetShowColor(state, StaticClass.AllPointDt.Rows[i]["2tcolor"].ToString(), StaticClass.AllPointDt.Rows[i]["bj"].ToString()); } else { StaticClass.AllPointDt.Rows[i]["statecolor"] = StaticClass.AllPointDt.Rows[i]["sszcolor"] = OprFuction.GetShowColor(state, "0", StaticClass.AllPointDt.Rows[i]["bj"].ToString()); } } } real_s = new RealDisplayForm(); real_s.Dock = DockStyle.Fill; real_del = real_s.Gv_init; _type_s = new DisplayNavagation(); _type_s.Dock = DockStyle.Fill; _type_dele = _type_s.refresh; GetbjThread = new Thread(new ThreadStart(OprFuction.GetbjTh)); GetbjThread.Start(); InitRealWarGridControl(); //Initalarm(); } catch (Exception ex) { OprFuction.SaveErrorLogs(ex.Message, ex); } }