Пример #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 override bool IsEquivalentTo(ActionNodeEntityHandler other)
		{
			return base.IsEquivalentTo(other) && 
			       AreEquivalent(ChildHandlers, ((DropDownActionEntityHandler)other).ChildHandlers);
		}
Пример #8
0
		public abstract bool IsEquivalentTo(ActionNodeEntityHandler other);
Пример #9
0
		public override bool IsEquivalentTo(ActionNodeEntityHandler other)
		{
			if (other.GetType() != GetType())
				return false;

			return Action.ActionID == ((ActionEntityHandler)other).Action.ActionID;
		}
Пример #10
0
		public override bool IsEquivalentTo(ActionNodeEntityHandler other)
		{
			if (other.GetType() != GetType())
				return false;

			return AreEquivalent(ChildHandlers, ((BranchActionEntityHandler)other).ChildHandlers);
		}
Пример #11
0
 public ContextMenuContainer(ActionModelNode modelNode)
 {
     _contextMenuHandlers = ActionNodeEntityHandler.Create(modelNode.ChildNodes);
 }