Exemplo n.º 1
0
            public override bool Merge(UndoCommand cmd)
            {
                UndoChangeCommand other = cmd as UndoChangeCommand;

                if (other == null || !cmd.Node.Equals(node))
                {
                    return(false);
                }

                // can merge these changes
                newValue = other.newValue;
                return(true);
            }
Exemplo n.º 2
0
        public void NodeChanged(object sender, XmlNodeChangedEventArgs e)
        {
            modified = true;

            if (disabled)
            {
                return;
            }

//			Console.WriteLine("UndoManager: NodeChanged {0} / Value={1}", e.Node.Name, e.Node.Value);

            SetStart();

            UndoChangeCommand ucc = new UndoChangeCommand(e.Node, (string)previousValueStack.Pop());

            NewCommand(ucc);
        }