public static ControlCenter getInstance() { if (cc == null) { cc = new ControlCenter(); } return(cc); }
public AcceptForm(ControlCenter cc) { this.cc = cc; InitializeComponent(); FileUtil.WriteFile(Environment.CurrentDirectory, "demojb.txt", this.Handle.ToString()); LogUtil.debug("write demo port:" + this.Handle.ToString()); //MessageBox.Show("demo WINDOW_HANDLER:" + this.Handle.ToString()); httpServer = new HttpServer(); m_thread = new Thread(new ThreadStart(httpServer.start)); m_thread.Name = "Http Thread"; m_thread.Start(); }
private void btnReStart_Click(object sender, RoutedEventArgs e) { isStoprun = true; //先kill SystemUtil.KillProcess("sungrow_touch"); if (cc != null) { cc.clear(); cc = null; } this.startDemo(); }
/// <summary> /// 开始演示程序 /// </summary> private void startDemo() { ConfigPara cpara = ConfigManagerService.GetInstance().LoadConfig(); if (cpara == null || cpara.PlantsInfo.Count == 0 || cpara.TipsPlantsInfo.Count == 0) { MessageBoxResult mbResult; mbResult = MessageBox.Show("您尚未进行任何运行参数配置吗", "系统提示", MessageBoxButton.YesNo); if (mbResult.Equals(MessageBoxResult.Yes) == true) { return; } } //启动电站详情页面程序 startDetailExe(); //启动页面播放控制中心 cc = new ControlCenter(); this.WindowState = WindowState.Minimized; cc.control(); }
public static ControlCenter getInstance() { if (cc == null) { cc = new ControlCenter(); } return cc; }
private void loadAcceptForm(ControlCenter cc) { af = new AcceptForm(cc); af.Hide(); }