Пример #1
0
        private async void OnOpenDrive()
        {
            try
            {
                Reading = true;
                CdItems.Clear();
                CdItemViewModel[] cdTracks = await _cdReaderService.GetTracks(DriveLetter);

                CdItems.AddRange(cdTracks);
                await RaisePropertyChanged(nameof(CdItems));

                Reading = false;
            }
            catch (Exception)
            {
                _dialogService.ShowError(Resources.Error_CdRead);
                Reading = false;
                CdItems.Clear();
            }
            finally
            {
                SelectAllCommand.RaiseCanExecuteChanged();
                DeSelectAllCommand.RaiseCanExecuteChanged();
                ReadCommand.RaiseCanExecuteChanged();
            }
        }
 protected virtual void RaiseCanExecuteEvents()
 {
     MessageCommand.RaiseCanExecuteChanged();
     DeleteCommand.RaiseCanExecuteChanged();
     ReadCommand.RaiseCanExecuteChanged();
     ChangeCategoryCommand.RaiseCanExecuteChanged();
     FollowUpCommand.RaiseCanExecuteChanged();
 }
Пример #3
0
 private void OnSelectOutDir()
 {
     if (_dialogService.ShowFolderSelect(out string path))
     {
         TargetDirectory = path;
     }
     ReadCommand.RaiseCanExecuteChanged();
 }
Пример #4
0
 private void CanExecuteChanged()
 {
     ReadCommand.RaiseCanExecuteChanged();
     RemoveCommand.RaiseCanExecuteChanged();
     ListenCommand.RaiseCanExecuteChanged();
 }
Пример #5
0
 private void OnCdItemsChanged(object sender, ListChangedEventArgs e)
 {
     SelectAllCommand.RaiseCanExecuteChanged();
     DeSelectAllCommand.RaiseCanExecuteChanged();
     ReadCommand.RaiseCanExecuteChanged();
 }