Guest User

Untitled

a guest
Jan 15th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. if (gui == null)
  2. {
  3. gui = new App();
  4. gui.MainWindow = new mainWindow();
  5. gui.InitializeComponent();
  6. IsUIOpen = true;
  7. }
  8. else if (!IsUIOpen)
  9. {
  10. gui.InitializeComponent();
  11. gui.MainWindow.Show();
  12. gui.MainWindow = new mainWindow();
  13. IsUIOpen = true;
  14. }
  15.  
  16. gui.Exit += new System.Windows.ExitEventHandler(settings_FormClosed);
  17. gui.MainWindow.Closed += new EventHandler(settings_FormClosed);
  18.  
  19. private void Cancel_Click(object sender, RoutedEventArgs e)
  20. {
  21. presenter.Close();
  22. this.Close();
  23. }
  24.  
  25. Process myProcess = new Process();
  26. myProcess.StartInfo.UseShellExecute = false;
  27. myProcess.StartInfo.FileName = "C:\mysettingsapp\mysettingsapp.exe"; // replace with path to your settings app
  28. myProcess.StartInfo.CreateNoWindow = false;
  29. myProcess.Start();
  30. // the process is started, now wait for it to finish
  31. myProcess.WaitForExit(); // use WaitForExit(int) to establish a timeout
Add Comment
Please, Sign In to add comment