Пример #1
0
        public Stomach(AnimatTools.Framework.DataObject doParent)
            : base(doParent)
        {
            try
            {
                m_thLinkedPart = new AnimatTools.TypeHelpers.LinkedBodyPartList(this);

                System.Reflection.Assembly myAssembly = System.Reflection.Assembly.Load("VortexAnimatTools");

                this.Size = new System.Drawing.SizeF(36, 40);
                this.Image = AnimatTools.Framework.ImageManager.LoadImage(ref myAssembly, "VortexAnimatTools.Graphics.Stomach_Button.gif", false);
                this.DragImage = AnimatTools.Framework.ImageManager.LoadImage(ref myAssembly, "VortexAnimatTools.Graphics.Stomach_Button.gif", false);
                this.Name = "Stomach";
                this.Description = "This node allows the user to collect interact with the Stomach object.";

                //Now lets try and find the image for this node.
                this.ImageIndex = FindDiagramImageIndex(this.GetType().FullName);

                m_tpBodyPartType = typeof(VortexAnimatTools.DataObjects.Physical.RigidBodies.Stomach);
            }
            catch(System.Exception ex)
            {
                AnimatTools.Framework.Util.DisplayError(ex);
            }
        }
        public OdorSensor(AnimatTools.Framework.DataObject doParent)
            : base(doParent)
        {
            try
            {
                m_thLinkedPart = new AnimatTools.TypeHelpers.LinkedBodyPartList(this);

                System.Reflection.Assembly myAssembly = System.Reflection.Assembly.Load("VortexAnimatTools");

                this.Size = new System.Drawing.SizeF(55, 55);
                this.Image = AnimatTools.Framework.ImageManager.LoadImage(ref myAssembly, "VortexAnimatTools.Graphics.OdorSensor.gif", false);
                this.DragImage = AnimatTools.Framework.ImageManager.LoadImage(ref myAssembly, "VortexAnimatTools.Graphics.OdorSensor.gif", false);
                this.Name = "OdorSensor";
                this.Description = "This node allows the user to collect data directly from an odor sensor.";

                m_tpBodyPartType = typeof(VortexAnimatTools.DataObjects.Physical.RigidBodies.OdorSensor);
            }
            catch(System.Exception ex)
            {
                AnimatTools.Framework.Util.DisplayError(ex);
            }
        }
Пример #3
0
        public override void InitializeAfterLoad(int iAttempt)
        {
            try
            {
                base.InitializeAfterLoad(iAttempt);

                if(m_bInitialized)
                {
                    if(m_strLinkedBodyPartID.Length > 0)
                    {
                        AnimatTools.DataObjects.Physical.BodyPart bpPart = m_doOrganism.FindBodyPart(m_strLinkedBodyPartID, false);

                        m_thLinkedPart = new AnimatTools.TypeHelpers.LinkedBodyPartList(m_doOrganism, bpPart, m_tpBodyPartType);
                        SetDataType();
                    }
                    else
                        m_thLinkedPart = new AnimatTools.TypeHelpers.LinkedBodyPartList(m_doOrganism, null, m_tpBodyPartType);
                }
            }
            catch(System.Exception ex)
            {
                m_bInitialized = false;
                if(iAttempt == 1)
                    AnimatTools.Framework.Util.DisplayError(ex);
            }
        }