Exemple #1
0
 public DriveSelectViewModel()
 {
     mode           = DriveSelectMode.Individual;
     selectedDrives = new ObservableCollection <DriveViewModel>();
     folderPath     = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
     validSelection = false;
     driveComparer  = new DriveComparer();
     icons          = null;
     drives         = new DriveCollection(this);
     selectedDrives.CollectionChanged += OnSelectionChanged;
 }
        /// <summary>Constructrs the <see cref="DriveSelectViewModel"/>.</summary>
        public DriveSelectViewModel(SettingsService settings,
                                    IUIService ui,
                                    IWindowDialogService dialog,
                                    IIconCacheService iconCache,
                                    ScanningService scanning)
        {
            Settings  = settings;
            UI        = ui;
            Dialogs   = dialog;
            IconCache = iconCache;
            Scanning  = scanning;

            Drives        = new DriveItemViewModelCollection(this);
            DriveComparer = new DriveComparer();

            SelectedDrives = new ObservableCollection <DriveItemViewModel>();
            SelectedDrives.CollectionChanged += OnSelectedDrivesChanged;
        }
        /// <summary>Constructrs the <see cref="DriveSelectViewModel"/>.</summary>
        public DriveSelectViewModel(SettingsService settings,
                                    UIService ui,
                                    IMyDialogService dialog,
                                    IconCacheService iconCache,
                                    ScanningService scanning,
                                    RelayCommandFactory relayFactory)
            : base(relayFactory)
        {
            Settings  = settings;
            UI        = ui;
            Dialogs   = dialog;
            IconCache = iconCache;
            Scanning  = scanning;

            Drives        = new DriveItemViewModelCollection(this);
            DriveComparer = new DriveComparer();

            SelectedDrives = new ObservableCollection <DriveItemViewModel>();
            SelectedDrives.CollectionChanged += OnSelectedDrivesChanged;
        }