예제 #1
0
파일: Commands.cs 프로젝트: net10010/dnSpy
 void ToggleWordWrap()
 {
     editorOptions.SetOptionValue(DefaultTextViewOptions.WordWrapStyleId, editorOptions.WordWrapStyle() ^ WordWrapStyles.WordWrap);
     if ((editorOptions.WordWrapStyle() & WordWrapStyles.WordWrap) != 0 && appSettings.UseNewRenderer_TextEditor)
     {
         messageBoxManager.ShowIgnorableMessage(new Guid("AA6167DA-827C-49C6-8EF3-0797FE8FC5E6"), dnSpy_Resources.TextEditorNewFormatterWarningMsg);
     }
 }
예제 #2
0
 void EditorOptions_OptionChanged(object sender, EditorOptionChangedEventArgs e)
 {
     if (e.OptionId == DefaultWpfViewOptions.EnableHighlightCurrentLineId.Name)
     {
         textEditorSettings.HighlightCurrentLine = globalOptions.IsHighlightCurrentLineEnabled();
     }
     else if (e.OptionId == DefaultWpfViewOptions.ZoomLevelId.Name)
     {
         textEditorSettings.TextViewZoomLevel = globalOptions.ZoomLevel();
     }
     else if (e.OptionId == DefaultDnSpyWpfViewOptions.ForceClearTypeIfNeededId.Name)
     {
         textEditorSettings.ForceClearTypeIfNeeded = globalOptions.IsForceClearTypeIfNeededEnabled();
     }
     else if (e.OptionId == DefaultTextViewHostOptions.LineNumberMarginId.Name)
     {
         textEditorSettings.ShowLineNumbers = globalOptions.IsLineNumberMarginEnabled();
     }
     else if (e.OptionId == DefaultTextViewOptions.WordWrapStyleId.Name)
     {
         textEditorSettings.WordWrapStyle = globalOptions.WordWrapStyle();
     }
     else if (e.OptionId == DefaultOptions.ConvertTabsToSpacesOptionId.Name)
     {
         textEditorSettings.ConvertTabsToSpaces = globalOptions.IsConvertTabsToSpacesEnabled();
     }
     else if (e.OptionId == DefaultDnSpyTextViewOptions.ReferenceHighlightingId.Name)
     {
         textEditorSettings.HighlightReferences = globalOptions.IsReferenceHighlightingEnabled();
     }
 }
예제 #3
0
파일: Commands.cs 프로젝트: net10010/dnSpy
 public override void Execute(IMenuItemContext context) => editorOptions.SetOptionValue(DefaultTextViewOptions.WordWrapStyleId, editorOptions.WordWrapStyle() ^ WordWrapStyles.WordWrap);