コード例 #1
0
 public void OnPostRootDeserialize()
 {
     if (_iconList != null)
     {
         foreach (ComponentIcon ci in _iconList)
         {
             ComponentIconActionBranchParameter ciap = ci as ComponentIconActionBranchParameter;
             if (ciap != null)
             {
                 ParameterClassCollectionItem pcci = ciap.ClassPointer as ParameterClassCollectionItem;
                 if (pcci != null && pcci.BaseClassType != null)
                 {
                     if (pcci.BaseClassType.IsGenericParameter)
                     {
                         if (pcci.ConcreteType == null)
                         {
                             if (ActionData != null)
                             {
                                 MethodPointer mp = this.ActionData.ActionMethod as MethodPointer;
                                 if (mp != null)
                                 {
                                     DataTypePointer dp = mp.GetConcreteType(pcci.BaseClassType);
                                     if (dp != null)
                                     {
                                         pcci.SetConcreteType(dp);
                                     }
                                 }
                             }
                         }
                     }
                     else if (pcci.BaseClassType.IsGenericType && pcci.BaseClassType.ContainsGenericParameters)
                     {
                         if (pcci.TypeParameters == null)
                         {
                             if (ActionData != null)
                             {
                                 MethodPointer mp = this.ActionData.ActionMethod as MethodPointer;
                                 if (mp != null)
                                 {
                                     DataTypePointer dp = mp.GetConcreteType(pcci.BaseClassType);
                                     if (dp != null)
                                     {
                                         pcci.TypeParameters = dp.TypeParameters;
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
 }
コード例 #2
0
 public override void OnDeserialization(XmlNode objectNode)
 {
     if (_iconList != null)
     {
         foreach (ComponentIcon ci in _iconList)
         {
             ComponentIconActionBranchParameter cip = ci as ComponentIconActionBranchParameter;
             if (cip != null)
             {
                 cip.ClassPointer  = RepeatIndex;
                 cip.DoNotSaveData = true;
                 break;
             }
         }
     }
 }
 public ParameterClassCollectionItem(ComponentIconActionBranchParameter componentIcon)
     : base(componentIcon)
 {
 }
 public ParameterClassArrayItem(ComponentIconActionBranchParameter componentIcon)
     : base(componentIcon)
 {
 }
コード例 #5
0
        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;
                                }
                            }
                        }
                    }
                }
            }
        }
コード例 #6
0
 public ParameterClassSubMethod(ComponentIconActionBranchParameter componentIcon)
     : base(componentIcon)
 {
 }
コード例 #7
0
 public ActionBranchParameter(ComponentIconActionBranchParameter componentIcon)
     : this(componentIcon.ActionBranch)
 {
 }