private void KelimeIslemleri_Load(object sender, EventArgs e) { WordAccess wordAccess = new WordAccess(); List <Words> wordList = wordAccess.GetAllWords(); foreach (var item in wordList) { dataGridView1.Rows.Add(item.WordID, item.WordEN, item.WordTR); } }
private void btnSubmit_Click(object sender, EventArgs e) { List <Word> myWords = new List <Word>(); var words = txtInput.Text.Split(' '); foreach (string wrd in words) { WordAccess was = new WordAccess(); Word myWord = was.GetObject(wrd); if (myWord == null) { myWord = was.InsertNewWord(wrd); } myWords.Add(myWord); } }
private void WordPopup_Load(object sender, EventArgs e) { System.Media.SoundPlayer popupPlayer = new System.Media.SoundPlayer("sound-effect-pop-up.wav"); popupPlayer.Play(); BackColor = ColorTranslator.FromHtml(RandomBgColor()); WordAccess wordAccess = new WordAccess(); word = wordAccess.GetRandomWord(); lblWord.Text = word.WordEN; GeneralConfig config = new GeneralConfig(); ConfigProperties properties = config.ReadConfigFromFile(); tmrPopup.Interval = properties.PopUpRemainingTime; tmrPopup.Start(); }