Пример #1
0
 static CodeViewerState ChangeDocument(CodeViewerState previousState, ChangeDocumentAction action)
 {
     if (!previousState.ViewerSettings.SelectionLocked)
     {
         previousState.Document = action.Document;
     }
     return(previousState);
 }
Пример #2
0
 static CodeViewerState ChangeLockState(CodeViewerState previousState, ChangeLockStateAction action)
 {
     ((ViewerSettings)previousState.ViewerSettings).SelectionLocked = action.Locked;
     return(previousState);
 }
Пример #3
0
 static CodeViewerState ToggleShowLineIcons(CodeViewerState previousState, ToggleShowLineIconsAction action)
 {
     ((ViewerSettings)previousState.ViewerSettings).ShowLineIcons = !previousState.ViewerSettings.ShowLineIcons;
     return(previousState);
 }
Пример #4
0
 static CodeViewerState ToggleShowLineNumber(CodeViewerState previousState, ToggleShowLineNumberAction action)
 {
     ((ViewerSettings)previousState.ViewerSettings).ShowLineNumber = !previousState.ViewerSettings.ShowLineNumber;
     return(previousState);
 }
Пример #5
0
 static CodeViewerState ActivateLine(CodeViewerState previousState, ActivateLineAction action)
 {
     previousState.Document.Callback?.Invoke(action.Line.Metadata);
     return(previousState);
 }