Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (gui == null)
- {
- gui = new App();
- gui.MainWindow = new mainWindow();
- gui.InitializeComponent();
- IsUIOpen = true;
- }
- else if (!IsUIOpen)
- {
- gui.InitializeComponent();
- gui.MainWindow.Show();
- gui.MainWindow = new mainWindow();
- IsUIOpen = true;
- }
- gui.Exit += new System.Windows.ExitEventHandler(settings_FormClosed);
- gui.MainWindow.Closed += new EventHandler(settings_FormClosed);
- private void Cancel_Click(object sender, RoutedEventArgs e)
- {
- presenter.Close();
- this.Close();
- }
- Process myProcess = new Process();
- myProcess.StartInfo.UseShellExecute = false;
- myProcess.StartInfo.FileName = "C:\mysettingsapp\mysettingsapp.exe"; // replace with path to your settings app
- myProcess.StartInfo.CreateNoWindow = false;
- myProcess.Start();
- // the process is started, now wait for it to finish
- myProcess.WaitForExit(); // use WaitForExit(int) to establish a timeout
Add Comment
Please, Sign In to add comment