private static string CreateBeginActionName(ITriggerContainer storyboardContainer, string timelineName)
        {
            string            str               = timelineName + StringTable.TriggerDefaultActionName;
            SceneNode         sceneNode         = (SceneNode)storyboardContainer;
            SceneNodeIDHelper sceneNodeIdHelper = new SceneNodeIDHelper(sceneNode.ViewModel, sceneNode);

            if (!sceneNodeIdHelper.IsValidElementID(sceneNode, str))
            {
                str = sceneNodeIdHelper.GetValidElementID(sceneNode, str);
            }
            return(str);
        }
Пример #2
0
        public static void EnsureNameAvailable(SceneNode rootNode, string name)
        {
            SceneNodeIDHelper sceneNodeIdHelper = new SceneNodeIDHelper(rootNode.ViewModel, rootNode);

            if (sceneNodeIdHelper.IsValidElementID(rootNode, name))
            {
                return;
            }
            DocumentNode node         = sceneNodeIdHelper.FindNode(name);
            SceneElement sceneElement = rootNode.ViewModel.GetSceneNode(node) as SceneElement;

            if (sceneElement == null)
            {
                return;
            }
            sceneElement.Name = sceneNodeIdHelper.GetValidElementID(rootNode, name);
        }