private void Process_Exited(object sender, EventArgs e) { this.uflag = false; GlobalData.Unity3DTrainingflag = this.uflag; UdpCore.Uninit(); this.ButtonContent = MultiLanguage.Enter; GlobalData.mainWindow.WinVisibility = Visibility.Visible; }
private void button_Click(object sender, RoutedEventArgs e) { bool flag = !GlobalData.Connectflag; if (flag) { MessageBox.Show(MultiLanguage.Warn13); } else { bool flag2 = !Connection.isConnected; if (flag2) { MessageBox.Show(MultiLanguage.Warn31); } else { bool flag3 = !this.uflag; if (flag3) { this.uflag = true; GlobalData.Unity3DTrainingflag = this.uflag; UdpCore.Init(); this.ButtonContent = MultiLanguage.Button_exit; bool flag4 = this.UdpRevc.ThreadState == System.Threading.ThreadState.Unstarted; if (flag4) { this.UdpRevc.Start(); } Process process = Process.Start("DEMO.exe"); bool flag5 = process != null; if (flag5) { process.EnableRaisingEvents = true; process.Exited += new EventHandler(this.Process_Exited); } bool flag6 = U3DPage.windowShow != null; if (flag6) { U3DPage.windowShow(false); } GlobalData.mainWindow.WinVisibility = Visibility.Collapsed; } else { this.uflag = false; GlobalData.Unity3DTrainingflag = this.uflag; UdpCore.Uninit(); this.ButtonContent = MultiLanguage.Enter; } } } }