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); this.TimeDiff = int.Parse(context.Attributes["TimeDiff"].ToString()); string MonitorMode = context.Attributes["MonitorMode"].ToString(); View.BaseForm f; if (MonitorMode == "1") { f = new View.frmMonitor(); } else { f = new View.frmMonitor1(); } ShowForm(f); //tmWorkTimer.Interval = 3000; //tmWorkTimer.Elapsed += new System.Timers.ElapsedEventHandler(tmWorker); //tmWorkTimer.Start(); } catch (Exception ee) { Logger.Error("初始化处理失败请检查配置,原因:" + ee.Message); } }
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); } }
private void ToolStripMenuItem_Crane_Click(object sender, EventArgs e) { if (Screen.PrimaryScreen.WorkingArea.Width > 1366) { View.frmMonitor2 f = new View.frmMonitor2(); ShowForm(f); } else { View.frmMonitor f = new View.frmMonitor(); ShowForm(f); } }
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); View.BaseForm f; if (Program.WarehouseCode == "A") { f = new View.frmMonitorA(); } else if (Program.WarehouseCode == "B") { f = new View.frmMonitorB(); } else { f = new View.frmMonitor(); } ShowForm(f); MainData.OnTask += new TaskEventHandler(Data_OnTask); this.BindData(); for (int i = 0; i < this.dgvMain.Columns.Count - 1; i++) { ((DataGridViewAutoFilterTextBoxColumn)this.dgvMain.Columns[i]).FilteringEnabled = true; } tmWorkTimer.Interval = 3000; tmWorkTimer.Elapsed += new System.Timers.ElapsedEventHandler(tmWorker); tmWorkTimer.Start(); tmUpErpWorkTimer.Interval = 600000; tmUpErpWorkTimer.Elapsed += new System.Timers.ElapsedEventHandler(tmUpErpWorker); tmUpErpWorkTimer.Start(); PermissionControl(); } catch (Exception ee) { Logger.Error("初始化处理失败请检查配置,原因:" + ee.Message); } }
private void Main_Shown(object sender, EventArgs e) { try { lbLog.Scrollable = true; Logger.OnLog += new LogEventHandler(Logger_OnLog); FormDialog.OnDialog += new DialogEventHandler(FormDialog_OnDialog); MainData.OnTask += new TaskEventHandler(Data_OnTask); this.BindData(); for (int i = 0; i < this.dgvMain.Columns.Count - 1; i++) { if (this.dgvMain.Columns[i].DataPropertyName.ToLower().IndexOf("date") == -1) { ((DataGridViewAutoFilterTextBoxColumn)this.dgvMain.Columns[i]).FilteringEnabled = true; } } tmWorkTimer.Interval = 3000; tmWorkTimer.Elapsed += new System.Timers.ElapsedEventHandler(tmWorker); tmWorkTimer.Start(); toolStripButton_Login.Image = App.Properties.Resources.user_remove; toolStripButton_Login.Text = "注销用户"; PermissionControl(); //连接RFID Thread firstChild = new Thread(new ParameterizedThreadStart(ThreadProc)); firstChild.IsBackground = true; firstChild.Start(firstChild.Name); //初始化OPC context = new Context(); ContextInitialize initialize = new ContextInitialize(); initialize.InitializeContext(context); View.frmMonitor f = new View.frmMonitor(); ShowForm(f); } catch (Exception ee) { Logger.Error("初始化处理失败请检查配置,原因:" + ee.Message); } }
private void Main_Load(object sender, EventArgs e) { try { bll = new BLLBase(); lbLog.Scrollable = true; Logger.OnLog += new LogEventHandler(Logger_OnLog); context = new Context(); ContextInitialize initialize = new ContextInitialize(); initialize.InitializeContext(context); System.Threading.Thread.Sleep(3000); if (Screen.PrimaryScreen.WorkingArea.Width > 1366) { View.frmMonitor2 f = new View.frmMonitor2(); ShowForm(f); } else { View.frmMonitor f = new View.frmMonitor(); ShowForm(f); } tmWorkTimer.Interval = 5000; tmWorkTimer.Elapsed += new System.Timers.ElapsedEventHandler(tmWorker); tmWorkTimer.Start(); } catch (Exception ee) { Logger.Error("初始化处理失败请检查配置,原因:" + ee.Message); } MainData.OnTask += new TaskEventHandler(Data_OnTask); for (int i = 0; i < 3; i++) { ((DataGridViewAutoFilterTextBoxColumn)this.dgvMain.Columns[i]).FilteringEnabled = true; } }
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); MainData.OnTask += new TaskEventHandler(Data_OnTask); this.BindData(); for (int i = 0; i < this.dgvMain.Columns.Count - 1; i++) { ((DataGridViewAutoFilterTextBoxColumn)this.dgvMain.Columns[i]).FilteringEnabled = true; } tmWorkTimer.Interval = 3000; tmWorkTimer.Elapsed += new System.Timers.ElapsedEventHandler(tmWorker); tmWorkTimer.Start(); //tmWorkTimer.Interval = 3000; //tmWorkTimer.Elapsed += new System.Timers.ElapsedEventHandler(tmWorker); //tmWorkTimer.Start(); } catch (Exception ee) { Logger.Error("初始化处理失败请检查配置,原因:" + ee.Message); } }
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); } }
private void ToolStripMenuItemMonitor_Click(object sender, EventArgs e) { View.frmMonitor f = new View.frmMonitor(); ShowForm(f); }