示例#1
0
 protected virtual void OnCursorPositionChanged(CursorPositionChangedEventArgs e)
 {
     if (CursorPositionChanged != null)
     {
         CursorPositionChanged(this, e);
     }
 }
示例#2
0
        public override bool Equals(object obj)
        {
            CursorPositionChangedEventArgs other = obj as CursorPositionChangedEventArgs;

            return(other != null &&
                   this.Row == other.Row &&
                   this.Column == other.Column);
        }
示例#3
0
        private void picTyping_CursorPositionChanged(object sender, CursorPositionChangedEventArgs e)
        {
            cursorRow    = e.Row;
            cursorColumn = e.Column;

            if (StatisticsMode == StatisticsModes.RowColumn)
            {
                displayProgressStatistics();
            }
        }
示例#4
0
        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);
        }
示例#5
0
 protected virtual void OnCursorPositionChanged(CursorPositionChangedEventArgs e)
 {
     if (CursorPositionChanged != null)
         CursorPositionChanged(this, e);
 }
示例#6
0
        private void picTyping_CursorPositionChanged(object sender, CursorPositionChangedEventArgs e)
        {
            cursorRow = e.Row;
            cursorColumn = e.Column;

            if (StatisticsMode == StatisticsModes.RowColumn)
                displayProgressStatistics();
        }