private void FormMain_Load(object sender, EventArgs e) { RorzeInterface ctrl = new RorzeInterface(this); RouteControl RTCtrl = new RouteControl(this, ctrl); RTCtrl.ConnectAll(); }
private void Form1_Load(object sender, EventArgs e) { Int32 oldWidth = this.Width; Int32 oldHeight = this.Height; this.WindowState = FormWindowState.Normal; this.Width = 1; this.Height = 1; Control[] ctrlForm = new Control[] { formMonitoring, formTestMode }; try { for (int i = 0; i < ctrlForm.Length; i++) { ((Form)ctrlForm[i]).TopLevel = false; tbcMian.TabPages[i].Controls.Add(((Form)ctrlForm[i])); ((Form)ctrlForm[i]).Show(); tbcMian.SelectTab(i); } tbcMian.SelectTab(0); alarmFrom.Show(); //alarmFrom.SendToBack(); alarmFrom.Hide(); } catch (Exception ex) { throw new Exception(ex.ToString()); } //Thread.Sleep(2000); if (SplashScreen.Instance != null) { SplashScreen.Instance.BeginInvoke(new MethodInvoker(SplashScreen.Instance.Dispose)); SplashScreen.Instance = null; } this.Width = oldWidth; this.Height = oldHeight; this.WindowState = FormWindowState.Maximized; RouteCtrl.ConnectAll(); AuthorityUpdate.UpdateFuncGroupEnable("INIT");//init 權限 //RouteCtrl.ConnectAll(); this.Width = oldWidth; this.Height = oldHeight; this.WindowState = FormWindowState.Maximized; HostControl.Events = new ReportEvent(); Dictionary <string, string> param = new Dictionary <string, string>(); param.Add("RED", "False"); param.Add("ORANGE", "False"); param.Add("GREEN", "False"); param.Add("BLUE", "False"); param.Add("BUZZER1", "False"); param.Add("BUZZER2", "False"); RouteCtrl.DIO.SetIO(param); ThreadPool.QueueUserWorkItem(new WaitCallback(UpdateCheckBox)); }
private void button2_Click(object sender, EventArgs e) { button2.Enabled = false; button6.Enabled = true; MainProcess.ConnectAll(); }