Inheritance: INotifyPropertyChanged
Ejemplo n.º 1
0
 public void AddBroadcastHistory(BroadcastInfoViewModel info)
 {
   if (BroadcastHistory.Any(i => i.Equals(info))) return;
   var fav    = BroadcastHistory.Where(i =>  i.Favorite);
   var others = BroadcastHistory.Where(i => !i.Favorite);
   BroadcastHistory = new ObservableCollection<BroadcastInfoViewModel>(
     fav.Concat(Enumerable.Repeat(info, 1))
        .Concat(others.Take(19))
   );
 }
Ejemplo n.º 2
0
        public void AddBroadcastHistory(BroadcastInfoViewModel info)
        {
            if (BroadcastHistory.Any(i => i.Equals(info)))
            {
                return;
            }
            var fav    = BroadcastHistory.Where(i => i.Favorite);
            var others = BroadcastHistory.Where(i => !i.Favorite);

            BroadcastHistory = new ObservableCollection <BroadcastInfoViewModel>(
                fav.Concat(Enumerable.Repeat(info, 1))
                .Concat(others.Take(19))
                );
        }