Ejemplo n.º 1
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(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 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);
 }
        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());
            }
        }