コード例 #1
0
		/// <summary>
		/// In the code editor, highlights all references to the expression under the caret (for better code readability).
		/// </summary>
		public CaretReferencesRenderer(CodeEditorView editorView)
		{
			this.editorView = editorView;
			this.highlightRenderer = new ExpressionHighlightRenderer(this.editorView.TextArea.TextView);
			this.delayTimer = new DispatcherTimer() { Interval = TimeSpan.FromMilliseconds(delayMs) };
			this.delayTimer.Stop();
			this.delayTimer.Tick += TimerTick;
			this.delayMoveTimer = new DispatcherTimer() { Interval = TimeSpan.FromMilliseconds(delayMoveMs) };
			this.delayMoveTimer.Stop();
			this.delayMoveTimer.Tick += TimerMoveTick;
			this.editorView.TextArea.Caret.PositionChanged += CaretPositionChanged;
		}
コード例 #2
0
		/// <summary>
		/// In the code editor, highlights all references to the expression under the caret (for better code readability).
		/// </summary>
		public CaretReferencesRenderer(CodeEditorView editorView)
		{
			this.editorView = editorView;
			this.highlightRenderer = new ExpressionHighlightRenderer(this.editorView.TextArea.TextView);
			this.delayTimer = new DispatcherTimer() { Interval = TimeSpan.FromMilliseconds(delayMs) };
			this.delayTimer.Stop();
			this.delayTimer.Tick += TimerTick;
			this.delayMoveTimer = new DispatcherTimer() { Interval = TimeSpan.FromMilliseconds(delayMoveMs) };
			this.delayMoveTimer.Stop();
			this.delayMoveTimer.Tick += TimerMoveTick;
			this.editorView.TextArea.Caret.PositionChanged += CaretPositionChanged;
			// fixes SD-1873 - Unhandled WPF Exception when deleting text in text editor
			// clear highlights to avoid exceptions when trying to draw highlights in
			// locations that have been deleted already.
			this.editorView.Document.Changed += delegate { lastResolveResult = null; ClearHighlight(); };
		}
コード例 #3
0
 /// <summary>
 /// In the code editor, highlights all references to the expression under the caret (for better code readability).
 /// </summary>
 public CaretReferencesRenderer(CodeEditorView editorView)
 {
     this.editorView        = editorView;
     this.highlightRenderer = new ExpressionHighlightRenderer(this.editorView.TextArea.TextView);
     this.delayTimer        = new DispatcherTimer()
     {
         Interval = TimeSpan.FromMilliseconds(delayMs)
     };
     this.delayTimer.Stop();
     this.delayTimer.Tick += TimerTick;
     this.delayMoveTimer   = new DispatcherTimer()
     {
         Interval = TimeSpan.FromMilliseconds(delayMoveMs)
     };
     this.delayMoveTimer.Stop();
     this.delayMoveTimer.Tick += TimerMoveTick;
     this.editorView.TextArea.Caret.PositionChanged += CaretPositionChanged;
 }
コード例 #4
0
 /// <summary>
 /// In the code editor, highlights all references to the expression under the caret (for better code readability).
 /// </summary>
 public CaretReferencesRenderer(CodeEditorView editorView)
 {
     this.editorView        = editorView;
     this.highlightRenderer = new ExpressionHighlightRenderer(this.editorView.TextArea.TextView);
     this.delayTimer        = new DispatcherTimer()
     {
         Interval = TimeSpan.FromMilliseconds(delayMs)
     };
     this.delayTimer.Stop();
     this.delayTimer.Tick += TimerTick;
     this.delayMoveTimer   = new DispatcherTimer()
     {
         Interval = TimeSpan.FromMilliseconds(delayMoveMs)
     };
     this.delayMoveTimer.Stop();
     this.delayMoveTimer.Tick += TimerMoveTick;
     this.editorView.TextArea.Caret.PositionChanged += CaretPositionChanged;
     // fixes SD-1873 - Unhandled WPF Exception when deleting text in text editor
     // clear highlights to avoid exceptions when trying to draw highlights in
     // locations that have been deleted already.
     this.editorView.Document.Changed += delegate { lastResolveResult = null; ClearHighlight(); };
 }