Example #1
0
 private void CommunityListAdd(ListView listView, NiconicoManager.NiconicoAlertItem n)
 {
     if (listView.DataContext == null)
     {
         listView.DataContext = new CollectionViewSource();
         (listView.DataContext as CollectionViewSource).Source = new ObservableCollection <NiconicoManager.NiconicoAlertItem>();
     }
     ((ObservableCollection <NiconicoManager.NiconicoAlertItem>)((CollectionViewSource)listView.DataContext).Source).Add(n);
 }
Example #2
0
 private void MakeCommunityList()
 {
     for (int i = 0; i < NiconicoManager.Instance.Communities.Count; i++)
     {
         NiconicoManager.NiconicoAlertItem alertItem = NiconicoManager.Instance.Communities[i];
         if (alertItem.IsChannel)
         {
             CommunityListAdd(NiconicoChannelList, alertItem);
         }
         else
         {
             CommunityListAdd(NiconicoCommunityList, alertItem);
         }
     }
 }