Esempio n. 1
0
        public static SceneElement ChooseElementForBehavior(SceneElement root, ITypeId constraintType)
        {
            PathTargetDialog pathTargetDialog = new PathTargetDialog(root, (SceneElement)null, StringTable.SelectElementDialogTitle, StringTable.SelectElementDialogInfoText, new PathTargetDialog.PathTargetValidator(PathTargetDialog.ValidateBehaviorTargets), constraintType);
            bool?            nullable         = pathTargetDialog.ShowDialog();

            if ((!nullable.GetValueOrDefault() ? 0 : (nullable.HasValue ? true : false)) != 0 && pathTargetDialog.model.SelectedElement != null)
            {
                return(pathTargetDialog.model.SelectedElement.Element);
            }
            return((SceneElement)null);
        }
Esempio n. 2
0
        public static SceneElement ChooseElement(SceneElement root, SceneElement path)
        {
            PathTargetDialog pathTargetDialog = new PathTargetDialog(root, path, StringTable.SelectElementDialogTitle, StringTable.SelectElementDialogInfoText, new PathTargetDialog.PathTargetValidator(PathTargetDialog.AllowAllTargets), (ITypeId)null);
            bool?            nullable         = pathTargetDialog.ShowDialog();

            if ((!nullable.GetValueOrDefault() ? 0 : (nullable.HasValue ? true : false)) != 0 && pathTargetDialog.model.SelectedElement != null)
            {
                return(pathTargetDialog.model.SelectedElement.Element);
            }
            return((SceneElement)null);
        }