Example #1
0
        private void Main_Shown(object sender, EventArgs e)
        {
            try
            {
                lbLog.Scrollable = true;
                Logger.OnLog += new LogEventHandler(Logger_OnLog);
                context = new Context();

                ContextInitialize initialize = new ContextInitialize();
                initialize.InitializeContext(context);

                View.frmMonitor f = new View.frmMonitor();
                ShowForm(f);

                tmWorkTimer.Interval = 3000;
                tmWorkTimer.Elapsed += new System.Timers.ElapsedEventHandler(tmWorker);
                tmWorkTimer.Start();

            }
            catch (Exception ee)
            {
                Logger.Error("初始化处理失败请检查配置,原因:" + ee.Message);
            }
        }
Example #2
0
        private void Main_Shown(object sender, EventArgs e)
        {
            try
            {
                lbLog.Scrollable = true;
                Logger.OnLog += new LogEventHandler(Logger_OnLog);
                FormDialog.OnDialog += new DialogEventHandler(FormDialog_OnDialog);
                context = new Context();

                ContextInitialize initialize = new ContextInitialize();
                initialize.InitializeContext(context);

                if (BLL.Server.GetTaskTest() == "0")
                {
                    this.toolStripButton1.Visible = false;
                }

                View.frmMonitor f = new View.frmMonitor();
                ShowForm(f);

                //tmWorkTimer.Interval = 3000;
                //tmWorkTimer.Elapsed += new System.Timers.ElapsedEventHandler(tmWorker);
                //tmWorkTimer.Start();

            }
            catch (Exception ee)
            {
                Logger.Error("初始化处理失败请检查配置,原因:" + ee.Message);
            }
        }