Esempio n. 1
0
        public string GetValue(string selectedSetting)
        {
            LampSettings setting = (LampSettings)Enum.Parse(typeof(LampSettings), selectedSetting, true);

            switch (setting)
            {
            case LampSettings.Bright:
                return(Bright.ToString());

            default:
                return("");
            }
        }
Esempio n. 2
0
        public void DecrValue(string selectedSetting)
        {
            LampSettings setting = (LampSettings)Enum.Parse(typeof(LampSettings), selectedSetting, true);

            switch (setting)
            {
            case LampSettings.Bright:
                Bright -= 20;
                break;

            default:
                break;
            }
        }