コード例 #1
0
ファイル: Rating.cs プロジェクト: PocketAppZ/FoxTunes
 protected override void OnValueChanged(object sender, RatingEventArgs e)
 {
     if (e.FileData is LibraryItem libraryItem)
     {
         var task = RatingManager.SetRating(new[] { libraryItem }, e.Value);
     }
     else if (e.FileData is PlaylistItem playlistItem)
     {
         var task = RatingManager.SetRating(new[] { playlistItem }, e.Value);
     }
     base.OnValueChanged(sender, e);
 }
コード例 #2
0
            protected virtual void OnValueChanged(object sender, RatingEventArgs e)
            {
                var playlistItem = e.FileData as PlaylistItem;

                if (playlistItem == null)
                {
                    return;
                }
                var playlistItems = PlaylistManager.SelectedItems;

                if (playlistItems == null || !playlistItems.Contains(playlistItem))
                {
                    this.SetRating(new[] { playlistItem }, e.Value);
                }
                else
                {
                    this.SetRating(playlistItems.ToArray(), e.Value);
                }
            }
コード例 #3
0
ファイル: RatingBase.xaml.cs プロジェクト: Raimusoft/FoxTunes
 protected virtual void OnValueChanged(object sender, RatingEventArgs e)
 {
     this.RaiseEvent(e);
 }