private void ButtonEventHandler(object sender, EventArgs e) { String buttonName = ((Button)sender).Name; if (buttonName == "readBtn") { callReadPhaseForm(isColorBlind); } else if (buttonName == "writeBtn") { callWritePhaseForm(isColorBlind); } else if (buttonName == "wordBankBtn") { WordBank wordBank = new WordBank(); wordBank.Show(); } else if (buttonName == "mathGameBtn") { MathGame math = new MathGame(); math.ShowDialog(); } else if (buttonName == "spellGameBtn") { SpellingGame spell = new SpellingGame(); spell.Show(); } else if (buttonName == "guessGameBtn") { GuessGame guess = new GuessGame(); guess.Show(); } }
//Extra feature: Math mini-game private void mathTile_Click(object sender, EventArgs e) { MathGame math = new MathGame(); math.ShowDialog(); }
private void ButtonEventHandler(object sender, EventArgs e) { String buttonName = ((Button)sender).Name; if(buttonName == "readBtn") { callReadPhaseForm(isColorBlind); } else if(buttonName == "writeBtn") { callWritePhaseForm(isColorBlind); } else if (buttonName == "wordBankBtn") { WordBank wordBank = new WordBank(); wordBank.Show(); } else if (buttonName == "mathGameBtn") { MathGame math = new MathGame(); math.ShowDialog(); } else if (buttonName == "spellGameBtn") { SpellingGame spell = new SpellingGame(); spell.Show(); } else if (buttonName == "guessGameBtn") { GuessGame guess = new GuessGame(); guess.Show(); } }