Ejemplo n.º 1
0
 private void inputTextBox_TextChanged(object sender, EventArgs e)
 {
     if (inputTextBox.Text != placeholder)
     {
         outputTextBox.Text = MorseLib.TextToMorse(inputTextBox.Text);
     }
 }
Ejemplo n.º 2
0
        private async void playbtn_Click(object sender, EventArgs e)
        {
            playbtn.Enabled = false;

            byte[][][] result = MorseLib.TextToMorseBytes(inputTextBox.Text);
            foreach (byte[][] word in result)
            {
                foreach (byte[] letter in word)
                {
                    foreach (byte beep in letter)
                    {
                        if (beep == MorseLib.dot)
                        {
                            await playSound(1);
                        }
                        else if (beep == MorseLib.dash)
                        {
                            await playSound(3);
                        }
                        await symbolDelay();
                    }
                    await letterDelay();
                }
                await wordDelay();
            }

            playbtn.Enabled = true;
        }
Ejemplo n.º 3
0
 public Form1()
 {
     InitializeComponent();
     MorseLib morse = new MorseLib();
 }