Exemple #1
0
        public IBaseAction CreateActionItem(IGroupAction a, ObservableCollection <IBaseAction> p)
        {
            IBaseAction action = null;

            if (a is GroupAction)
            {
                action = new ActionItemModel((GroupAction)a)
                {
                    Parent = p
                }
            }
            ;
            else if (a is GroupActionGroup)
            {
                action = new ActionSubmenuItemModel((GroupActionGroup)a)
                {
                    Parent = p
                }
            }
            ;
            else if (a is GroupActionSeparator)
            {
                action = new ActionSeparatorItemModel((GroupActionSeparator)a)
                {
                    Parent = p
                }
            }
            ;
            return(action);
        }
Exemple #2
0
        public IBaseAction CopyActionItems(IBaseAction a)
        {
            IBaseAction action = null;

            if (a is ActionItemModel)
            {
                action = new ActionItemModel((ActionItemModel)a);
            }
            else if (a is ActionSubmenuItemModel)
            {
                action = new ActionSubmenuItemModel((ActionSubmenuItemModel)a);
            }
            else if (a is ActionSeparatorItemModel)
            {
                action = new ActionSeparatorItemModel((ActionSeparatorItemModel)a);
            }
            return(action);
        }