public MainViewModel()
        {
            try
            {
                App.Current.MainWindow.Closing += MainWindow_Closing;

                fileHelper = FileHelpers.Instance;
                fileHelper.MessageRaised += FileHelper_MessageRaised;

                watcher = Watcher.Instance(this);
                watcher.MessageRaised += Watcher_MessageRaised;
                watcher.Run();
            }
            catch
            {
            #if DEBUG
                return;
            #endif
                throw new Exception("Could not start watcher");
            }
        }
 void Dispose(bool disposing)
 {
     if (!disposedValue)
     {
         if (disposing)
         {
             _instance = null;
             MessageRaised = null;
         }
         disposedValue = true;
     }
 }