コード例 #1
0
        public void DeleteWordItem(WordNoteBookViewModel WordNoteBookViewModel)
        {
            //删去ViewModel
            WordNoteBookViewModelCollection.Remove(WordNoteBookViewModel);
            //删去Model
            //Model.DeleteHistoryItem(WordNoteBookViewModel);

            WordListItemsCountNum = WordNoteBookViewModelCollection.Count;
        }
コード例 #2
0
 public void Delete(WordNoteBookViewModel viewmodelitem)
 {
     WordNoteBookHelper.DeleteByID(viewmodelitem.ID);
     WordNoteBookViewModelCollection.Remove(viewmodelitem);
     foreach (var item in WordNoteBookStackPanel.Children)
     {
         if ((int)(((NoteBookControl)item).Tag) == viewmodelitem.ID)
         {
             WordNoteBookStackPanel.Children.Remove(item);
         }
     }
     Count();
 }