Exemplo n.º 1
0
        static bool InsertCopyable(ISelectParent parent, Copyable copyable, int right, string action, out InsertCopyableUndoEntry entry)
        {
            entry = null;

            if (!parent.ChildType.IsAssignableFrom(copyable.Type))
            {
                return(false);
            }

            entry = new InsertCopyableUndoEntry(parent, copyable, right, action);

            return(true);
        }
Exemplo n.º 2
0
 ReplaceUndoEntry(BinaryReader reader, int version)
     : base(reader, version)
 {
     delete = (DeleteUndoEntry)DecodeEntry(reader, version);
     insert = (InsertCopyableUndoEntry)DecodeEntry(reader, version);
 }
Exemplo n.º 3
0
 public ReplaceUndoEntry(ISelectParent parent, DeleteUndoEntry delete, InsertCopyableUndoEntry insert)
     : base($"{parent.ChildString} Replaced", parent)
 {
     this.delete = delete;
     this.insert = insert;
 }