Exemplo n.º 1
0
 void Options_OptionChanged(object?sender, VSTE.EditorOptionChangedEventArgs e)
 {
     if (e.OptionId == DefaultHexViewHostOptions.HorizontalScrollBarName)
     {
         UpdateVisibility();
     }
 }
Exemplo n.º 2
0
 void Options_OptionChanged(object sender, VSTE.EditorOptionChangedEventArgs e)
 {
     if (e.OptionId == DefaultWpfHexViewOptions.UseReducedOpacityForHighContrastOptionName)
     {
         UpdateUseReducedOpacityForHighContrastOption();
     }
 }
Exemplo n.º 3
0
 void Options_OptionChanged(object sender, VSTE.EditorOptionChangedEventArgs e)
 {
     if (e.OptionId == DefaultHexViewHostOptions.SelectionMarginName)
     {
         UpdateVisibility();
     }
 }
Exemplo n.º 4
0
 void Options_OptionChanged(object sender, VSTE.EditorOptionChangedEventArgs e)
 {
     if (e.OptionId == DefaultWpfHexViewOptions.EnableHighlightCurrentLineName)
     {
         UpdateEnableState();
     }
 }
Exemplo n.º 5
0
        void OnEditorOptionChanged(object sender, EditorOptionChangedEventArgs e)
        {
            // If virtual space was just turned off, reselect and remove
            // virtual space
            if (e.OptionId == DefaultTextViewOptions.UseVirtualSpaceId.Name)
            {
                if (!(_wpfTextView.Options.IsVirtualSpaceEnabled() || (this.Mode == TextSelectionMode.Box)))
                {
                    VirtualSnapshotPoint newAnchorPoint, newActivePoint;
                    newAnchorPoint = new VirtualSnapshotPoint(AnchorPoint.Position);
                    newActivePoint = new VirtualSnapshotPoint(_wpfTextView.Caret.Position.BufferPosition);

                    // This may send out a change event, which is expected.
                    this.Select(newAnchorPoint, newActivePoint);
                }
            }
            //else if (e.OptionId == DefaultWpfViewOptions.EnableSimpleGraphicsId.Name)
            //{
            //    // update the painter if the option is changed
            //    this.CreateAndSetPainter("Selected Text", ref _focusedPainter, SystemColors.HighlightColor);
            //    this.CreateAndSetPainter("Inactive Selected Text", ref _unfocusedPainter, SystemColors.GrayTextColor);

            //    this.Painter.Activate();
            //}
        }
Exemplo n.º 6
0
 void Options_OptionChanged(object sender, VSTE.EditorOptionChangedEventArgs e)
 {
     if (hexView.IsClosed)
     {
         return;
     }
     owner.OptionChanged(hexView, e);
 }
Exemplo n.º 7
0
 void Options_OptionChanged(object sender, VSTE.EditorOptionChangedEventArgs e)
 {
     if (e.OptionId == DefaultHexViewOptions.ViewProhibitUserInputName)
     {
         StopIME(false);
         InitializeIME();
     }
 }
Exemplo n.º 8
0
 void Options_OptionChanged(object sender, VSTE.EditorOptionChangedEventArgs e)
 {
     switch (e.OptionId)
     {
     case DefaultHexViewOptions.HighlightActiveColumnName:
         UpdateEnabled();
         break;
     }
 }
Exemplo n.º 9
0
        void OptionChanged(WpfHexView hexView, VSTE.EditorOptionChangedEventArgs e)
        {
            var coll = GetCollection(GetSubGroup(hexView));

            if (!coll.HasOption(e.OptionId))
            {
                return;
            }
            coll.SetOptionValue(e.OptionId, hexView.Options.GetOptionValue(e.OptionId));
        }
Exemplo n.º 10
0
 void Options_OptionChanged(object sender, VSTE.EditorOptionChangedEventArgs e)
 {
     if (e.OptionId == DefaultWpfHexViewOptions.UseReducedOpacityForHighContrastOptionName)
     {
         useReducedOpacityForHighContrast = wpfHexView.Options.GetOptionValue(DefaultWpfHexViewOptions.UseReducedOpacityForHighContrastOptionId);
         if (themeService.Theme.IsHighContrast)
         {
             RefreshExistingMarkers();
         }
     }
 }
Exemplo n.º 11
0
 void OnOptionsChanged(object sender, EditorOptionChangedEventArgs e)
 {
     if (e.OptionId == DefaultTextViewOptions.OverwriteModeId.Name)
     {
         this.RefreshCaret(false);
     }
     else if (e.OptionId == DefaultTextViewOptions.UseVirtualSpaceId.Name &&
              !this.IsVirtualSpaceOrBoxSelectionEnabled)
     {
         this.RefreshCaret(false, true);
     }
 }
Exemplo n.º 12
0
 void Options_OptionChanged(object sender, VSTE.EditorOptionChangedEventArgs e)
 {
     if (e.OptionId == DefaultHexViewHostOptions.ZoomControlName || e.OptionId == DefaultHexViewHostOptions.HorizontalScrollBarName)
     {
         UpdateVisibility();
     }
     else if (!Enabled)
     {
         // Ignore all other options
     }
     else if (e.OptionId == DefaultWpfHexViewOptions.ZoomLevelName)
     {
         zoomControl.UpdateTextWithZoomLevel();
     }
 }
Exemplo n.º 13
0
        void Options_OptionChanged(object sender, VSTE.EditorOptionChangedEventArgs e)
        {
            switch (e.OptionId)
            {
            case DefaultHexViewOptions.ShowColumnLinesName:
                UpdateEnabled();
                break;

            case DefaultHexViewOptions.ColumnLine0Name:
            case DefaultHexViewOptions.ColumnLine1Name:
            case DefaultHexViewOptions.ColumnGroupLine0Name:
            case DefaultHexViewOptions.ColumnGroupLine1Name:
                DelayRecreateColumnLines();
                break;
            }
        }
Exemplo n.º 14
0
 void Options_OptionChanged(object sender, VSTE.EditorOptionChangedEventArgs e)
 {
     if (e.OptionId == DefaultWpfHexViewOptions.UseReducedOpacityForHighContrastOptionName)
     {
         bool old = ShouldUseHighContrastOpacity;
         useReducedOpacityForHighContrast = wpfHexView.Options.GetOptionValue(DefaultWpfHexViewOptions.UseReducedOpacityForHighContrastOptionId);
         if (old != ShouldUseHighContrastOpacity)
         {
             RefreshExistingMarkers();
         }
     }
     else if (e.OptionId == DefaultHexViewHostOptions.IsInContrastModeName)
     {
         bool old = ShouldUseHighContrastOpacity;
         isInContrastMode = wpfHexView.Options.IsInContrastMode();
         if (old != ShouldUseHighContrastOpacity)
         {
             RefreshExistingMarkers();
         }
     }
 }