private void button_Click(object sender, RoutedEventArgs e) { numnotes = Int32.Parse(textBox1.Text); //take in user input for numnotes from textBox1 millisec = Int32.Parse(textBox1_Copy.Text); //take in user input for millisec from textBox1_Copy sheet = NoteGenerator.creator(comboBox.Text, numnotes); j = 0; textBox.Text = String.Join(Environment.NewLine, sheet); //this.button.Click += new RoutedEventHandler(button_Click); //read through sheet and play each note }
private void dispatcherTimer_Tick(object sender, EventArgs e) { if (j >= numnotes || halt) { dispatcherTimer.Stop(); return; } else { NoteGenerator.notePlayer(sheet[j]); j++; } }