Esempio n. 1
0
        private void SaveOptions()
        {
            using (DecoupledStorage settings = CodeRush.Options.GetStorage(OptionsCategory, OptionsPageName))
            {
                settings.WriteInt32(Summary, IncludeSummaryKey, listIncludeFiles.Items.Count);
                settings.WriteInt32(Summary, ExcludeSummaryKey, listExcludeFiles.Items.Count);
                settings.WriteInt32(Summary, ExcludeContentSummaryKey, listExcludeContent.Items.Count);

                for (int i = 0; i < listIncludeFiles.Items.Count; i++)
                {
                    settings.WriteString(IncludeKey, IncludeKey + i, listIncludeFiles.Items[i].ToString(), true);
                }

                for (int i = 0; i < listIncludeContent.Items.Count; i++)
                {
                    settings.WriteString(IncludeContentKey, IncludeContentKey + i, listIncludeContent.Items[i].ToString(), true);
                }

                for (int i = 0; i < listExcludeFiles.Items.Count; i++)
                {
                    settings.WriteString(ExcludeKey, ExcludeKey + i, listExcludeFiles.Items[i].ToString(), true);
                }

                for (int i = 0; i < listExcludeContent.Items.Count; i++)
                {
                    settings.WriteString(ExcludeContentKey, ExcludeContentKey + i, listExcludeContent.Items[i].ToString(), true);
                }
            }
            SetupSettingsLists();
        }
Esempio n. 2
0
 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);
 }
Esempio n. 3
0
 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);
 }
Esempio n. 4
0
        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);
            }
        }
Esempio n. 5
0
 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)
 {
   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);
 }
Esempio n. 7
0
        public void Save(DecoupledStorage aDecoupledStorage, CommandKeyBinding lastSelected)
        {
            aDecoupledStorage.WriteInt32("Header", "Count", Count);
            int lIndex = 0;

            foreach (CommandKeyBinding lCommandKeyBinding in this)
            {
                lCommandKeyBinding.Save(aDecoupledStorage, "Command" + lIndex.ToString(), lastSelected == lCommandKeyBinding);
                lIndex++;
            }
        }
        public void Save()
        {
            DecoupledStorage storage = OptXkeysLayout.Storage;

            storage.ClearAll();
            storage.WriteInt32("Layout", "Count", keys.Count);
            for (int i = 0; i < Keys.Count; i++)
            {
                Keys[i].Save(storage, "Layout", i);
            }
        }
        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
            {
            }
        }
        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());
            }
        }
Esempio n. 11
0
        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);
            }
        }