private void inputTextBox_TextChanged(object sender, EventArgs e) { if (inputTextBox.Text != placeholder) { outputTextBox.Text = MorseLib.TextToMorse(inputTextBox.Text); } }
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; }
public Form1() { InitializeComponent(); MorseLib morse = new MorseLib(); }