Ejemplo n.º 1
0
        public void Execute(IPanel panel)
        {
            if (panel == null)
            {
                throw new ArgumentNullException("panel");
            }

            var container = panel.Parent as IPanelContainer;

            if (container != null)
            {
                // Insert after current panel
                int targetIndex = container.Childs.IndexOf(panel);
                container.Childs.Insert(targetIndex + 1, (IPanel)panel.Clone());
            }
        }