Esempio n. 1
0
        private void Speech()
        {
            txtPinyin.Text   = string.Empty;
            txtHan.Text      = string.Empty;
            txtNghia.Text    = string.Empty;
            txtSentence.Text = string.Empty;

            try
            {
                count = obj.Next();
            }
            catch (Exception)
            {
            }

            if (count < 0)
            {
                obj   = new RandomSet(begin, end);
                count = obj.Next();
            }

            try
            {
                hanci = Database.han[count][5];
            }
            catch
            {
                hanci = Database.han[count][0];
            }

            SpeakText(audioPlayer, hanci);
        }
Esempio n. 2
0
        private void cbbPageEnd_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            endPage = beginPage + cbbPageEnd.SelectedIndex + 1;
            end     = int.Parse(Database.pages[endPage][2]);

            obj = new RandomSet(begin, end);
            Speech();
        }
Esempio n. 3
0
        private void cbbPage_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            begin = int.Parse(Database.pages[cbbPage.SelectedIndex][1]);
            end   = int.Parse(Database.pages[cbbPage.SelectedIndex][2]);;

            obj = new RandomSet(begin, end);
            Speech();
        }