コード例 #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);
 }