コード例 #1
0
ファイル: frmMain.cs プロジェクト: zzdwsourcesafe/rainfalls
        private void frmMain_Load(object sender, EventArgs e)
        {
            m_pUpLoad = CDataUpload.getInstance();
            IniHelper.IniWriteValue("System", paths.MainHandle, this.Handle.ToInt32().ToString(), paths.HandlePath);

            string ip = CINIFile.IniReadValue("基本信息", "MTUP_IP", paths.baseInfoPath);

            //SQLite操作对象
            m_pDbHelper = rainfallsDBHelper.getInstance(new SQLiteDbHelper(), m_pUpLoad);
            //报警算法
            m_pDbHelper.InitQueueR();
            InitializationRainfalls();

            m_pInitCtrlThread = new Thread(new ThreadStart(InitializeCtrl));
            m_pInitCtrlThread.Start();
            //InitSiteCtrlThread = new Thread(new ThreadStart(initializeSiteObj));
            //InitSiteCtrlThread.Start();
            m_pInitRainMapEventThread = new Thread(new ThreadStart(UnicomInterface));
            m_pInitRainMapEventThread.Start();

            NetWorkCls.onNotify += new Notity(NetWorkCls_onNotify);
            //   System.Threading.Timer timer = new System.Threading.Timer(new TimerCallback(timer_Elapsed), null, 0, 1000);
            Thread NetWorkThread = new Thread(new ThreadStart(timer_Elapsed));

            NetWorkThread.Start();
            Sysinfo();
        }
コード例 #2
0
 private void ObjectInitialze()
 {
     m_pUpLoad = CDataUpload.getInstance();
     m_pUpLoad.SetCommSiteID(CINIFile.IniReadValue("基本信息", "MTUP标识", paths.baseInfoPath));
     m_pDbHelper = rainfallsDBHelper.getInstance(new SQLiteDbHelper(), m_pUpLoad);
 }