GetDefault() public static method

public static GetDefault ( string key ) : object
key string
return object
Exemplo n.º 1
0
        /// <summary>
        /// Gets the default highlight color of the search match.
        /// </summary>
        /// <returns>The default search match highlight color.</returns>
        public static Gdk.Color GetDefaultSearchMatchColor()
        {
            string color_pref = (string)Preferences.GetDefault(Preferences.CUSTOM_SEARCH_MATCH_COLOR);

            // The function may return throw an exception if the color is unparsable,
            // but our precondition is that our default value is always parsable.
            return(GetGdkColorFromHexRgbHashString(color_pref));
        }
Exemplo n.º 2
0
 void BindPreference(string pref_path, EventHandler handler)
 {
     Bind(pref_path,
          (string)Preferences.GetDefault(pref_path),
          handler);
 }