예제 #1
0
            public void RedoAction(RepetierEditor e)
            {
                int rstart = row;
                int cstart = col;
                int rend   = selRow;
                int cend   = selCol;

                if (row > selRow || (row == selRow && col > selCol))
                {
                    rstart = selRow;
                    cstart = selCol;
                    rend   = row;
                    cend   = col;
                }
                e._row   = row;
                e._col   = col;
                e.selCol = selCol;
                e.selRow = selRow;
                DeleteSelection(e, cstart, rstart, cend, rend);
                InsertString(e, text);
                if (text.Length == 0)
                {
                    e.row = rstart;
                    e.col = cstart;
                }
                else
                {
                    int ce, re;
                    EndPos(e, text, out ce, out re);
                    e.row = re;
                    e.col = ce;
                }
                e.PositionShowCursor(true, false);
                e.Changed();
            }
예제 #2
0
 public void ToActive()
 {
     editor.Text    = Text;
     editor._col    = col;
     editor._row    = row;
     editor._topRow = topRow;
     editor._topCol = topCol;
     editor.selCol  = selCol;
     editor.selRow  = selRow;
     editor.hasSel  = hasSel;
     editor.cur     = this;
     editor.PositionShowCursor(true, false);
     editor.toolRow.Text    = "R" + (row + 1).ToString();
     editor.toolColumn.Text = "C" + (col + 1).ToString();
     UpdateUndoButtons();
 }
예제 #3
0
            public void UndoAction(RepetierEditor e)
            {
                int rstart = row;
                int cstart = col;
                int rend = selRow;
                int cend = selCol;
                int ce, re;

                if (row > selRow || (row == selRow && col > selCol))
                {
                    rstart = selRow;
                    cstart = selCol;
                    rend   = row;
                    cend   = col;
                }
                EndPos(e, text, out ce, out re);
                DeleteSelection(e, cstart, rstart, ce, re);
                InsertString(e, oldtext);
                e.row = row;
                e.col = col;
                e.PositionShowCursor(true, false);
                e.Changed();
            }
예제 #4
0
 public void UndoAction(RepetierEditor e)
 {
     int rstart = row;
     int cstart = col;
     int rend = selRow;
     int cend = selCol;
     int ce, re;
     if (row > selRow || (row == selRow && col > selCol))
     {
         rstart = selRow;
         cstart = selCol;
         rend = row;
         cend = col;
     }
     EndPos(e, text, out ce, out re);
     DeleteSelection(e, cstart, rstart, ce, re);
     InsertString(e, oldtext);
     e.row = row;
     e.col = col;
     e.PositionShowCursor(true,false);
     e.Changed();
 }
예제 #5
0
 public void RedoAction(RepetierEditor e)
 {
     int rstart = row;
     int cstart = col;
     int rend = selRow;
     int cend = selCol;
     if (row > selRow || (row == selRow && col > selCol))
     {
         rstart = selRow;
         cstart = selCol;
         rend = row;
         cend = col;
     }
     e._row = row;
     e._col = col;
     e.selCol = selCol;
     e.selRow = selRow;
     DeleteSelection(e,cstart,rstart,cend,rend);
     InsertString(e, text);
     if (text.Length == 0)
     {
         e.row = rstart;
         e.col = cstart;
     }
     else
     {
         int ce, re;
         EndPos(e, text, out ce, out re);
         e.row = re;
         e.col = ce;
     }
     e.PositionShowCursor(true, false);
     e.Changed();
 }