/// <summary> /// Loads the Colors in the settings.ini with the given setting. /// </summary> /// <param name="setting">The setting to load the Colors from/</param> /// <param name="defaultSetting">The default value in case of failure.</param> /// <returns>The loaded color.</returns> private Colors LoadSetting( string setting, Colors defaultSetting ) { string color = LoadSetting( setting ); Colors set; try { set = (Colors)Enum.Parse( typeof( Colors ), color ); } catch ( Exception ) { set = defaultSetting; } Settings.Add( setting, Tuple.Create<Type, object>( set.GetType(), set ) ); return set; }