private void WindowStartup( Object sender,  StartupEventArgs e)
 {
     //Get the main windows after created on startup
     this.window = (DesktopMainWindow)((App)sender).MainWindow;
     this.window.LoadFilesFromFolder(FilesFolder);
     this.window.Executor += this.Executor;
    
     pauseEventsDelegate += this.window.PauseEvents;
     startEventsDelegate += this.window.StartEvents;
 }
 public void StopThread()
 {
     if (!IsThreadRunning()) return;
     if (window.Dispatcher.CheckAccess())
     {
         window.Close();
     }
     else
     {
         //FIXME It will always close and terminate thread?
         window.Dispatcher.Invoke(DispatcherPriority.Normal, new ThreadStart(window.Close));                
         window = null;
         thread = null;
     }
 }
Example #3
0
 private void Application_Startup(object sender, StartupEventArgs e)
 {
     DesktopMainWindow window = new DesktopMainWindow();
     Application.Current.MainWindow = window;
     this.MainWindow.Show();
 }