public void Load(DecoupledStorage storage)
 {
   ShowBeacon = storage.ReadBoolean(STR_Preferences, STR_ShowBeacon, ShowBeacon);
   BeaconColor = storage.ReadColor(STR_Preferences, STR_BeaconColor, BeaconColor);
   BeaconDuration = storage.ReadInt32(STR_Preferences, STR_BeaconDuration, BeaconDuration);
   RollOverOnPrevNext = storage.ReadBoolean(STR_Preferences, STR_RollOverOnPrevNext, RollOverOnPrevNext);
   SkipSelectionMarkers = storage.ReadBoolean(STR_Preferences, STR_SkipSelectionMarkers, SkipSelectionMarkers);
 }
예제 #2
0
 public void Load(DecoupledStorage storage)
 {
     ShowBeacon           = storage.ReadBoolean(STR_Preferences, STR_ShowBeacon, ShowBeacon);
     BeaconColor          = storage.ReadColor(STR_Preferences, STR_BeaconColor, BeaconColor);
     BeaconDuration       = storage.ReadInt32(STR_Preferences, STR_BeaconDuration, BeaconDuration);
     RollOverOnPrevNext   = storage.ReadBoolean(STR_Preferences, STR_RollOverOnPrevNext, RollOverOnPrevNext);
     SkipSelectionMarkers = storage.ReadBoolean(STR_Preferences, STR_SkipSelectionMarkers, SkipSelectionMarkers);
 }
 public void Load()
 {
     using (DecoupledStorage storage = SplitStringOptions.Storage)
     {
         this.SmartEnterSplitString = storage.ReadBoolean("Settings", "SmartEnterSplitString", true);
         this.LeaveConcatenationOperatorAtTheEndOfLine = storage.ReadBoolean("Settings", "LeaveConcatenationOperatorAtTheEndOfLine", true);
         this.UseAmpersandInVb = storage.ReadBoolean("Settings", "UseAmpersandInVb", true);
     }
 }
 private void loadSettings()
 {
     using (DecoupledStorage storage = OptNavigateToDefinition.Storage)
     {
         enabled    = storage.ReadBoolean("NavigateToDefinition", "Enabled", true);
         dropMarker = storage.ReadBoolean("NavigateToDefinition", "DropMarker", true);
         showBeacon = storage.ReadBoolean("NavigateToDefinition", "ShowBeacon", true);
         useGoToDef = storage.ReadBoolean("NavigateToDefinition", "UseGoToDef", true);
     }
 }
예제 #5
0
 public void Load(DecoupledStorage storage, string section, string prefix)
 {
     _KeyState  = storage.ReadInt32(section, prefix + "KeyState");
     _KeyCode   = storage.ReadInt32(section, prefix + "KeyCode");
     _Ctrl      = storage.ReadBoolean(section, prefix + "Ctrl");
     _Shift     = storage.ReadBoolean(section, prefix + "Shift");
     _Alt       = storage.ReadBoolean(section, prefix + "Alt");
     _RightSide = storage.ReadBoolean(section, prefix + "RightSide");
     _Extended  = storage.ReadBoolean(section, prefix + "Extended");
 }
예제 #6
0
파일: Options.cs 프로젝트: xwagner2/eXpand
        private void OnPreparePage(object sender, OptionsPageStorageEventArgs ea)
        {
            DecoupledStorage storage = GetStorage();

            modelEditorPathButtonEdit.Text      = storage.ReadString(PageName, ModelEditorPath, modelEditorPathButtonEdit.Text);
            projectConverterPathButtonEdit.Text = storage.ReadString(PageName, ProjectConverterPath, projectConverterPathButtonEdit.Text);
            testExecutorButtonEdit.Text         = storage.ReadString(PageName, TestExecutorPath, testExecutorButtonEdit.Text);
            publicTokenTextEdit.Text            = storage.ReadString(PageName, Token, publicTokenTextEdit.Text);
            formatOnSaveCheckEdit.Checked       = storage.ReadBoolean(PageName, FormatOnSave, formatOnSaveCheckEdit.Checked);
            checkEditDebugME.Checked            = storage.ReadBoolean(PageName, DebugME, checkEditDebugME.Checked);

            gridControl1.DataSource = GetConnectionStrings();
            gridControl2.DataSource = GetSourceCodeInfos();
        }
예제 #7
0
 public virtual void Load(DecoupledStorage storage, string section, int index)
 {
     Name      = storage.ReadString(section, "Name" + index);
     column    = storage.ReadInt32(section, "Column" + index);
     row       = storage.ReadInt32(section, "Row" + index);
     Repeating = storage.ReadBoolean(section, "Repeating" + index);
 }
예제 #8
0
 public void Load()
 {
     using (DecoupledStorage storage = SmartQuoteOptions.Storage)
     {
         this.UseSmartDoubleQuotes           = storage.ReadBoolean("Settings", "UseSmartDoubleQuotes", true);
         this.DoubleQuotesAutoComplete       = storage.ReadBoolean("Settings", "DoubleQuotesAutoComplete", true);
         this.DoubleQuotesUseTextFields      = storage.ReadBoolean("Settings", "DoubleQuotesUseTextFields", true);
         this.DoubleQuotesEasyDelete         = storage.ReadBoolean("Settings", "DoubleQuotesEasyDelete", true);
         this.DoubleQuotesIgnoreClosingQuote = storage.ReadBoolean("Settings", "DoubleQuotesIgnoreClosingQuote", true);
         this.UseSmartQuotes           = storage.ReadBoolean("Settings", "UseSmartQuotes", true);
         this.QuotesAutoComplete       = storage.ReadBoolean("Settings", "QuotesAutoComplete", true);
         this.QuotesUseTextFields      = storage.ReadBoolean("Settings", "QuotesUseTextFields", true);
         this.QuotesEasyDelete         = storage.ReadBoolean("Settings", "QuotesEasyDelete", true);
         this.QuotesIgnoreClosingQuote = storage.ReadBoolean("Settings", "QuotesIgnoreClosingQuote", true);
     }
 }
        // Methods
        public void Load(DecoupledStorage storage)
        {
            KeepFirstAttribute = false;
            Sort = false;
            OverrideTabSettings = true;
            TabSize = 2;
            PutCloseTagOnOwnLine = true;

            if (storage != null)
            {
                KeepFirstAttribute = storage.ReadBoolean("General", STR_KeepFirstAttribute, false);
                Sort = storage.ReadBoolean("General", STR_SortAttributes, false);

                OverrideTabSettings = storage.ReadBoolean("General", "OverrideTabSettings", true);
                TabSize = ((short)storage.ReadInt32("General", "TabSize", 2));
                PutCloseTagOnOwnLine = storage.ReadBoolean("General", "PutCloseTagOnOwnLine", true);
            }
        }
        // Methods
        public void Load(DecoupledStorage storage)
        {
            KeepFirstAttribute = false;
            Sort = false;
            OverrideTabSettings  = true;
            TabSize              = 2;
            PutCloseTagOnOwnLine = true;

            if (storage != null)
            {
                KeepFirstAttribute = storage.ReadBoolean("General", STR_KeepFirstAttribute, false);
                Sort = storage.ReadBoolean("General", STR_SortAttributes, false);

                OverrideTabSettings  = storage.ReadBoolean("General", "OverrideTabSettings", true);
                TabSize              = ((short)storage.ReadInt32("General", "TabSize", 2));
                PutCloseTagOnOwnLine = storage.ReadBoolean("General", "PutCloseTagOnOwnLine", true);
            }
        }
예제 #11
0
 private void LoadSettings()
 {
     using (DecoupledStorage lStorage = OptInitials.Storage)
     {
         this.m_devInitials = lStorage.ReadString(STR_Preferences, STR_DevInitials, "");
         this.m_devName     = lStorage.ReadString(STR_Preferences, STR_DevName, "");
         this.m_fullName    = lStorage.ReadBoolean(STR_Preferences, STR_FullNameComment, false);
         this.m_dateformat  = lStorage.ReadString(STR_Preferences, STR_DateFormat, "MM/dd/yyyy");
     }
 }
 public DrawLinesBetweenMethodsSettings(DecoupledStorage storage)
 {
     FullWidth = storage.ReadBoolean("DrawLinesBetweenMethods", "FullWidth", FullWidth);
     LineDashStyle = (DashStyle)storage.ReadEnum("DrawLinesBetweenMethods", "LineDashStyle", typeof(DashStyle), LineDashStyle);
     LineWidth = storage.ReadInt32("DrawLinesBetweenMethods", "LineWidth", LineWidth);
     LineColor = storage.ReadColor("DrawLinesBetweenMethods", "LineColor", LineColor);
     DrawLineAtStartOfMethod = storage.ReadBoolean("DrawLinesBetweenMethods", "DrawLineAtStartOfMethod", DrawLineAtStartOfMethod);
     DrawLineAtEndOfMethod = storage.ReadBoolean("DrawLinesBetweenMethods", "DrawLineAtEndOfMethod", DrawLineAtEndOfMethod);
     DrawShadow = storage.ReadBoolean("DrawLinesBetweenMethods", "DrawShadow", DrawShadow);
     EnableOnClass = storage.ReadBoolean("DrawLinesBetweenMethods", "EnableOnClass", EnableOnClass);
     EnableOnProperty = storage.ReadBoolean("DrawLinesBetweenMethods", "EnableOnProperty", EnableOnProperty);
     EnableOnMethod = storage.ReadBoolean("DrawLinesBetweenMethods", "EnableOnMethod", EnableOnMethod);
     EnableOnEnum = storage.ReadBoolean("DrawLinesBetweenMethods", "EnableOnEnum", EnableOnEnum);
     LineSpacer = storage.ReadInt32("DrawLinesBetweenMethods", "LineSpacer", LineSpacer);
     ShadowHeight = storage.ReadInt32("DrawLinesBetweenMethods", "ShadowHeight", ShadowHeight);
     Enabled = storage.ReadBoolean("DrawLinesBetweenMethods", "Enabled", Enabled);
 }
 public DrawLinesBetweenMethodsSettings(DecoupledStorage storage)
 {
     FullWidth               = storage.ReadBoolean("DrawLinesBetweenMethods", "FullWidth", FullWidth);
     LineDashStyle           = (DashStyle)storage.ReadEnum("DrawLinesBetweenMethods", "LineDashStyle", typeof(DashStyle), LineDashStyle);
     LineWidth               = storage.ReadInt32("DrawLinesBetweenMethods", "LineWidth", LineWidth);
     LineColor               = storage.ReadColor("DrawLinesBetweenMethods", "LineColor", LineColor);
     DrawLineAtStartOfMethod = storage.ReadBoolean("DrawLinesBetweenMethods", "DrawLineAtStartOfMethod", DrawLineAtStartOfMethod);
     DrawLineAtEndOfMethod   = storage.ReadBoolean("DrawLinesBetweenMethods", "DrawLineAtEndOfMethod", DrawLineAtEndOfMethod);
     DrawShadow              = storage.ReadBoolean("DrawLinesBetweenMethods", "DrawShadow", DrawShadow);
     EnableOnClass           = storage.ReadBoolean("DrawLinesBetweenMethods", "EnableOnClass", EnableOnClass);
     EnableOnProperty        = storage.ReadBoolean("DrawLinesBetweenMethods", "EnableOnProperty", EnableOnProperty);
     EnableOnMethod          = storage.ReadBoolean("DrawLinesBetweenMethods", "EnableOnMethod", EnableOnMethod);
     EnableOnEnum            = storage.ReadBoolean("DrawLinesBetweenMethods", "EnableOnEnum", EnableOnEnum);
     LineSpacer              = storage.ReadInt32("DrawLinesBetweenMethods", "LineSpacer", LineSpacer);
     ShadowHeight            = storage.ReadInt32("DrawLinesBetweenMethods", "ShadowHeight", ShadowHeight);
     Enabled = storage.ReadBoolean("DrawLinesBetweenMethods", "Enabled", Enabled);
 }
예제 #14
0
        void loadSettings()
        {
            try
            {
                using (DecoupledStorage storage = OptNavigateToDefinition.Storage)
                {
                    enabled    = storage.ReadBoolean("NavigateToDefinition", "Enabled", true);
                    dropMarker = storage.ReadBoolean("NavigateToDefinition", "DropMarker", true);
                    showBeacon = storage.ReadBoolean("NavigateToDefinition", "ShowBeacon", true);
                    useGoToDef = storage.ReadBoolean("NavigateToDefinition", "UseGoToDef", true);
                }

                chkEnabled.Checked    = enabled;
                chkDropMarker.Checked = dropMarker;
                chkShowBeacon.Checked = showBeacon;
                chkUseGoToDef.Checked = useGoToDef;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
예제 #15
0
        protected void LoadFolderInfo(DecoupledStorage storage)
        {
            if (storage == null)
            {
                return;
            }
            Enabled = storage.ReadBoolean("FolderInfo", "Enabled", true);
            string lDescription = storage.ReadString("FolderInfo", "Description", "");

            //Description = TextUtils.DecodeText(lDescription);
            Description = CodeRush.StrUtil.DecodeText(lDescription);
            FolderState = (FolderState)storage.ReadEnum("FolderInfo", "FolderState", typeof(FolderState), FolderState.Collapsed);
        }
        private static IBlockPaintingStrategySettings LoadSettingsForStrategy(Type strategyType, DecoupledStorage storage)
        {
            object strategyInstance = Activator.CreateInstance(strategyType);
            string blockTypeName    = strategyInstance.GetType().GetProperty("BlockTypeName").GetValue(strategyInstance, null) as string;
            IBlockPaintingStrategySettings result = new BlockPaintingStrategySettings(blockTypeName);

            result.Enabled = storage.ReadBoolean(result.BlockTypeName, SettingNames.Enabled, true);
            result.ShowDetailedBlockMetaData = storage.ReadBoolean(result.BlockTypeName, SettingNames.ShowDetailedBlockMetaData, DefaultValues.ShowDetailedBlockMetaData);
            result.MinimumBlockSize          = (byte)storage.ReadInt32(result.BlockTypeName, SettingNames.MinimumBlockSize, 0);

            result.BlockMetaDataAlpha = (byte)storage.ReadInt32(result.BlockTypeName, SettingNames.BlockMetaDataAlpha, DefaultValues.BlockMetaDataAlpha);
            result.BlockMetaDataRed   = (byte)storage.ReadInt32(result.BlockTypeName, SettingNames.BlockMetaDataRed, DefaultValues.BlockMetaDataRed);
            result.BlockMetaDataGreen = (byte)storage.ReadInt32(result.BlockTypeName, SettingNames.BlockMetaDataGreen, DefaultValues.BlockMetaDataGreen);
            result.BlockMetaDataBlue  = (byte)storage.ReadInt32(result.BlockTypeName, SettingNames.BlockMetaDataBlue, DefaultValues.BlockMetaDataBlue);

            result.PrefixAlpha = (byte)storage.ReadInt32(result.BlockTypeName, SettingNames.PrefixAlpha, DefaultValues.PrefixAlpha);
            result.PrefixRed   = (byte)storage.ReadInt32(result.BlockTypeName, SettingNames.PrefixRed, DefaultValues.PrefixRed);
            result.PrefixGreen = (byte)storage.ReadInt32(result.BlockTypeName, SettingNames.PrefixGreen, DefaultValues.PrefixGreen);
            result.PrefixBlue  = (byte)storage.ReadInt32(result.BlockTypeName, SettingNames.PrefixBlue, DefaultValues.PrefixBlue);
            result.PrefixText  = storage.ReadString(result.BlockTypeName, SettingNames.PrefixText, DefaultValues.PrefixText);

            return(result);
        }
        void loadSettings()
        {
            try
            {
                using (DecoupledStorage storage = OptDrawLinesBetweenMethods.Storage)
                {
                    _fullWidth = storage.ReadBoolean("DrawLinesBetweenMethods", "FullWidth", _fullWidth);
                    _lineWidth = storage.ReadInt32("DrawLinesBetweenMethods", "LineWidth", _lineWidth);
                    _lineColor = storage.ReadColor("DrawLinesBetweenMethods", "LineColor", _lineColor);
                    _drawLineAtStartOfMethod = storage.ReadBoolean("DrawLinesBetweenMethods", "DrawLineAtStartOfMethod", _drawLineAtStartOfMethod);
                    _drawLineAtEndOfMethod   = storage.ReadBoolean("DrawLinesBetweenMethods", "DrawLineAtEndOfMethod", _drawLineAtEndOfMethod);
                    _drawShadow       = storage.ReadBoolean("DrawLinesBetweenMethods", "DrawShadow", _drawShadow);
                    _enableOnClass    = storage.ReadBoolean("DrawLinesBetweenMethods", "EnableOnClass", _enableOnClass);
                    _enableOnProperty = storage.ReadBoolean("DrawLinesBetweenMethods", "EnableOnProperty", _enableOnProperty);
                    _enableOnMethod   = storage.ReadBoolean("DrawLinesBetweenMethods", "EnableOnMethod", _enableOnMethod);
                    _enableOnEnum     = storage.ReadBoolean("DrawLinesBetweenMethods", "EnableOnEnum", _enableOnEnum);
                    _lineSpacer       = storage.ReadInt32("DrawLinesBetweenMethods", "LineSpacer", _lineSpacer);
                    _shadowHeight     = storage.ReadInt32("DrawLinesBetweenMethods", "ShadowHeight", _shadowHeight);
                    _enabled          = storage.ReadBoolean("DrawLinesBetweenMethods", "Enabled", _enabled);
                }

                _fullWidthChk.Checked       = _fullWidth;
                _lineWidthLst.Text          = _lineWidth.ToString();
                _lineColorBtn.BackColor     = _lineColor;
                _drawLineAtStartChk.Checked = _drawLineAtStartOfMethod;
                _drawLineAtEndChk.Checked   = _drawLineAtEndOfMethod;
                _drawShadowChk.Checked      = _drawShadow;
                _enableOnMemberCheckList.SetItemChecked(0, _enableOnClass);
                _enableOnMemberCheckList.SetItemChecked(1, _enableOnProperty);
                _enableOnMemberCheckList.SetItemChecked(2, _enableOnMethod);
                _enableOnMemberCheckList.SetItemChecked(3, _enableOnEnum);
                _lineSpaceNUD.Value      = _lineSpacer;
                _shadowHeightNUD.Enabled = _drawShadowChk.Checked;
                _shadowHeightNUD.Value   = _shadowHeightNUD.Enabled ? _shadowHeight : 0;
                _enabledChk.Checked      = _enabled;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
예제 #18
0
        public static KeyBase CreateAndLoad(DecoupledStorage storage, string section, int index)
        {
            KeyBase key = null;

            if (storage.ReadBoolean(section, "IsGroup" + index, false))
            {
                key = new KeyGroup();
            }
            else
            {
                key = new Key();
            }
            key.Load(storage, section, index);
            return(key);
        }
예제 #19
0
		/// <summary>
		/// Loads the options from storage.
		/// </summary>
		/// <param name="storage">A storage object from which options should be loaded.</param>
		/// <returns>
		/// A populated <see cref="DX_FormatOnSave.OptionSet"/> from the storage.
		/// </returns>
		/// <exception cref="System.ArgumentNullException">
		/// Thrown if <paramref name="storage" /> is <see langword="null" />.
		/// </exception>
		public static OptionSet Load(DecoupledStorage storage)
		{
			if (storage == null)
			{
				throw new ArgumentNullException("storage");
			}
			Log.SendMsg("Loading 'format on save' options.");
			OptionSet options = new OptionSet();
			OptionSet defaults = new OptionSet();
			options.Enabled = storage.ReadBoolean(SectionGeneral, KeyEnabled, defaults.Enabled);
			Log.SendBool("Enabled", options.Enabled);
			options.LanguagesToFormat = storage.ReadEnum<DocumentLanguages>(SectionGeneral, KeyLanguagesToFormat, defaults.LanguagesToFormat);
			Log.SendEnum("Languages to format", options.LanguagesToFormat);
			return options;
		}
예제 #20
0
        /// <summary>
        /// Loads the options from storage.
        /// </summary>
        /// <param name="storage">A storage object from which options should be loaded.</param>
        /// <returns>
        /// A populated <see cref="DX_FormatOnSave.OptionSet"/> from the storage.
        /// </returns>
        /// <exception cref="System.ArgumentNullException">
        /// Thrown if <paramref name="storage" /> is <see langword="null" />.
        /// </exception>
        public static OptionSet Load(DecoupledStorage storage)
        {
            if (storage == null)
            {
                throw new ArgumentNullException("storage");
            }
            Log.SendMsg("Loading 'format on save' options.");
            OptionSet options  = new OptionSet();
            OptionSet defaults = new OptionSet();

            options.Enabled = storage.ReadBoolean(SectionGeneral, KeyEnabled, defaults.Enabled);
            Log.SendBool("Enabled", options.Enabled);
            options.LanguagesToFormat = storage.ReadEnum <DocumentLanguages>(SectionGeneral, KeyLanguagesToFormat, defaults.LanguagesToFormat);
            Log.SendEnum("Languages to format", options.LanguagesToFormat);
            return(options);
        }
 private void loadSettings()
 {
     try
     {
         using (DecoupledStorage storage = OptExtractHqlNamedQuery.Storage)
         {
             enabled               = storage.ReadBoolean("ExtractHqlNamedQuery", "Enabled", true);
             findHqlFileStrategy   = storage.ReadInt32("ExtractHqlNamedQuery", "FindHqlFileStrategy", 0);
             hqlNamedQueryFileName = storage.ReadString("ExtractHqlNamedQuery", "HqlNamedQueryFileName", "NamedQueries.hbm.xml");
         }
     }
     catch (Exception ex)
     {
         ShowException(ex);
     }
 }
예제 #22
0
 public void Load()
 {
     using (DecoupledStorage storage = SmartGenericsOptions.Storage)
     {
         this.UseSmartGenerics                  = storage.ReadBoolean("Settings", "UseSmartGenerics", true);
         this.SmartGenericsAutoComplete         = storage.ReadBoolean("Settings", "SmartGenericsAutoComplete", true);
         this.SmartGenericsUseTextFields        = storage.ReadBoolean("Settings", "SmartGenericsUseTextFields", true);
         this.SmartGenericsAddSpace             = storage.ReadBoolean("Settings", "SmartGenericsAddSpace", false);
         this.SmartGenericsEasyDelete           = storage.ReadBoolean("Settings", "SmartGenericsEasyDelete", true);
         this.SmartGenericsIgnoreClosingGeneric = storage.ReadBoolean("Settings", "SmartGenericsIgnoreClosingOperator", true);
     }
 }
예제 #23
0
        // DXCore-generated code...
        #region Initialize
        protected override void Initialize()
        {
            base.Initialize();

            DecoupledStorage storage = GetStorage();

            modelEditorPathButtonEdit.Text      = storage.ReadString(PageName, ModelEditorPath, modelEditorPathButtonEdit.Text);
            projectConverterPathButtonEdit.Text = storage.ReadString(PageName, ProjectConverterPath, projectConverterPathButtonEdit.Text);
            gacUtilPathButtonEdit.Text          = storage.ReadString(PageName, GacUtilPath, gacUtilPathButtonEdit.Text);
            publicTokenTextEdit.Text            = storage.ReadString(PageName, Token, publicTokenTextEdit.Text);
            gacUtilRegexButtonEdit.Text         = storage.ReadString(PageName, GacUtilRegex, gacUtilRegexButtonEdit.Text);
            formatOnSaveCheckEdit.Checked       = storage.ReadBoolean(PageName, FormatOnSave, formatOnSaveCheckEdit.Checked);

            gridControl1.DataSource = GetConnectionStrings();
            gridControl2.DataSource = GetSourceCodeInfos();
            gridView1.KeyDown      += GridView1OnKeyDown;
            gridView2.KeyDown      += GridView1OnKeyDown;
        }
예제 #24
0
        void loadSettings()
        {
            try
            {
                using (DecoupledStorage storage = OptExtractHqlNamedQuery.Storage)
                {
                    enabled               = storage.ReadBoolean("ExtractHqlNamedQuery", "Enabled", true);
                    findHqlFileStrategy   = storage.ReadInt32("ExtractHqlNamedQuery", "FindHqlFileStrategy", 0);
                    hqlNamedQueryFileName = storage.ReadString("ExtractHqlNamedQuery", "HqlNamedQueryFileName", "NamedQueries.hbm.xml");
                }

                chkEnabled.Checked = enabled;
                comboFindHqlFileStrategy.SelectedIndex = findHqlFileStrategy;
                textHqlNamedQueryFileName.Text         = hqlNamedQueryFileName;
            }
            catch (Exception ex)
            {
                ExtractHqlNamedQuery.ShowException(ex);
            }
        }
예제 #25
0
 /// <summary>
 /// Loads the command binding from the specified section.
 /// </summary>
 /// <param name="decoupledStorage"></param>
 /// <param name="section"></param>
 /// <returns>Returns true if this command was most recently selected.</returns>
 public bool Load(DecoupledStorage decoupledStorage, string section)
 {
     _CustomData       = decoupledStorage.ReadString(section, "CustomData", "");
     _Command          = decoupledStorage.ReadString(section, "Command", "");
     _Comments         = decoupledStorage.ReadString(section, "Comments", "");
     _Parameters       = decoupledStorage.ReadString(section, "Parameters", "");
     _CtrlKeyDown      = decoupledStorage.ReadBoolean(section, "CtrlKeyDown", false);
     _AnyShiftModifier = decoupledStorage.ReadBoolean(section, "AnyShiftModifier", false);
     _AltKeyDown       = decoupledStorage.ReadBoolean(section, "AltKeyDown", false);
     _ShiftKeyDown     = decoupledStorage.ReadBoolean(section, "ShiftKeyDown", false);
     _Enabled          = decoupledStorage.ReadBoolean(section, "Enabled", true);
     _Context.Load(decoupledStorage, section, "Context");
     _ContextRoot = new ContextNode(_Context.Selected);
     return(decoupledStorage.ReadBoolean(section, "Selected", false));
 }
예제 #26
0
        public static void LoadSettings()
        {
            try
            {
                DecoupledStorage store = CodeRush.Options.GetStorage(GetCategory(), GetPageName());
                if (store != null)
                {
                    MiniCodeColumnEnabled  = store.ReadBoolean("Config", "Enabled", true);
                    WordDoubleClickEnabled = store.ReadBoolean("Config", "WordDoubleClickEnabled", true);

                    //ColumnWidth = store.ReadInt32("Config", "ColumnWidth", 40);

                    ColumnBackgroundColor = Color.FromArgb(
                        store.ReadInt32(
                            "Config",
                            "ColumnBackgroundColor",
                            CodeRush.Color.VSLight.ToArgb()
                            ));
                    ColumnBackgroundColorSelectedWord = Color.FromArgb(
                        store.ReadInt32(
                            "Config",
                            "ColumnBackgroundColorSelectedWord",
                            Color.FromArgb(40, Color.Blue).ToArgb()
                            ));
                    ColumnVisibleLinesColor = Color.FromArgb(
                        store.ReadInt32(
                            "Config",
                            "ColumnVisibleLinesColor",
                            Color.FromArgb(70, Color.DarkBlue).ToArgb()
                            ));

                    CodeColorNormalLine = Color.FromArgb(
                        store.ReadInt32(
                            "Config",
                            "CodeColorNormalLine",
                            Color.FromArgb(70, Color.Black).ToArgb()
                            ));
                    CodeColorSelectedWord = Color.FromArgb(
                        store.ReadInt32(
                            "Config",
                            "CodeColorPenSelectedWord",
                            Color.FromArgb(100, Color.Red).ToArgb()
                            ));
                    CodeColorCommentLine = Color.FromArgb(
                        store.ReadInt32(
                            "Config",
                            "CodeColorCommentLine",
                            Color.FromArgb(70, Color.Green).ToArgb()
                            ));
                    BreakPointColor = Color.FromArgb(
                        store.ReadInt32(
                            "Config",
                            "BreakPointColor",
                            Color.FromArgb(90, Color.Red).ToArgb()
                            ));
                }
            }
            catch
            {
            }
        }
		public static bool ReadDisplayIcon(DecoupledStorage storage)
		{
			return storage.ReadBoolean("Preferences", "DisplayRunIcon", true);
		}
예제 #28
0
 public override void Load(DecoupledStorage storage, string section, int index)
 {
     base.Load(storage, section, index);
     IsBlocked = storage.ReadBoolean(section, "IsBlocked" + index);
 }
		public static bool ReadConvertEscapeCharacters(DecoupledStorage storage)
		{
			return storage.ReadBoolean(kPreferencesSection, kConvertEscape, Default.ConvertEscapeCharacters);
		}
		public static bool ReadShortenLongStrings(DecoupledStorage storage)
		{
			return storage.ReadBoolean(kPreferencesSection, kShortenLongStrings, Default.ShortenLongStrings);
		}
		public static bool ReadDrawArrow(DecoupledStorage storage)
		{
			return storage.ReadBoolean(kPreferencesSection, kDrawArrowKey, Default.DrawArrow);
		}
		public static bool ReadShadeAttribute(DecoupledStorage storage)
		{
			return storage.ReadBoolean(kPreferencesSection, kShadeAttributeKey, Default.ShadeAttribute);
		}
 public static bool ReadDisplayIcon(DecoupledStorage storage)
 {
     return(storage.ReadBoolean("Preferences", "DisplayRunIcon", true));
 }
예제 #34
0
 public static bool ReadShadeAttribute(DecoupledStorage storage)
 {
     return(storage.ReadBoolean(kPreferencesSection, kShadeAttributeKey, Default.ShadeAttribute));
 }
예제 #35
0
 public static bool ReadDrawArrow(DecoupledStorage storage)
 {
     return(storage.ReadBoolean(kPreferencesSection, kDrawArrowKey, Default.DrawArrow));
 }
예제 #36
0
 public static bool ReadShortenLongStrings(DecoupledStorage storage)
 {
     return(storage.ReadBoolean(kPreferencesSection, kShortenLongStrings, Default.ShortenLongStrings));
 }
예제 #37
0
 public static bool ReadConvertEscapeCharacters(DecoupledStorage storage)
 {
     return(storage.ReadBoolean(kPreferencesSection, kConvertEscape, Default.ConvertEscapeCharacters));
 }