notice how in key1 audioFilePath = KeyStrings[0]; continue this logic/fix throughout the…
- User
notice how in key_1 audioFilePath = KeyStrings[0];
continue this logic/fix throughout the rest.
private void Key_1_Click(object sender, EventArgs e) { duration = GetWaveFileDuration(audioFilePath); Key_1.ForeColor = Color.Red; audioFilePath = KeyStrings[0]; PlayWavFile(@"C:\Users\DjZaN\OneDrive\Desktop\Digital_Breath\Content\SFX\Click.wav"); } private void Key_2_Click(object sender, EventArgs e) { duration = GetWaveFileDuration(audioFilePath); Key_2.ForeColor = Color.Red; KeyStrings[1] = audioFilePath; PlayWavFile(@"C:\Users\DjZaN\OneDrive\Desktop\Digital_Breath\Content\SFX\Click.wav"); } private void Key_3_Click(object sender, EventArgs e) { duration = GetWaveFileDuration(audioFilePath); Key_3.ForeColor = Color.Red; KeyStrings[2] = audioFilePath; PlayWavFile(@"C:\Users\DjZaN\OneDrive\Desktop\Digital_Breath\Content\SFX\Click.wav"); } private void Key_4_Click(object sender, EventArgs e) { duration = GetWaveFileDuration(audioFilePath); Key_4.ForeColor = Color.Red; KeyStrings[3] = audioFilePath; PlayWavFile(@"C:\Users\DjZaN\OneDrive\Desktop\Digital_Breath\Content\SFX\Click.wav"); } private void Key_5_Click(object sender, EventArgs e) { duration = GetWaveFileDuration(audioFilePath); Key_5.ForeColor = Color.Red; KeyStrings[4] = audioFilePath; PlayWavFile(@"C:\Users\DjZaN\OneDrive\Desktop\Digital_Breath\Content\SFX\Click.wav"); } private void Key_6_Click(object sender, EventArgs e) { duration = GetWaveFileDuration(audioFilePath); Key_6.ForeColor = Color.Red; KeyStrings[5] = audioFilePath; PlayWavFile(@"C:\Users\DjZaN\OneDrive\Desktop\Digital_Breath\Content\SFX\Click.wav"); } private void Key_7_Click(object sender, EventArgs e) { duration = GetWaveFileDuration(audioFilePath); Key_7.ForeColor = Color.Red; KeyStrings[6] = audioFilePath; PlayWavFile(@"C:\Users\DjZaN\OneDrive\Desktop\Digital_Breath\Content\SFX\Click.wav"); } private void Key_8_Click(object sender, EventArgs e) { duration = GetWaveFileDuration(audioFilePath); Key_8.ForeColor = Color.Red; KeyStrings[7] = audioFilePath; PlayWavFile(@"C:\Users\DjZaN\OneDrive\Desktop\Digital_Breath\Content\SFX\Click.wav"); } private void Key_9_Click(object sender, EventArgs e) { duration = GetWaveFileDuration(audioFilePath); Key_9.ForeColor = Color.Red; KeyStrings[8] = audioFilePath; PlayWavFile(@"C:\Users\DjZaN\OneDrive\Desktop\Digital_Breath\Content\SFX\Click.wav"); } private void Key_10_Click(object sender, EventArgs e) { duration = GetWaveFileDuration(audioFilePath); Key_10.ForeColor = Color.Red; KeyStrings[9] = audioFilePath; PlayWavFile(@"C:\Users\DjZaN\OneDrive\Desktop\Digital_Breath\Content\SFX\Click.wav"); } private void Key_11_Click(object sender, EventArgs e) { duration = GetWaveFileDuration(audioFilePath); Key_11.ForeColor = Color.Red; KeyStrings[10] = audioFilePath; PlayWavFile(@"C:\Users\DjZaN\OneDrive\Desktop\Digital_Breath\Content\SFX\Click.wav"); } private void Key_12_Click(object sender, EventArgs e) { duration = GetWaveFileDuration(audioFilePath); Key_12.ForeColor = Color.Red; KeyStrings[11] = audioFilePath; PlayWavFile(@"C:\Users\DjZaN\OneDrive\Desktop\Digital_Breath\Content\SFX\Click.wav"); } private void Key_13_Click(object sender, EventArgs e) { duration = GetWaveFileDuration(audioFilePath); Key_13.ForeColor = Color.Red; KeyStrings[12] = audioFilePath; PlayWavFile(@"C:\Users\DjZaN\OneDrive\Desktop\Digital_Breath\Content\SFX\Click.wav"); } private void Key_14_Click(object sender, EventArgs e) { duration = GetWaveFileDuration(audioFilePath); Key_14.ForeColor = Color.Red; KeyStrings[13] = audioFilePath; PlayWavFile(@"C:\Users\DjZaN\OneDrive\Desktop\Digital_Breath\Content\SFX\Click.wav"); } private void Key_15_Click(object sender, EventArgs e) { duration = GetWaveFileDuration(audioFilePath); Key_15.ForeColor = Color.Red; KeyStrings[14] = audioFilePath; PlayWavFile(@"C:\Users\DjZaN\OneDrive\Desktop\Digital_Breath\Content\SFX\Click.wav"); } private void Key_16_Click(object sender, EventArgs e) { duration = GetWaveFileDuration(audioFilePath); Key_16.ForeColor = Color.Red; KeyStrings[15] = audioFilePath; PlayWavFile(@"C:\Users\DjZaN\OneDrive\Desktop\Digital_Breath\Content\SFX\Click.wav"); } private void Key_17_Click(object sender, EventArgs e) { duration = GetWaveFileDuration(audioFilePath); Key_17.ForeColor = Color.Red; KeyStrings[16] = audioFilePath; PlayWavFile(@"C:\Users\DjZaN\OneDrive\Desktop\Digital_Breath\Content\SFX\Click.wav"); }
- Assistant