コード例 #1
0
        public DiskBrowserViewModel(IDiskService diskService, UserDto user)
        {
            if (diskService == null) throw new ArgumentNullException("diskService");
            if (user == null) throw new ArgumentNullException("user");

            _disks = new ObservableCollection<DiskDto>(diskService.Disks(user));

            SelectItemCommand = new Command(SelectItem, o => SelectedDisk != null);
        }
コード例 #2
0
 public OperationProgressViewModel()
 {
     Callbacks = new ExportCallbacks(() => _shouldAbort, OperationCompleted, TotalToProcessChanged, CurrentlyProcessedChanged);
     AbortCommand = new Command(p => _shouldAbort = true, p => (_shouldAbort == false));
 }