コード例 #1
0
 public FileReplicatorModule(
     IFilesetService filesetService,
     IRegionManager regionManager)
 {
     _filesetService = filesetService;
     _regionManager  = regionManager;
 }
コード例 #2
0
 public FileReplicatorModule(
     IFilesetService filesetService,
     IRegionManager regionManager)
 {
     _filesetService = filesetService;
     _regionManager = regionManager;
 }
コード例 #3
0
 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;
 }
コード例 #4
0
 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;
 }
コード例 #5
0
 public FileReplicationService(
     IFilesetService filesetService,
     IActivityLogService activityLogService,
     IEventAggregator eventAggregator,
     ScriptEngine scriptEngine)
 {
     _filesetService = filesetService;
     _activityLogService = activityLogService;
     _eventAggregator = eventAggregator;
     _scriptEngine = scriptEngine;
     _watchers = new ConcurrentDictionary<Fileset, List<IDisposable>>();
     _replicationQueue = new BlockingCollection<ReplicationItem>();
     _cts = new CancellationTokenSource();
 }
コード例 #6
0
 public FileReplicationService(
     IFilesetService filesetService,
     IActivityLogService activityLogService,
     IEventAggregator eventAggregator,
     ScriptEngine scriptEngine)
 {
     _filesetService     = filesetService;
     _activityLogService = activityLogService;
     _eventAggregator    = eventAggregator;
     _scriptEngine       = scriptEngine;
     _watchers           = new ConcurrentDictionary <Fileset, List <IDisposable> >();
     _replicationQueue   = new BlockingCollection <ReplicationItem>();
     _cts = new CancellationTokenSource();
 }
コード例 #7
0
        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();
        }
コード例 #8
0
        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();
        }
コード例 #9
0
        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);
        }
コード例 #10
0
        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);
        }