public static void SaveSettings() { try { DecoupledStorage store = CodeRush.Options.GetStorage(GetCategory(), GetPageName()); if (store != null) { store.WriteBoolean("Config", "Enabled", MiniCodeColumnEnabled); store.WriteBoolean("Config", "WordDoubleClickEnabled", WordDoubleClickEnabled); // store.WriteInt32("Config", "ColumnWidth", ColumnWidth); store.WriteInt32("Config", "ColumnBackgroundColor", ColumnBackgroundColor.ToArgb()); store.WriteInt32("Config", "ColumnBackgroundColorSelectedWord", ColumnBackgroundColorSelectedWord.ToArgb()); store.WriteInt32("Config", "ColumnVisibleLinesColor", ColumnVisibleLinesColor.ToArgb()); store.WriteInt32("Config", "CodeColorNormalLine", CodeColorNormalLine.ToArgb()); store.WriteInt32("Config", "CodeColorPenSelectedWord", CodeColorSelectedWord.ToArgb()); store.WriteInt32("Config", "CodeColorCommentLine", CodeColorCommentLine.ToArgb()); } } catch { } }
public void Save(DecoupledStorage storage) { if (storage != null) { storage.WriteBoolean("General", "KeepFirstAttribute", KeepFirstAttribute); storage.WriteBoolean("General", "SortAttributes", Sort); } }
public void Save(DecoupledStorage storage) { storage.WriteBoolean(STR_Preferences, STR_ShowBeacon, ShowBeacon); storage.WriteColor(STR_Preferences, STR_BeaconColor, BeaconColor); storage.WriteInt32(STR_Preferences, STR_BeaconDuration, BeaconDuration); storage.WriteBoolean(STR_Preferences, STR_RollOverOnPrevNext, RollOverOnPrevNext); storage.WriteBoolean(STR_Preferences, STR_SkipSelectionMarkers, SkipSelectionMarkers); }
public void Save(DecoupledStorage storage, string section, string prefix) { storage.WriteInt32(section, prefix + "KeyState", _KeyState); storage.WriteInt32(section, prefix + "KeyCode", _KeyCode); storage.WriteBoolean(section, prefix + "Ctrl", _Ctrl); storage.WriteBoolean(section, prefix + "Shift", _Shift); storage.WriteBoolean(section, prefix + "Alt", _Alt); storage.WriteBoolean(section, prefix + "RightSide", _RightSide); storage.WriteBoolean(section, prefix + "Extended", _Extended); }
void saveSettings() { try { if (chkEnabled.Checked && string.IsNullOrEmpty(textHqlNamedQueryFileName.Text)) { throw new Exception("Hql Named Queries File Name cannot be empty"); } enabled = chkEnabled.Checked; findHqlFileStrategy = comboFindHqlFileStrategy.SelectedIndex; hqlNamedQueryFileName = textHqlNamedQueryFileName.Text; using (DecoupledStorage storage = OptExtractHqlNamedQuery.Storage) { storage.WriteBoolean("ExtractHqlNamedQuery", "Enabled", enabled); storage.WriteInt32("ExtractHqlNamedQuery", "FindHqlFileStrategy", findHqlFileStrategy); storage.WriteString("ExtractHqlNamedQuery", "HqlNamedQueryFileName", hqlNamedQueryFileName); } } catch (Exception ex) { ExtractHqlNamedQuery.ShowException(ex); } }
public override void Save(DecoupledStorage storage, string section, int index) { base.Save(storage, section, index); storage.WriteBoolean(section, "IsGroup" + index, true); // Use later to determine if this is a group on loading. storage.WriteInt32(section, "GroupCount" + index, keys.Count); // Use later to determine number of elements in this group. storage.WriteEnum(section, "Type" + index, Type); for (int i = 0; i < keys.Count; i++) { keys[i].Save(storage, String.Format("{0}.Group{1}", section, index), i); } }
void saveSettings() { try { enabled = chkEnabled.Checked; dropMarker = chkDropMarker.Checked; showBeacon = chkShowBeacon.Checked; useGoToDef = chkUseGoToDef.Checked; using (DecoupledStorage storage = OptNavigateToDefinition.Storage) { storage.WriteBoolean("NavigateToDefinition", "Enabled", enabled); storage.WriteBoolean("NavigateToDefinition", "DropMarker", dropMarker); storage.WriteBoolean("NavigateToDefinition", "ShowBeacon", showBeacon); storage.WriteBoolean("NavigateToDefinition", "UseGoToDef", useGoToDef); } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
protected void SaveFolderInfo(DecoupledStorage storage) { if (storage == null) { return; } storage.WriteBoolean("FolderInfo", "Enabled", Enabled); //string lDescription = TextUtils.EncodeText(Description); string lDescription = CodeRush.StrUtil.EncodeText(Description); storage.WriteString("FolderInfo", "Description", lDescription); storage.WriteEnum("FolderInfo", "FolderState", FolderState); }
/// <summary> /// Saves the options to storage. /// </summary> /// <param name="storage">A storage object to which the options should be saved.</param> /// <exception cref="System.ArgumentNullException"> /// Thrown if <paramref name="storage" /> is <see langword="null" />. /// </exception> public void Save(DecoupledStorage storage) { if (storage == null) { throw new ArgumentNullException("storage"); } Log.SendMsg("Saving 'format on save' options."); storage.LanguageID = ""; storage.WriteBoolean(SectionGeneral, KeyEnabled, this.Enabled); Log.SendBool("Enabled", this.Enabled); storage.WriteEnum(SectionGeneral, KeyLanguagesToFormat, this.LanguagesToFormat); Log.SendEnum("Languages to format", this.LanguagesToFormat); storage.UpdateStorage(); }
public virtual void Save(DecoupledStorage storage, string section, int index) { if (Name != null) { storage.WriteString(section, "Name" + index, Name); } else { storage.WriteString(section, "Name" + index, string.Empty); } storage.WriteInt32(section, "Column" + index, column); storage.WriteInt32(section, "Row" + index, row); storage.WriteBoolean(section, "Repeating" + index, Repeating); }
void saveSettings() { try { _fullWidth = _fullWidthChk.Checked; _lineWidth = int.Parse(_lineWidthLst.Text); _lineColor = _lineColorBtn.BackColor; _drawLineAtStartOfMethod = _drawLineAtStartChk.Checked; _drawLineAtEndOfMethod = _drawLineAtEndChk.Checked; _drawShadow = _drawShadowChk.Checked; _enableOnClass = _enableOnMemberCheckList.GetItemChecked(0); _enableOnProperty = _enableOnMemberCheckList.GetItemChecked(1); _enableOnMethod = _enableOnMemberCheckList.GetItemChecked(2); _enableOnEnum = _enableOnMemberCheckList.GetItemChecked(3); _enabled = _enabledChk.Checked; _lineSpacer = (int)_lineSpaceNUD.Value; _shadowHeight = (int)_shadowHeightNUD.Value; using (DecoupledStorage storage = OptDrawLinesBetweenMethods.Storage) { storage.WriteBoolean("DrawLinesBetweenMethods", "FullWidth", _fullWidth); storage.WriteInt32("DrawLinesBetweenMethods", "LineWidth", _lineWidth); storage.WriteColor("DrawLinesBetweenMethods", "LineColor", _lineColor); storage.WriteBoolean("DrawLinesBetweenMethods", "DrawLineAtStartOfMethod", _drawLineAtStartOfMethod); storage.WriteBoolean("DrawLinesBetweenMethods", "DrawLineAtEndOfMethod", _drawLineAtEndOfMethod); storage.WriteBoolean("DrawLinesBetweenMethods", "DrawShadow", _drawShadow); storage.WriteBoolean("DrawLinesBetweenMethods", "EnableOnClass", _enableOnClass); storage.WriteBoolean("DrawLinesBetweenMethods", "EnableOnProperty", _enableOnProperty); storage.WriteBoolean("DrawLinesBetweenMethods", "EnableOnMethod", _enableOnMethod); storage.WriteBoolean("DrawLinesBetweenMethods", "EnableOnEnum", _enableOnEnum); storage.WriteBoolean("DrawLinesBetweenMethods", "Enabled", _enabled); storage.WriteInt32("DrawLinesBetweenMethods", "LineSpacer", _lineSpacer); storage.WriteInt32("DrawLinesBetweenMethods", "ShadowHeight", _shadowHeight); } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
public void Save(DecoupledStorage decoupledStorage, string section, bool isSelected) { decoupledStorage.WriteString(section, "CustomData", _CustomData); decoupledStorage.WriteString(section, "Command", _Command); decoupledStorage.WriteString(section, "Comments", _Comments); decoupledStorage.WriteString(section, "Parameters", _Parameters); decoupledStorage.WriteBoolean(section, "ShiftKeyDown", _ShiftKeyDown); decoupledStorage.WriteBoolean(section, "CtrlKeyDown", _CtrlKeyDown); decoupledStorage.WriteBoolean(section, "AnyShiftModifier", _AnyShiftModifier); decoupledStorage.WriteBoolean(section, "AltKeyDown", _AltKeyDown); decoupledStorage.WriteBoolean(section, "Enabled", _Enabled); _Context.Save(decoupledStorage, section, "Context"); decoupledStorage.WriteBoolean(section, "Selected", isSelected); }
public override void Save(DecoupledStorage storage, string section, int index) { base.Save(storage, section, index); storage.WriteBoolean(section, "IsBlocked" + index, IsBlocked); }