public void AddReviewList(string name) { var kanjiList = new KanjiListViewModel() { Name = name, Kanji = new List<string>(), Bookmark = 0, Completed = false }; kanjiList.PropertyChanged += ReviewListChanged; kanjiLists.Add(kanjiList); isDirty = true; SaveKanjiLists(); CurrentReviewList = kanjiList; }
public void DeleteReviewList(KanjiListViewModel kanjiList) { kanjiLists.Remove(kanjiList); isDirty = true; }
public OperationResult AddKanjiToReviewList(KanjiListViewModel kanjiList, string kanji) { if (kanjiList.Kanji.Contains(kanji)) return new OperationResult() { Result = Result.Failure, Message = "Current kanji has already been added to this review list. Select another review list or go back."}; kanjiList.Kanji.Add(kanji); return new OperationResult() { Result = Result.Success }; }