Exemple #1
0
        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();
        }
Exemple #2
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            string comm = comm_daemon.getInstance().CheckPortState() ? "已打开" : "已关闭";
            string tm   = string.Format("系统时间:{0}", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));

            txtNetWorkState.Text = string.Format("当前网络状态:{0}  |  软件版本:{1}  |  {2} | 雨量采集端口[{3}]:{4}",
                                                 CDataUpload.getInstance().NetWorkState, CSoftInfo.getInstance().Verson, tm, comm_daemon.getInstance().COMX, comm);
        }
Exemple #3
0
 private void ObjectInitialze()
 {
     m_pUpLoad = CDataUpload.getInstance();
     m_pUpLoad.SetCommSiteID(CINIFile.IniReadValue("基本信息", "MTUP标识", paths.baseInfoPath));
     m_pDbHelper = rainfallsDBHelper.getInstance(new SQLiteDbHelper(), m_pUpLoad);
 }