public HexBoxUndoCommand(HexBox hexBox, HexBoxPosition origCaretPos, ulong offset, byte[] origData, string descr) { this.doc = hexBox.Document; this.hexBoxWeakRef = new WeakReference(hexBox); this.origCaretPos = origCaretPos; this.newCaretPos = hexBox.CaretPosition; this.offset = offset; this.origData = origData; this.newData = doc.ReadBytes(offset, origData.Length); this.descr = descr; this.canExecute = false; }