AppKit.TextKit.Formatter.LanguageDescriptor.SaveColor C# (CSharp) Méthode

SaveColor() public méthode

Saves the given color to the systwm-wide user defaults with the give keyword.
public SaveColor ( string key, NSColor color, bool sync ) : void
key string The user default key to assign the color to.
color NSColor The NSColor to save to the user defaults.
sync bool If set to true sync changes to preferences.
Résultat void
		public void SaveColor(string key, NSColor color, bool sync) {
			// Save to default, add the language ID to make unique
			NSUserDefaults.StandardUserDefaults.SetString(NSColorToHexString(color,true), LanguageIdentifier + key);
			if (sync) NSUserDefaults.StandardUserDefaults.Synchronize ();
		}
		#endregion