예제 #1
0
        private void Btn_ToMorse_Click(object sender, EventArgs e)
        {
            string buffer = TextBox.Text;

            TextBox.Text = "";

            foreach (char chr in buffer)
            {
                Console.Write(chr);
                TextBox.Text += MorseCode.ToMorse(chr) + ' ';
            }
        }
예제 #2
0
        private void Btn_FromMorse_Click(object sender, EventArgs e)
        {
            string buffer = TextBox.Text;

            TextBox.Text = "";

            foreach (string str in buffer.Split(' '))
            {
                TextBox.Text += MorseCode.FromMorse(str);
            }
            Console.WriteLine(TextBox.Text);
        }
예제 #3
0
 private void Form1_Load(object sender, EventArgs e)
 {
     TextBox.Text = MorseCode.ToMorse('a');
 }