//Shows Converter Menu private void ShowConverter() { //Show the converter menu's controls and labels CategoryLabel.Show(); CategoryComboBox.Show(); InstructionLabel.Show(); ValueOfLabel.Show(); UserInputTextBox.Show(); FromLabel.Show(); InitialUnitsComboBox.Show(); ToLabel.Show(); ResultingUnitsComboBox.Show(); BackButtonLabel.Show(); BackButton.Show(); DividerLabel.Show(); UserInputTextBox.Focus(); }
//Overrided method accepting a category parameter obtained from menu selection private void ShowConverter(String category) { //Shows the converter menu's controls and labels CategoryLabel.Show(); CategoryComboBox.Show(); InstructionLabel.Show(); ValueOfLabel.Show(); UserInputTextBox.Show(); FromLabel.Show(); InitialUnitsComboBox.Show(); ToLabel.Show(); ResultingUnitsComboBox.Show(); ConvertSubmissionButton.Show(); BackButtonLabel.Show(); BackButton.Show(); DividerLabel.Show(); //Selects the category field in the converter CategoryComboBox.SelectedIndex = CategoryComboBox.FindStringExact(category); //Shows the default units of measurement ShowDefaultUnits(category); UserInputTextBox.Focus(); }