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(); }
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(); }
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(); }
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(); }