/// <summary> /// Handles the CursorPositionChanged event of the expressionEditor control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="Konesans.Dts.ExpressionEditor.Controls.CursorPositionChangedEventArgs"/> instance containing the event data.</param> private void ExpressionEditor_CursorPositionChanged(object sender, CursorPositionChangedEventArgs e) { this.toolStripStatusLabelLine.Text = String.Format(CultureInfo.CurrentCulture, LineStatusFormat, e.Line + 1); this.toolStripStatusLabelColumn.Text = String.Format(CultureInfo.CurrentCulture, ColumnStatusFormat, e.Column + 1); Debug.WriteLine(this.toolStripStatusLabelLine.Text + " " + this.toolStripStatusLabelColumn.Text + String.Format(CultureInfo.CurrentCulture, " {0},{1}", e.Line + 1, e.Column + 1)); this.toolStripStatusLabelColumn.Invalidate(); }
private void CursorPositionChanged(object sender, CursorPositionChangedEventArgs e) { _shouldIgnoreBlinking = TimeSpan.FromSeconds(0.5f); if (e.NewPosition > _visibleInputRange.Y) { _visibleInputRange += new Point(Math.Min(e.NewPosition - e.OldPosition, InputTarget.CurrentInput.Length - _visibleInputRange.Y)); } else if (e.NewPosition < _visibleInputRange.X) { _visibleInputRange -= new Point(Math.Min(e.OldPosition - e.NewPosition, _visibleInputRange.X)); } }
private void CodeEditor_OnCursorPositionChanged(Brainf_ckIde sender, CursorPositionChangedEventArgs args) { ViewModel.Row = args.Row; ViewModel.Column = args.Column; }