private void selectButton_Click(object sender, EventArgs e) { bool userHasSelectedComponentType = playbackComponentRadioButton.Checked || chargerRadioButton.Checked || removableStorageRadioButton.Checked || simCardRadioButton.Checked; if (userHasSelectedComponentType) { RichTextBoxOutput RichTextBoxOutput = new RichTextBoxOutput(outputOfSettingAndRunningComponentRichTextBox); TextBoxInput TextBoxInput = new TextBoxInput(chosenComponentTypeIndex); SimCorpMobile simCorpMobile = new SimCorpMobile(RichTextBoxOutput); PhoneComponentsHandler phoneComponentsHandler = new PhoneComponentsHandler(output: RichTextBoxOutput, input: TextBoxInput); if (playbackComponentRadioButton.Checked) { phoneComponentsHandler.GetAndProcessUserSelectionOfPlayback(simCorpMobile); } if (chargerRadioButton.Checked) { phoneComponentsHandler.GetAndProcessUserSelectionOfCharger(simCorpMobile); } if (removableStorageRadioButton.Checked) { phoneComponentsHandler.GetAndProcessUserSelectionOfStorage(simCorpMobile); } if (simCardRadioButton.Checked) { phoneComponentsHandler.GetAndProcessUserSelectionOfSimCard(simCorpMobile); } } }
public void ClearOutput() { RichTextBoxOutput.SelectAll(); RichTextBoxOutput.Selection.Text = ""; }