Exemple #1
0
        private void MonitorForm_Load(object sender, EventArgs e)
        {
            lblTitle.Text = PubConstant.Product;
            timer.Start();

            DbHelperSQLite.connectionString = "Data Source=" + Application.StartupPath + "\\IOProject\\Station.station";

            btnClose.Location = new Point(this.Width - btnClose.Width, btnClose.Location.Y);
            btMin.Location    = new Point(this.Width - btnClose.Width - btMin.Width - 4, btnClose.Location.Y);
            btMax.Location    = new Point(this.Width - btnClose.Width - btMin.Width - btMax.Width - 6, btnClose.Location.Y);

            try
            {
                runBakcMenu.Checked     = IOMonitorManager.IsBackRun;
                runBackToolMenu.Checked = IOMonitorManager.IsBackRun;
                MonitorFormManager.InitMonitorMainForm(this);

                IOMonitorManager.OnMonitorException += MonitorManager_OnMonitorException;


                IOMonitorManager.OnMonitorReceive += IOMonitorManager_OnMonitorReceive;
            }
            catch (Exception ex)
            {
                MonitorFormManager.AppendLogItem(ex.Message);
            }
        }
Exemple #2
0
        /// <summary>
        /// 异常处理
        /// </summary>
        /// <param name="ex"></param>

        private void MonitorManager_OnMonitorException(Exception ex)
        {
            MonitorFormManager.AppendLogItem(ex.Message);
        }
Exemple #3
0
        //采集服务器操作返回事件



        //写入之日
        private void MonitorManager_OnMonitorLog(string log)
        {
            MonitorFormManager.AppendLogItem(log);
        }