Exemple #1
0
        public MusicStoreViewModel()
        {
            this.WhenAnyValue(x => x.SearchText)
            .Where(x => !string.IsNullOrWhiteSpace(x))
            .Throttle(TimeSpan.FromMilliseconds(400))
            .ObserveOn(RxApp.MainThreadScheduler)
            .Subscribe(DoSearch !);

            BuyMusicCommand = ReactiveCommand.CreateFromTask(async() =>
            {
                if (SelectedAlbum is { })
                {
                    await SelectedAlbum.SaveToDiskAsync();
                    return(SelectedAlbum);
                }

                return(null);
            });
Exemple #2
0
 private void Menu_Photo_Delete_Click(object sender, RoutedEventArgs e)
 {
     SelectedAlbum.DeleteSelectedPhotos();
 }
Exemple #3
0
 private void Menu_Photo_Details_Click(object sender, RoutedEventArgs e)
 {
     SelectedAlbum.ShowSelectedPhotoDetails();
 }
Exemple #4
0
 private void Menu_Capture_Click(object sender, RoutedEventArgs e)
 {
     SelectedAlbum.Capture();
 }
Exemple #5
0
 private void Menu_AddPhotos_Click(object sender, RoutedEventArgs e)
 {
     SelectedAlbum.AddPhotosFromStorage();
 }
Exemple #6
0
 internal void Cancel()
 {
     SelectedAlbum.RejectChanges();
 }
Exemple #7
0
 internal void Apply()
 {
     SelectedAlbum.AcceptChanges();
 }