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
            {

            }
        }
 public ViewHistory(MainViewModel viewModel)
 {
     _viewModel = viewModel;
 }
 public SelectFolder(MainViewModel viewModel)
 {
     _viewModel = viewModel;
 }
 public SelectScanMode(MainViewModel viewModel)
 {
     _viewModel = viewModel;
 }
 public LaunchFilterEditor(MainViewModel viewModel)
 {
     _viewModel = viewModel;
 }
 public SaveList(MainViewModel viewModel)
 {
     _viewModel = viewModel;
 }
 public GetChangesManual(MainViewModel viewModel)
 {
     _viewModel = viewModel;
 }
 public GetChangesSince(MainViewModel viewModel)
 {
     _viewModel = viewModel;
 }
Exemple #10
0
 public CopyFiles(MainViewModel viewModel)
 {
     _viewModel = viewModel;
 }
Exemple #11
0
 public ClearList(MainViewModel viewModel)
 {
     _viewModel = viewModel;
 }
Exemple #12
0
 public static Watcher Instance(MainViewModel viewModel)
 {
     if (_instance == null)
         _instance = new Watcher(viewModel);
     return _instance;
 }
Exemple #13
0
 private Watcher(MainViewModel viewModel)
 {
     _vm = viewModel;
     _source = new CancellationTokenSource();
     _disposedValue = false;
 }
Exemple #14
0
        private void Dispose(bool disposing)
        {
            if (!_disposedValue)
            {
                if (disposing)
                {
                    _vm = null;
                    MessageRaised = null;

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

                    _source.Dispose();
                }

                _disposedValue = true;
            }
        }