Ejemplo n.º 1
0
        public Dictionary <string, object> AddParticleShapePropertyInfo(IParticleShape ps)
        {
            Dictionary <string, object> value;

            if (ParticleShapePropertyInfos.TryGetValue(ps, out value))
            {
                return(value);
            }

            value = new Dictionary <string, object>();
            ParticleShapePropertyInfos.Add(ps, value);
            return(value);
        }
Ejemplo n.º 2
0
        public void DealShape()
        {
            //left
            {
                ParticleShapeLeft   = null;
                ParticleComposeLeft = null;
                var linkcount = mCtrlValueLinkHandleLeft.GetLinkInfosCount();
                if (linkcount > 0)
                {
                    LinkInfo linkinfo = mCtrlValueLinkHandleLeft.GetLinkInfo(0);
                    if (linkinfo.m_linkFromObjectInfo != null && linkinfo.m_linkFromObjectInfo.HostNodeControl != null)
                    {
                        var basenodecontrol = linkinfo.m_linkFromObjectInfo.HostNodeControl;
                        while (basenodecontrol != null)
                        {
                            if ((basenodecontrol as IParticleShape) != null)
                            {
                                //Result..
                                ParticleShapeLeft = basenodecontrol as IParticleShape;
                                break;
                            }
                            else if ((basenodecontrol as ParticleComposeControl) != null)
                            {
                                //Result..
                                ParticleComposeLeft = basenodecontrol as ParticleComposeControl;
                                break;
                            }

                            IParticleNode particlenode = basenodecontrol as IParticleNode;
                            if (particlenode == null)
                            {
                                break;
                            }

                            var linkcontrol = particlenode.GetLinkControlUp();
                            if (linkcontrol == null || linkcontrol.HasLink == false)
                            {
                                break;
                            }

                            linkinfo = linkcontrol.GetLinkInfo(0);
                            if (linkinfo.m_linkFromObjectInfo == null)
                            {
                                break;
                            }


                            basenodecontrol = linkinfo.m_linkFromObjectInfo.HostNodeControl;
                        }
                    }
                }
            }

            //Right
            {
                ParticleShapeRight   = null;
                ParticleComposeRight = null;
                var linkcount = mCtrlValueLinkHandleRight.GetLinkInfosCount();
                if (linkcount > 0)
                {
                    LinkInfo linkinfo = mCtrlValueLinkHandleRight.GetLinkInfo(0);
                    if (linkinfo.m_linkFromObjectInfo != null && linkinfo.m_linkFromObjectInfo.HostNodeControl != null)
                    {
                        var basenodecontrol = linkinfo.m_linkFromObjectInfo.HostNodeControl;
                        while (basenodecontrol != null)
                        {
                            if ((basenodecontrol as IParticleShape) != null)
                            {
                                //Result..
                                ParticleShapeRight = basenodecontrol as IParticleShape;
                                break;
                            }
                            else if ((basenodecontrol as ParticleComposeControl) != null)
                            {
                                //Result..
                                ParticleComposeRight = basenodecontrol as ParticleComposeControl;
                                break;
                            }

                            IParticleNode particlenode = basenodecontrol as IParticleNode;
                            if (particlenode == null)
                            {
                                break;
                            }

                            var linkcontrol = particlenode.GetLinkControlUp();
                            if (linkcontrol == null || linkcontrol.HasLink == false)
                            {
                                break;
                            }

                            linkinfo = linkcontrol.GetLinkInfo(0);
                            if (linkinfo.m_linkFromObjectInfo == null)
                            {
                                break;
                            }


                            basenodecontrol = linkinfo.m_linkFromObjectInfo.HostNodeControl;
                        }
                    }
                }
            }
        }