Ejemplo n.º 1
0
 public static void SetFoundItem(DependencyObject obj,
                                   PlaylistItem value)
 {
     obj.SetValue(FoundItemProperty, value);
 }
Ejemplo n.º 2
0
 public static void SetNextItemImage(DependencyObject obj,
                                   PlaylistItem value)
 {
     obj.SetValue(NextItemImageProperty, value);
 }
Ejemplo n.º 3
0
 public static void SetItemInView(DependencyObject obj,
                                   PlaylistItem value)
 {
     obj.SetValue(ItemInViewProperty, value);
 }
Ejemplo n.º 4
0
 private void ChangeNextItemOverride(PlaylistItem newOverride, HaProtoImpl.InjectionType? newType=null)
 {
     if (newType.HasValue)
         mainForm.DataSource.NextItemOverrideAction = newType.Value;
     mainForm.DataSource.NextItemOverride = newOverride;
     mainForm.BroadcastMessage(HaProtoImpl.Opcode.INJECT, new HaProtoImpl.INJECT() {
         uid = newOverride != null ? newOverride.UID : -1,
         type =newType.HasValue ? newType.Value : HaProtoImpl.InjectionType.INJECT_SONG
     });
 }
Ejemplo n.º 5
0
 void player_SongChanged(object sender, PlaylistItem item)
 {
     BroadcastMessage(HaProtoImpl.Opcode.SETSONG, new HaProtoImpl.SETSONG() { uid = item == null ? -1 : item.UID });
 }
 public static void SetAnimatedCurrentItem(DependencyObject obj,
                                   PlaylistItem value)
 {
     obj.SetValue(AnimatedCurrentItemProperty, value);
 }
Ejemplo n.º 7
0
 public bool TryGetItem(long uid, out PlaylistItem result, bool allowLibrarySearch=false)
 {
     foreach (Playlist pl in playlists)
     {
         if (pl.PlaylistItems.FastTryGet(uid, out result))
         {
             return true;
         }
     }
     if (allowLibrarySearch && library.PlaylistItems.FastTryGet(uid, out result))
         return true;
     result = null;
     return false;
 }