public void save() { RegistryKey registryKey = Registry.CurrentUser; registryKey = registryKey.CreateSubKey(RConfig.KEY + "\\Profiles\\" + Name); registryKey.SetValue("TextEncoding", TextEncoding); registryKey.SetValue("DatVersion", DatVersionAsEnum.ToString()); registryKey.SetValue("LineageDirectory", LineageDirectory); registryKey.SetValue("LineageFile", LineageFile); registryKey.SetValue("EditorColor", ConvertUtilities.ColorToHtmlColor(EditorColor)); registryKey = registryKey.CreateSubKey("Columns"); foreach (String keys in _columnSize.Keys) { RegistryKey subkey = registryKey.CreateSubKey(keys); if (_columnSize.ContainsKey(keys)) { foreach (String key2 in _columnSize[keys].Keys) { subkey.SetValue(key2, _columnSize[keys][key2]); } } } }
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { //MainForm.Instance.ColorDialog.Color = (Color)value; Color co = ConvertUtilities.HtmlColorToColor(value.ToString()); MainForm.Instance.ColorDialog.Color = co; if (MainForm.Instance.ColorDialog.ShowDialog() == DialogResult.OK) { return(ConvertUtilities.ColorToHtmlColor(MainForm.Instance.ColorDialog.Color)); } return(value); }
public override string ToString() { return(ConvertUtilities.ColorToHtmlColor(Value)); }