private void FinishLearning() { LearnedWord learned = new LearnedWord(progressedWord.WordIng, progressedWord.WordTr, progressedWord.WordType, progressedWord.Sentence, DateTime.Now); Db_Learning.DeleteWord(progressedWord); Db_Learned.SetWord(learned); }
public void StartLearning() { level = 1; Date = DateTime.Now.AddDays(1); Db_Learning.UpdateWord(progressedWord); }
private void Start() { List <Word> askableWord = new List <Word>(); foreach (Word w in Db_Learning.GetAllWords()) { if (DateTime.Now > w.wordProgress.Date) { askableWord.Add(w); } } if (askableWord.Count > 0) { AskQuestion(askableWord); } }
public void NextLevel() { level++; switch (level) { case 2: Date = DateTime.Now.AddMonths(1); break; case 3: Date = DateTime.Now.AddMonths(6); break; case 4: Date = DateTime.Now.AddYears(1); break; case 5: FinishLearning(); return; } Db_Learning.UpdateWord(progressedWord); }
public void Button_AddWord() { if (wordIng.text == "" || wordTr.text == "") { PopUp("Zorunlu yerleri doldurun"); } else { Word word = new Word(wordIng.text, wordTr.text, wordType.options[wordType.value].text, sentence.text); word.wordProgress.StartLearning(); Db_Learning.SetWord(word); PopUp("Kayıt Başarılı"); ResetTextbox(); } }
void GetAllLearningWords() { List <Word> words = Db_Learning.GetAllWords(); foreach (Word word in words) { GameObject wordObj = new GameObject(); wordObj.transform.localScale = new Vector3(1, 1, 1); wordObj.transform.parent = panel.transform; wordObj.AddComponent <Text>(); Text text = wordObj.GetComponent <Text>(); text.text = word.WordIng + " - " + word.WordTr; text.font = Resources.GetBuiltinResource(typeof(Font), "Arial.ttf") as Font; text.fontSize = 32; text.alignment = TextAnchor.MiddleCenter; text.color = Color.black; text.transform.localScale = new Vector3(1, 1, 1); } }