Example #1
0
        /// <summary>
        /// Serves as a worker function of the FileContentChangeService.
        /// </summary>
        public static void CursorPositionChanged(object sender, CursorPositionChangeArgs args)
        {
            Console.WriteLine($"#DEBUG: Performing update cursor position action to {args.CursorPosition}.");
            var buffer = ApplicationState.Instance.FileHandlerInstance.GetFileBuffer(CurrentFilePath);

            buffer.UpdateCursorPosition(args.CursorPosition);
        }
Example #2
0
 /// <summary>
 /// Gathers argument data and redirects the notification event further.
 /// </summary>
 /// <param name="sender">The sender object of the notification event.</param>
 /// <param name="e">The notification event argument, i.e. the number of characters from the start to the cursor</param>
 private void CursorPosition_Changed(object sender, CursorPositionChangeArgs e)
 {
     Console.WriteLine("#DEBUG: The notification has been received by the CursorPositionChangeBroadcastService.");
     OnCursorPositionChanged?.Invoke(this, e);
 }