コード例 #1
0
        public override bool IsEquivalentTo(ActionNodeEntityHandler other)
        {
            if (other.GetType() != GetType())
            {
                return(false);
            }

            return(Action.ActionID == ((ActionEntityHandler)other).Action.ActionID);
        }
コード例 #2
0
        public override bool IsEquivalentTo(ActionNodeEntityHandler other)
        {
            if (other.GetType() != GetType())
            {
                return(false);
            }

            return(AreEquivalent(ChildHandlers, ((BranchActionEntityHandler)other).ChildHandlers));
        }
コード例 #3
0
        private void UpdateActionModel(bool notify)
        {
            DisposeActionHandlers();
            _actionHandlers.AddRange(ActionNodeEntityHandler.Create(_viewer.ToolbarModel.ChildNodes));
            if (!notify)
            {
                return;
            }

            NotifyEntityPropertyChanged("ToolbarActions", GetToolbarActionEntities());
        }
コード例 #4
0
        public static List <ActionNodeEntityHandler> Create(ActionModelNodeList nodes)
        {
            var handlers = new List <ActionNodeEntityHandler>();

            foreach (ActionModelNode node in nodes)
            {
                //TODO (CR May 2010): remove the try/catch and let it crash?
                try
                {
                    ActionNodeEntityHandler handler = Create(node);
                    if (handler != null)
                    {
                        handlers.Add(handler);
                    }
                }
                catch (Exception e)
                {
                    Platform.Log(LogLevel.Error, e,
                                 "Unexpected exception processing action node: {0}", node);
                }
            }

            return(handlers);
        }
コード例 #5
0
 public override bool IsEquivalentTo(ActionNodeEntityHandler other)
 {
     return(base.IsEquivalentTo(other) &&
            AreEquivalent(ChildHandlers, ((DropDownActionEntityHandler)other).ChildHandlers));
 }
コード例 #6
0
 public abstract bool IsEquivalentTo(ActionNodeEntityHandler other);
コード例 #7
0
 public ContextMenuContainer(ActionModelNode modelNode)
 {
     _contextMenuHandlers = ActionNodeEntityHandler.Create(modelNode.ChildNodes);
 }