public string GetValue(string selectedSetting) { LampSettings setting = (LampSettings)Enum.Parse(typeof(LampSettings), selectedSetting, true); switch (setting) { case LampSettings.Bright: return(Bright.ToString()); default: return(""); } }
public void DecrValue(string selectedSetting) { LampSettings setting = (LampSettings)Enum.Parse(typeof(LampSettings), selectedSetting, true); switch (setting) { case LampSettings.Bright: Bright -= 20; break; default: break; } }