public MainWindow()
        {
            if (!Globals.Init())
                return;

            InitializeComponent();
            _vm = this.DataContext as MainViewModel;
        }
        public HistoricChangesWindow(MainViewModel mainViewModel)
        {
            try
            {
                if (mainViewModel == null)
                    throw new NullReferenceException("mainViewModel");

                this._mainVm = mainViewModel;
                _currentPath = _mainVm.WatchedFolder;

                InitializeComponent();
            }
            catch
            {

            }
        }
Esempio n. 3
0
 public ViewHistory(MainViewModel viewModel)
 {
     _viewModel = viewModel;
 }
Esempio n. 4
0
 public SelectFolder(MainViewModel viewModel)
 {
     _viewModel = viewModel;
 }
Esempio n. 5
0
 public SelectScanMode(MainViewModel viewModel)
 {
     _viewModel = viewModel;
 }
Esempio n. 6
0
 public LaunchFilterEditor(MainViewModel viewModel)
 {
     _viewModel = viewModel;
 }
Esempio n. 7
0
 public SaveList(MainViewModel viewModel)
 {
     _viewModel = viewModel;
 }
Esempio n. 8
0
 public GetChangesManual(MainViewModel viewModel)
 {
     _viewModel = viewModel;
 }
Esempio n. 9
0
 public GetChangesSince(MainViewModel viewModel)
 {
     _viewModel = viewModel;
 }
Esempio n. 10
0
 public CopyFiles(MainViewModel viewModel)
 {
     _viewModel = viewModel;
 }
Esempio n. 11
0
 public ClearList(MainViewModel viewModel)
 {
     _viewModel = viewModel;
 }
Esempio n. 12
0
 public static Watcher Instance(MainViewModel viewModel)
 {
     if (_instance == null)
         _instance = new Watcher(viewModel);
     return _instance;
 }
Esempio n. 13
0
 private Watcher(MainViewModel viewModel)
 {
     _vm = viewModel;
     _source = new CancellationTokenSource();
     _disposedValue = false;
 }
Esempio n. 14
0
        private void Dispose(bool disposing)
        {
            if (!_disposedValue)
            {
                if (disposing)
                {
                    _vm = null;
                    MessageRaised = null;

                    if (_token.IsCancellationRequested)
                        _source.Cancel();

                    _source.Dispose();
                }

                _disposedValue = true;
            }
        }