Beispiel #1
0
        ///<summary>Delete bytes from the buffer</summary>
        public void Delete(long pos1, long pos2)
        {
            lock (LockObj) {
                if (!modifyAllowed)
                {
                    return;
                }
                if (!IsResizable)
                {
                    return;
                }

                DeleteAction da = new DeleteAction(pos1, pos2, this);
                da.Do();

                // if action isn't handled as chained (ActionChaining == false)
                // handle it manually
                if (!HandleChaining(da))
                {
                    AddUndoAction(da);
                    RedoDequeDispose();
                }

                EmitChanged();
            }
        }
Beispiel #2
0
 public ReplaceAction(long p1, long p2, byte[] d, long index, long length, ByteBuffer bb)
 {
     del = new DeleteAction(p1, p2, bb);
     ins = new InsertAction(p1, d, index, length, bb);
 }