public CSoilStationMgrForm() { try { m_listImport = new List <CEntitySoilStation>(); m_proxyStation = CDBDataMgr.Instance.GetStationProxy(); m_proxySoilStation = CDBSoilDataMgr.Instance.GetSoilStationProxy(); InitializeComponent(); InitUI(); InitDataSource(); CreateMsgBinding(); } catch (Exception e) { } }
public CSoilStationMgrForm() { try { m_listImport = new List <CEntitySoilStation>(); m_proxyStation = CDBDataMgr.Instance.GetStationProxy(); m_proxySoilStation = CDBSoilDataMgr.Instance.GetSoilStationProxy(); InitializeComponent(); InitUI(); InitDataSource(); CreateMsgBinding(); } #pragma warning disable CS0168 // 声明了变量“e”,但从未使用过 catch (Exception e) { } #pragma warning restore CS0168 // 声明了变量“e”,但从未使用过 }
/// <summary> /// 重新加载数据库 /// </summary> public void ReloadDatabase() { m_proxySoilData = new CSQLSoilData(); m_proxySoilStationProxy = new CSQLSoilStation(); // 初始化站点,建立集合映射 InitSoilStation(); // 先清空墒情站的以前数据 if (RTDSoilDataClear != null) { RTDSoilDataClear.Invoke(this, new EventArgs()); } // 通知界面,查询结果 SendSoilDataMsg(); }
private List <CEntitySubCenter> m_listSubCenter; //所有分中心内存副本 #endregion 成员变量 #region 公共方法 /// <summary> /// 初始化方法 /// </summary> /// <returns></returns> public bool Init() { m_proxySoilData = new CSQLSoilData(); m_proxySoilStationProxy = new CSQLSoilStation(); m_proxySubCenter = new CSQLSubCenter(); m_listSubCenter = m_proxySubCenter.QueryAll(); m_mapStataionLastData = new Dictionary <string, CEntitySoilData>(); // 站点信息变更消息 CDBDataMgr.Instance.StationUpdated += new EventHandler(this.EHStationChanged); CDBSoilDataMgr.Instance.SoilStationUpdated += new EventHandler(TreeMenuReload); // 初始化站点,建立集合映射 InitSoilStation(); // 读取实时文件 ReadSoilXML(); InitSoilStationLastData(); return(true); }
/// <summary> /// 构造方法 初始化成员变量 /// </summary> public Channle2Data() { m_proxyStation = new CSQLStation(); m_proxySoliStation = new CSQLSoilStation(); m_listStations = new List <CEntityStation>(); m_listSoillStations = new List <CEntitySoilStation>(); stationGprsMap = new CDictionary <string, string>(); stationGsmMap = new CDictionary <string, string>(); stationBeidouMap = new CDictionary <string, string>(); hexGprsMap = new CDictionary <string, string>(); hexGsmMap = new CDictionary <string, string>(); hexBeidouMap = new CDictionary <string, string>(); dataProtocol = ""; HexOrASCII = ""; //初始话站点信息没有更新 isUpdated = false; //初始化站点map this.initStations(); }
/// <summary> /// 初始化数据源,连接数据库 /// </summary> /// <param name="proxy"></param> public void InitDataSource(ISoilStationProxy proxy) { m_proxyStation = CDBDataMgr.GetInstance().GetStationProxy(); m_proxySoilStation = proxy; m_listSubCenter = CDBDataMgr.GetInstance().GetAllSubCenter(); }