예제 #1
0
        private void GetWord_Click(object sender, RoutedEventArgs e)
        {
            Random random = new Random();
            int    rand   = random.Next(1, dataSet.GetLength(0));

            content.Text    = JapaneseRomajiConverter.KanaToRomaji(dataSet[rand, 1]);
            furigana.Text   = dataSet[rand, 1];
            definition.Text = dataSet[rand, 2];
            Debug.WriteLine(definition.Text);
        }
예제 #2
0
        private void DebugOutput(object sender, RoutedEventArgs e)
        {
            Random random = new Random();
            int    rand   = random.Next(1, dataSet.GetLength(0));

            for (int i = 0; i < dataSet.GetLength(1); i++)
            {
                content.Text += dataSet[0, i] + ": ";
                content.Text += dataSet[rand, i] + "\n";
            }

            content.Text += "Romaji: " + JapaneseRomajiConverter.KanaToRomaji(dataSet[rand, 1]);
            content.Text += "\n";
            content.Text += "Katakana: " + ConvertToKatakana(dataSet[rand, 1]);
            content.Text += "\n";
            content.Text += "Hiragana: " + ConvertToHiragana(dataSet[rand, 1]);
            content.Text += "\n";
        }