public bool Merge(IMemento otherMemento)
        {
            DrawableContainerBoundsChangeMemento other = otherMemento as DrawableContainerBoundsChangeMemento;

            if (other != null)
            {
                if (Objects.CompareLists <IDrawableContainer>(listOfdrawableContainer, other.listOfdrawableContainer))
                {
                    // Lists are equal, as we have the state already we can ignore the new memento
                    return(true);
                }
            }
            return(false);
        }
		public IMemento Restore() {
			DrawableContainerBoundsChangeMemento oldState = new DrawableContainerBoundsChangeMemento(listOfdrawableContainer);
			for(int index = 0; index < listOfdrawableContainer.Count; index++) {
				IDrawableContainer drawableContainer = listOfdrawableContainer[index];
				// Before
				drawableContainer.Invalidate();
				drawableContainer.Left = points[index].X;
				drawableContainer.Top = points[index].Y;
				drawableContainer.Width = sizes[index].Width;
				drawableContainer.Height = sizes[index].Height;
				// After
				drawableContainer.Invalidate();
				drawableContainer.Parent.Modified = true;
			}
			return oldState;
		}
        public IMemento Restore()
        {
            var oldState = new DrawableContainerBoundsChangeMemento(_listOfdrawableContainer);

            for (int index = 0; index < _listOfdrawableContainer.Count; index++)
            {
                IDrawableContainer drawableContainer = _listOfdrawableContainer[index];
                // Before
                drawableContainer.Invalidate();
                drawableContainer.Left   = _points[index].X;
                drawableContainer.Top    = _points[index].Y;
                drawableContainer.Width  = _sizes[index].Width;
                drawableContainer.Height = _sizes[index].Height;
                // After
                drawableContainer.Invalidate();
                drawableContainer.Parent.Modified = true;
            }
            return(oldState);
        }