protected virtual void OnCursorPositionChanged(CursorPositionChangedEventArgs e) { if (CursorPositionChanged != null) { CursorPositionChanged(this, e); } }
public override bool Equals(object obj) { CursorPositionChangedEventArgs other = obj as CursorPositionChangedEventArgs; return(other != null && this.Row == other.Row && this.Column == other.Column); }
private void picTyping_CursorPositionChanged(object sender, CursorPositionChangedEventArgs e) { cursorRow = e.Row; cursorColumn = e.Column; if (StatisticsMode == StatisticsModes.RowColumn) { displayProgressStatistics(); } }
private RectangleF getDocumentArea(Graphics g, RectangleF typingArea, SizeF cellSize) { RectangleF unlimitedHeightArea = getUnlimitedHeightArea(typingArea); RectangleF cursorArea = getCursorCharArea(g, unlimitedHeightArea); Point cursorColumnRow = getColumnRow(cursorArea.Location, unlimitedHeightArea.Location, cellSize); oldCursorPositionChangedEventArgs = Util.RaiseIfEventArgsChanged( OnCursorPositionChanged, new CursorPositionChangedEventArgs(cursorColumnRow.Y + 1, cursorColumnRow.X + 1), oldCursorPositionChangedEventArgs); int currentLineColumns = ImportedText.LineLength(TypedText.Length); Size documentColumnsRows = new Size(ImportedText.LongestLineLength, getDocumentRows(g, unlimitedHeightArea, cellSize)); Size visibleColumnsRows = getVisibleColumnsRows(typingArea.Size, cellSize); float hOffset = cellSize.Width * calcColumnOffset(cursorColumnRow.X, visibleColumnsRows.Width, documentColumnsRows.Width, currentLineColumns), vOffset = cellSize.Height * calcRowOffset(cursorColumnRow.Y, visibleColumnsRows.Height, documentColumnsRows.Height); return new RectangleF(typingArea.X + hOffset, typingArea.Y + vOffset, typingArea.Width, typingArea.Height - vOffset); }
protected virtual void OnCursorPositionChanged(CursorPositionChangedEventArgs e) { if (CursorPositionChanged != null) CursorPositionChanged(this, e); }
private void picTyping_CursorPositionChanged(object sender, CursorPositionChangedEventArgs e) { cursorRow = e.Row; cursorColumn = e.Column; if (StatisticsMode == StatisticsModes.RowColumn) displayProgressStatistics(); }