示例#1
0
        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);
            }
        }
示例#2
0
        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);
            }
        }
示例#3
0
        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();
        }