Ejemplo n.º 1
0
        public IMemento Restore()
        {
            // Before
            drawableContainer.Invalidate();

            AddElementMemento oldState = new AddElementMemento(surface, drawableContainer);

            surface.AddElement(drawableContainer, false);

            // After
            drawableContainer.Invalidate();
            return(oldState);
        }
Ejemplo n.º 2
0
		public IMemento Restore() {
			// Before
			drawableContainer.Invalidate();

			AddElementMemento oldState = new AddElementMemento(surface, drawableContainer);
			surface.AddElement(drawableContainer, false);
			// The container has a selected flag which represents the state at the moment it was deleted.
			if (drawableContainer.Selected) {
				surface.SelectElement(drawableContainer);
			}

			// After
			drawableContainer.Invalidate();
			return oldState;
		}
Ejemplo n.º 3
0
        public IMemento Restore()
        {
            // Before
            drawableContainer.Invalidate();

            AddElementMemento oldState = new AddElementMemento(surface, drawableContainer);

            surface.AddElement(drawableContainer, false);
            // The container has a selected flag which represents the state at the moment it was deleted.
            if (drawableContainer.Selected)
            {
                surface.SelectElement(drawableContainer);
            }

            // After
            drawableContainer.Invalidate();
            return(oldState);
        }
Ejemplo n.º 4
0
        public IMemento Restore()
        {
            // Before
            drawableContainer.Invalidate();

            AddElementMemento oldState = new AddElementMemento(surface, drawableContainer);
            surface.AddElement(drawableContainer, false);

            // After
            drawableContainer.Invalidate();
            return oldState;
        }