예제 #1
0
파일: Main.cs 프로젝트: qq5013/XJ_WCS
        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);
            }
        }
예제 #2
0
파일: Main.cs 프로젝트: haipingma/CL_WMCS
        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);
            }
        }