示例#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);
            }
        }