private void LblNext_Click(object sender, EventArgs e) { WordIndex++; if (WordIndex == CurrentBook.WordCardList.Count) { EndCardEvent?.Invoke(new TabTransferDataModel(CurrentBook, "Card"), e); } else { ShowWordCard(); } }
private async void BtnYes_Click(object sender, EventArgs e) { if (IsTest) { txtWord.Visible = true; CurrentBook.WordCardList[WordIndex].History += "2"; } else { lblHidden.Visible = true; CurrentBook.WordCardList[WordIndex].History += "1"; } btnYes.Visible = false; btnNo.Visible = false; lblNext.Visible = false; lblPrevious.Visible = false; CurrentBook.WordCardList[WordIndex].Remember = true; if (IsTest) { await Task.Delay(1000); } else { await Task.Delay(500); } CurrentBook.WordCardList[WordIndex].Count++; if (WordIndex == CurrentBook.WordCardList.Count - 1) { _fileManager.SaveJsonToFile(CurrentBook.BookPath, CurrentBook.WordCardJsonString); EndCardEvent?.Invoke(new TabTransferDataModel(CurrentBook, "Card"), e); } else { WordIndex++; ShowWordCard(); } }