Exemple #1
0
 private static void NewWindow(bool newDispatcher)
 {
     if (newDispatcher)
     {
         Thread thread = new Thread(new ThreadStart(NewDispatcherWindow));
         thread.SetApartmentState(ApartmentState.STA);
         thread.Start();
     }
     else
     {
         var mainWindow = new MainWindow();
         mainWindow.Show();
     }
 }
Exemple #2
0
 private static void NewDispatcherWindow()
 {
     MainWindow newWindow = new MainWindow();
     newWindow.Show();
     Dispatcher.Run();
 }