Пример #1
0
        void AddPose()
        {
            var childPoseNodeCP = new LASPChildPoseLinkNodeControlConstructionParams()
            {
                IndexValue         = mPins.Count.ToString(),
                CSType             = CSParam.CSType,
                HostNodesContainer = this.HostNodesContainer,
            };
            var childePoseNode = new LASPChildPoseLinkNodeControl(childPoseNodeCP);

            if (mPins.Count == 0)
            {
                AddChildNode(childePoseNode, LinkNodeStackPanel);
            }
            else
            {
                InsertChildNode(mPins.Count, childePoseNode, LinkNodeStackPanel);
            }

            var childBlendTimeNodeCP = new LASPChildBlendTimeNodeControlConstructionParams()
            {
                IndexValue         = mBlendTimePins.Count.ToString(),
                BlendTimeValue     = 0.1f,
                CSType             = CSParam.CSType,
                HostNodesContainer = this.HostNodesContainer,
            };
            var childeBlendTimeNode = new LASPChildBlendTimeNodeControl(childBlendTimeNodeCP);

            childeBlendTimeNode.Margin = new Thickness(4, 0, 0, 0);
            AddChildNode(childeBlendTimeNode, LinkNodeStackPanel);
        }
        void InitializeLinkControl(LASelectPoseByEnumControlConstructionParams csParam)
        {
            mActiveLinkHandle = ActiveValueHandle;

            mOutLinkHandle           = OutPoseHandle;
            mOutLinkHandle.MultiLink = false;

            mActiveLinkHandle.NameStringVisible = Visibility.Visible;
            mActiveLinkHandle.NameString        = "ActiveValue";
            mActiveLinkHandle.OnAddLinkInfo    += ActiveValueLinkHandle_OnAddLinkInfo;
            mActiveLinkHandle.OnDelLinkInfo    += ActiveValueLinkHandle_OnDelLinkInfo;


            AddLinkPinInfo("EnumActiveValueHandle", mActiveLinkHandle, null);

            AddLinkPinInfo("OutLinkHandle", mOutLinkHandle, null);

            var childPoseNodeCP = new LASPChildPoseLinkNodeControlConstructionParams()
            {
                IndexValue         = "Default",
                CSType             = CSParam.CSType,
                HostNodesContainer = this.HostNodesContainer,
            };

            mDefaultCtrl = new LASPChildPoseLinkNodeControl(childPoseNodeCP);
            AddChildNode(mDefaultCtrl, LinkNodeStackPanel);

            var childBlendTimeNodeCP = new LASPChildBlendTimeNodeControlConstructionParams()
            {
                IndexValue         = "Default",
                BlendTimeValue     = 0.1f,
                CSType             = CSParam.CSType,
                HostNodesContainer = this.HostNodesContainer,
            };

            mDefaultBlendTimeCtrl        = new LASPChildBlendTimeNodeControl(childBlendTimeNodeCP);
            mDefaultBlendTimeCtrl.Margin = new Thickness(4, 0, 0, 0);
            AddChildNode(mDefaultBlendTimeCtrl, LinkNodeStackPanel);
        }
        void AddPose(string name)
        {
            var childPoseNodeCP = new LASPChildPoseLinkNodeControlConstructionParams()
            {
                IndexValue         = name,
                CSType             = CSParam.CSType,
                HostNodesContainer = this.HostNodesContainer,
            };
            var childePoseNode = new LASPChildPoseLinkNodeControl(childPoseNodeCP);

            InsertChildNode(mPins.Count + 1, childePoseNode, LinkNodeStackPanel);

            var childBlendTimeNodeCP = new LASPChildBlendTimeNodeControlConstructionParams()
            {
                IndexValue         = name,
                BlendTimeValue     = 0.1f,
                CSType             = CSParam.CSType,
                HostNodesContainer = this.HostNodesContainer,
            };
            var childeBlendTimeNode = new LASPChildBlendTimeNodeControl(childBlendTimeNodeCP);

            childeBlendTimeNode.Margin = new Thickness(4, 0, 0, 0);
            AddChildNode(childeBlendTimeNode, LinkNodeStackPanel);
        }