Ejemplo n.º 1
0
 private void FillNewContents(Dictionary <ContentType, LinkedList <KidsNoteContent> > newContents)
 {
     foreach (var each in newContents)
     {
         foreach (var content in each.Value)
         {
             KidsNoteListViewItem lvi = new KidsNoteListViewItem(content.Id, each.Key, content.Title, content.Writer, content.Attachments.Count);
             listViewContents.Items.Add(lvi);
         }
     }
 }
Ejemplo n.º 2
0
        private void listViewContents_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            SelectedContents.Clear();

            foreach (var each in listViewContents.SelectedItems)
            {
                KidsNoteListViewItem item = each as KidsNoteListViewItem;
                if (item != null)
                {
                    SelectedContents.Add(new KeyValuePair <ContentType, ulong>(item.ContentType, item.Id));
                }
            }

            buttonUploadSelected.IsEnabled = SelectedContents.Count != 0;
        }