示例#1
0
        private void button3_Click(object sender, EventArgs e)
        {
            //we tokenize the word
            List <String> tokens = new List <string>();

            string buffer = null;

            StringBuilder sb = new StringBuilder(textBox2.Text);

            for (int i = 0; i < sb.Length; i++)
            {
                char c = sb[i];
                buffer = buffer + c;

                if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u')
                {
                    //convert
                    tokens.Add(buffer);
                    buffer = null;
                }
            }

            textBox1.Text += "\r\n--------------------------------\r\n";

            HiraganaTable h = new HiraganaTable();

            foreach (var s in tokens)
            {
                textBox1.Text += h.DecodeBlock(s);
            }
        }
示例#2
0
        private void button4_Click(object sender, EventArgs e)
        {
            textBox1.Text += "\r\n--------------------------------\r\n";

            HiraganaTable h  = new HiraganaTable();
            StringBuilder sb = new StringBuilder(textBox2.Text);

            for (int i = 0; i < sb.Length; i++)
            {
                textBox1.Text += h.EncodeBlock(sb[i]);
            }
        }
示例#3
0
        private void button2_Click(object sender, EventArgs e)
        {
            HiraganaTable h = new HiraganaTable();

            textBox1.Text = String.Format("{0}{1}{2}", h.DecodeBlock("ta"), h.DecodeBlock("na"), h.DecodeBlock("ka"));
        }
示例#4
0
        private void button1_Click(object sender, EventArgs e)
        {
            HiraganaTable h = new HiraganaTable();

            textBox1.Text = h.Test(); //builds a table of characters
        }