public AppTaskbarIconHandler(
     IFilesetService filesetService,
     IFileReplicationService replicationService,
     IEventAggregator eventAggregator)
 {
     _filesetService     = filesetService;
     _replicationService = replicationService;
     _eventAggregator    = eventAggregator;
     _commandBar         = new CommandBar();
     _lastActiveFilesets = new ObservableCollection <Fileset>();
     _taskbarIcon        = Application.Current.TryFindResource("App_TaskbarIcon") as TaskbarIcon;
 }
 public AppTaskbarIconHandler(
     IFilesetService filesetService,
     IFileReplicationService replicationService,
     IEventAggregator eventAggregator)
 {
     _filesetService = filesetService;
     _replicationService = replicationService;
     _eventAggregator = eventAggregator;
     _commandBar = new CommandBar();
     _lastActiveFilesets = new ObservableCollection<Fileset>();
     _taskbarIcon = Application.Current.TryFindResource("App_TaskbarIcon") as TaskbarIcon;
 }
        public FilesetListViewModel(
            Dispatcher dispatcher,
            IFilesetService filesetService, 
            IFileReplicationService replicationService)
        {
            _dispatcher = dispatcher;
            _filesetService = filesetService;
            _replicationService = replicationService;
            _filesets = new ObservableCollection<FilesetViewModel>();

            AddFilesetCommand = new DelegateCommand(ExecuteAddFileset);
            RemoveFilesetCommand = new AutomaticCommand<FilesetViewModel>(ExecuteRemoveFileset, CanExecuteRemoveFileset);
            SaveAllFilesetsCommand = new DelegateCommand(ExecuteSaveAllFilesets);
            ExportFilesetCommand = new AutomaticCommand<FilesetViewModel>(ExecuteExportFileset, CanExecuteExportFileset);
            ImportFilesetCommand = new DelegateCommand(ExecuteImportFileset);
            CommandBar = new CommandBar();
        }
        public FilesetListViewModel(
            Dispatcher dispatcher,
            IFilesetService filesetService,
            IFileReplicationService replicationService)
        {
            _dispatcher         = dispatcher;
            _filesetService     = filesetService;
            _replicationService = replicationService;
            _filesets           = new ObservableCollection <FilesetViewModel>();

            AddFilesetCommand      = new DelegateCommand(ExecuteAddFileset);
            RemoveFilesetCommand   = new AutomaticCommand <FilesetViewModel>(ExecuteRemoveFileset, CanExecuteRemoveFileset);
            SaveAllFilesetsCommand = new DelegateCommand(ExecuteSaveAllFilesets);
            ExportFilesetCommand   = new AutomaticCommand <FilesetViewModel>(ExecuteExportFileset, CanExecuteExportFileset);
            ImportFilesetCommand   = new DelegateCommand(ExecuteImportFileset);
            CommandBar             = new CommandBar();
        }
        public FilesetViewViewModel(
            IFilesetService filesetService,
            IFileReplicationService fileReplicationService,
            IActivityLogService activityLogService)
        {
            _filesetService = filesetService;
            _fileReplicationService = fileReplicationService;
            _activityLogService = activityLogService;
            _categories = new ObservableCollection<string>();

            Categories = CollectionViewSource.GetDefaultView(_categories);

            BrowseDestinationFolderCommand = new AutomaticCommand(ExecuteBrowseDestinationFolder, CanExecuteBrowseDestinationFolder);
            BrowseSourceFolderCommand = new AutomaticCommand(ExecuteBrowseSourceFolder, CanExecuteBrowseSourceFolder);

            AddIncludeFileCommand = new AutomaticCommand(ExecuteAddIncludeFile, CanExecuteAddIncludeFile);
            RemoveIncludeFileCommand = new AutomaticCommand<IEnumerable>(ExecuteRemoveIncludeFile, CanExecuteRemoveIncludeFile);

            AddExcludeFileCommand = new AutomaticCommand(ExecuteAddExcludeFile, CanExecuteAddExcludeFile);
            RemoveExcludeFileCommand = new AutomaticCommand<IEnumerable>(ExecuteRemoveExcludeFile, CanExecuteRemoveExcludeFile);

            ManualCopyCommand = new DelegateCommand(ExecuteManualCopy);
            ClearActivityLogCommand = new DelegateCommand(ExecuteClearActiviyLog);
        }
        public FilesetViewViewModel(
            IFilesetService filesetService,
            IFileReplicationService fileReplicationService,
            IActivityLogService activityLogService)
        {
            _filesetService         = filesetService;
            _fileReplicationService = fileReplicationService;
            _activityLogService     = activityLogService;
            _categories             = new ObservableCollection <string>();

            Categories = CollectionViewSource.GetDefaultView(_categories);

            BrowseDestinationFolderCommand = new AutomaticCommand(ExecuteBrowseDestinationFolder, CanExecuteBrowseDestinationFolder);
            BrowseSourceFolderCommand      = new AutomaticCommand(ExecuteBrowseSourceFolder, CanExecuteBrowseSourceFolder);

            AddIncludeFileCommand    = new AutomaticCommand(ExecuteAddIncludeFile, CanExecuteAddIncludeFile);
            RemoveIncludeFileCommand = new AutomaticCommand <IEnumerable>(ExecuteRemoveIncludeFile, CanExecuteRemoveIncludeFile);

            AddExcludeFileCommand    = new AutomaticCommand(ExecuteAddExcludeFile, CanExecuteAddExcludeFile);
            RemoveExcludeFileCommand = new AutomaticCommand <IEnumerable>(ExecuteRemoveExcludeFile, CanExecuteRemoveExcludeFile);

            ManualCopyCommand       = new DelegateCommand(ExecuteManualCopy);
            ClearActivityLogCommand = new DelegateCommand(ExecuteClearActiviyLog);
        }