/// <summary> /// Retrieves all settings from the Settings class /// </summary> private void RetrieveSettings() { canImport = settings.CanImport; difficulty = settings.Difficulty; path = settings.ImportedScenesPath; uploadButton.Enabled = importCheckBox.Checked = canImport; pathLabel.Text += path; // set difficulty buttons switch (difficulty) { case Settings.GameDifficulty.Easy: easyRadioButton.Checked = true; break; case Settings.GameDifficulty.Medium: mediumRadioButton.Checked = true; break; case Settings.GameDifficulty.Hard: hardRadioButton.Checked = true; break; } }
private void radioButton_CheckedChanged(object sender, EventArgs e) { if (sender == easyRadioButton) { difficulty = Settings.GameDifficulty.Easy; } else if (sender == mediumRadioButton) { difficulty = Settings.GameDifficulty.Medium; } else { difficulty = Settings.GameDifficulty.Hard; } }