public void OnAfterReadOwners(IXmlCodeReader serializer, XmlNode node, object[] owners)
 {
     if (Method == null && owners != null && owners.Length > 0 && ActionId != 0)
     {
         IActionsHolder actsHolder = owners[0] as IActionsHolder;
         if (actsHolder != null)
         {
             Dictionary <UInt32, IAction> acts = actsHolder.ActionInstances;
             if (acts != null)
             {
                 IAction a;
                 if (acts.TryGetValue(ActionId, out a))
                 {
                     if (a.ActionMethod == null)
                     {
                         throw new DesignerException("Error locating method for loop action [{0}]", ActionId);
                     }
                     Method = a.ActionMethod.MethodPointed;
                 }
             }
         }
     }
 }
 public override IAction CreateMethodAction(ILimnorDesignPane designPane, IClass holder, IMethod scopeMethod, IActionsHolder actsHolder)
 {
     throw new NotImplementedException("MethodItemWrapper.CreateMethodAction");
 }
 public AB_Group(IActionsHolder actsHolder)
     : base(actsHolder)
 {
 }
        public override bool ExecuteMenuCommand(LimnorProject project, IClass holder, XmlNode node, MultiPanes pane, IMethod scopeMethod, IActionsHolder actsHolder)
        {
            MethodInfoPointer mp = createPointer(pane, node);

            return(DesignUtil.OnCreateAction(holder, mp, scopeMethod, actsHolder, pane, node) != null);
        }
Пример #5
0
 public override bool ExecuteMenuCommand(LimnorProject project, IClass holder, XmlNode node, MultiPanes pane, IMethod scopeMethod, IActionsHolder actsHolder)
 {
     return(MenuItemDataPropertySelector.createAction(holder, _property, pane.Loader.Writer, node, scopeMethod, actsHolder, pane.FindForm()) != null);
 }
 public AB_MethodReturn(IActionsHolder scope)
     : base(scope)
 {
 }
 public void EstablishObjectOwnership(IActionsHolder scope)
 {
 }
 public PropertyReturnAction(IActionsHolder scope, Point pos, Size size)
     : base(scope, pos, size)
 {
 }
        public override IAction CreateMethodAction(ILimnorDesignPane designPane, IClass holder, IMethod scopeMethod, IActionsHolder actsHolder)
        {
            ActionClass act = new ActionClass(designPane.RootClass);            //holder.Host);

            act.ActionMethod = _method.CreatePointer(holder);
            act.ActionName   = act.ActionMethod.DefaultActionName;
            act.ActionHolder = actsHolder;
            ClassPointer owner = holder.Host as ClassPointer;

            if (owner == null)
            {
                owner = Owner.Host as ClassPointer;
                if (owner == null)
                {
                    owner = _pointer;
                }
            }
            if (owner.CreateNewAction(act, designPane.Loader.Writer, scopeMethod, designPane.PaneHolder.FindForm()))
            {
                return(act);
            }
            return(null);
        }
        public override bool ExecuteMenuCommand(LimnorProject project, IClass holder, XmlNode node, MultiPanes pane, IMethod scopeMethod, IActionsHolder actsHolder)
        {
            ClassPointer cp  = project.GetTypedData <ClassPointer>(pane.Loader.ClassID);
            ActionClass  act = new ActionClass(cp);           //holder.Host);

            act.ActionMethod = _method.CreatePointer(holder);
            act.ActionName   = act.ActionMethod.DefaultActionName;          //.ReferenceName;
            act.ActionHolder = actsHolder;
            ClassPointer owner = holder.Host as ClassPointer;

            if (owner == null)
            {
                owner = Owner.Host as ClassPointer;
                if (owner == null)
                {
                    owner = _pointer;
                }
            }
            return(owner.CreateNewAction(act, pane.Loader.Writer, scopeMethod, pane.FindForm()));
        }
Пример #11
0
 public AB_Constructor(IActionsHolder scope, Point pos, Size size)
     : base(scope, pos, size)
 {
 }
Пример #12
0
 public AB_Constructor(IActionsHolder scope)
     : base(scope)
 {
 }
 public AB_SingleActionBlock(IActionsHolder actsHolder, Point pos, Size size)
     : base(actsHolder, pos, size)
 {
 }
 public AB_SingleActionBlock(IActionsHolder actsHolder)
     : base(actsHolder)
 {
 }
 public AB_LoopActions(IActionsHolder scope)
     : base(scope)
 {
 }
Пример #16
0
        public override bool ExecuteMenuCommand(LimnorProject project, IClass holder, XmlNode node, MultiPanes pane, IMethod scopeMethod, IActionsHolder actsHolder)
        {
            CustomEventPointer ep = new CustomEventPointer(_event, holder);

            return(pane.AssignActions(ep, pane.FindForm()));
        }
 public PropertyReturnAction(IActionsHolder scope)
     : base(scope)
 {
 }
Пример #18
0
 public AB_ActionString(IActionsHolder scope)
     : base(scope)
 {
 }
 public void OnAfterDeserialize(IActionsHolder actionsHolder)
 {
     _reading = false;
 }
Пример #20
0
 public AB_ActionString(IActionsHolder scope, Point pos, Size size)
     : base(scope, pos, size)
 {
 }
 public void OnAfterDeserialize(IActionsHolder actionsHolder)
 {
 }
Пример #22
0
 public AB_ActionGroup(IActionsHolder scope)
     : base(scope)
 {
 }
 public AB_MethodReturn(IActionsHolder scope, Point pos, Size size)
     : base(scope, pos, size)
 {
 }
        protected override void OnEstablishObjectOwnership(IActionsHolder scope, List <UInt32> usedBranches)
        {
            base.OnEstablishObjectOwnership(scope, usedBranches);

            if (RepeatCount.MathExpression != null)
            {
                MathNodeRoot r = RepeatCount.MathExpression as MathNodeRoot;
                if (r != null)
                {
                    IList <ISourceValuePointer> l = r.GetValueSources();
                    if (l != null)
                    {
                        foreach (ISourceValuePointer sv in l)
                        {
                            sv.SetValueOwner(scope.OwnerMethod);
                        }
                    }
                }
            }
            if (_iconList != null)
            {
                foreach (ComponentIcon ci in _iconList)
                {
                    ci.EstablishObjectOwnership(scope.OwnerMethod);
                }
            }
            List <ComponentIcon> cis = ComponentIconList;

            foreach (ComponentIcon ci in cis)
            {
                ComponentIconActionBranchParameter ab = ci as ComponentIconActionBranchParameter;
                if (ab != null)
                {
                    if (ab.ClassPointer == null)
                    {
                        if (ab.MemberId == this.BranchId)
                        {
                            ab.ClassPointer  = RepeatIndex;
                            ab.DoNotSaveData = true;
                        }
                        else
                        {
                            ActionBranch ab0 = scope.FindActionBranchById(ab.MemberId);
                            if (ab0 == null)
                            {
                                throw new DesignerException("Action branch [{0}] not found", ab.MemberId);
                            }
                            else
                            {
                                AB_ForLoop abf = ab0 as AB_ForLoop;
                                if (abf != null)
                                {
                                    ab.ClassPointer  = abf.RepeatIndex;
                                    ab.DoNotSaveData = true;
                                }
                            }
                        }
                    }
                }
            }
        }
Пример #25
0
 public override ActionClass CreateSetPropertyAction(ILimnorDesignPane designPane, IClass holder, IMethod scopeMethod, IActionsHolder actsHolder)
 {
     return(MenuItemDataPropertySelector.createAction(holder, _property, designPane.Loader.Writer, designPane.Loader.Node, scopeMethod, actsHolder, designPane.PaneHolder.FindForm()));
 }
 public AB_ForLoop(IActionsHolder scope)
     : base(scope)
 {
 }
        public override IAction CreateMethodAction(ILimnorDesignPane designPane, IClass holder, IMethod scopeMethod, IActionsHolder actsHolder)
        {
            MethodInfoPointer mp = createPointer(designPane.PaneHolder, designPane.RootXmlNode);

            return(DesignUtil.OnCreateAction(holder, mp, scopeMethod, actsHolder, designPane.PaneHolder, designPane.RootXmlNode));
        }
 public AB_ForLoop(IActionsHolder scope, Point pos, Size size)
     : base(scope, pos, size)
 {
 }
 public AB_Group(IActionsHolder actsHolder, Point pos, Size size)
     : base(actsHolder, pos, size)
 {
 }
 public override bool ExecuteMenuCommand(LimnorProject project, IClass holder, XmlNode node, MultiPanes pane, IMethod scopeMethod, IActionsHolder actsHolder)
 {
     throw new NotImplementedException("MethodItemWrapper.ExecuteMenuCommand");
 }