예제 #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();
            }
        }
예제 #2
0
        /// <summary>
        /// 子供の検索(無駄にasync)
        /// </summary>
        private async void Search()
        {
            await _model.SearchChildDirectoryTaskAsync();


            SelectAllCommand.RaiseCanExecuteChanged();
            DeselectAllCommand.RaiseCanExecuteChanged();
        }
예제 #3
0
 private void OnCdItemsChanged(object sender, ListChangedEventArgs e)
 {
     SelectAllCommand.RaiseCanExecuteChanged();
     DeSelectAllCommand.RaiseCanExecuteChanged();
     ReadCommand.RaiseCanExecuteChanged();
 }
예제 #4
0
 private void RaiseCanExecuteChanged()
 {
     UpdateSelectedFilesCommand.RaiseCanExecuteChanged();
     SelectAllCommand.RaiseCanExecuteChanged();
     SelectNoneCommand.RaiseCanExecuteChanged();
 }