Beispiel #1
0
        public void UpdatePropertyContainers(TransformPropertyLookup propertyLookup)
        {
            AttributeCollection attributes = new AttributeCollection(new Attribute[2]
            {
                (Attribute) new NumberRangesAttribute(new double?(-89.0), new double?(-89.0), new double?(89.0), new double?(89.0), new bool?()),
                (Attribute) new NumberIncrementsAttribute(new double?(0.1), new double?(1.0), new double?(5.0))
            });

            if (propertyLookup.TransformType == TransformType.Transform2D)
            {
                if (propertyLookup.Relative)
                {
                    this.SkewXEditor.PropertyEntry = (PropertyEntry)propertyLookup.CreateProperty("SkewX", attributes);
                    this.SkewYEditor.PropertyEntry = (PropertyEntry)propertyLookup.CreateProperty("SkewY", attributes);
                }
                else
                {
                    this.SkewXEditor.PropertyEntry = (PropertyEntry)propertyLookup.CreateProperty("SkewTransform/AngleX", attributes);
                    this.SkewYEditor.PropertyEntry = (PropertyEntry)propertyLookup.CreateProperty("SkewTransform/AngleY", attributes);
                }
            }
            else
            {
                this.SkewXEditor.PropertyEntry = (PropertyEntry)null;
                this.SkewYEditor.PropertyEntry = (PropertyEntry)null;
            }
        }
Beispiel #2
0
        public static PropertyReference ConvertTransformPropertyToComposite(PropertyReference propertyReference)
        {
            if (propertyReference == null)
            {
                return((PropertyReference)null);
            }
            int num = -1;

            for (int index = 0; index < propertyReference.Count; ++index)
            {
                if (PlatformTypes.Transform.IsAssignableFrom((ITypeId)propertyReference[index].PropertyType))
                {
                    num = index;
                    break;
                }
            }
            if (num == -1)
            {
                return((PropertyReference)null);
            }
            ReferenceStep compositeProperty = TransformPropertyLookup.GetCorrespondingCompositeProperty(propertyReference);

            if (compositeProperty == null)
            {
                return((PropertyReference)null);
            }
            ReferenceStep[] steps = new ReferenceStep[num + 2];
            for (int index = 0; index <= num; ++index)
            {
                steps[index] = propertyReference.ReferenceSteps[index];
            }
            steps[num + 1] = compositeProperty;
            return(PropertyReference.CreateNewPropertyReferenceFromStepsWithoutCopy(steps));
        }
Beispiel #3
0
 public void UpdatePropertyContainers(TransformPropertyLookup propertyLookup)
 {
     if (propertyLookup.TransformType == TransformType.Transform3D)
     {
         if (propertyLookup.Relative)
         {
             this.TranslateXEditor.PropertyEntry = (PropertyEntry)propertyLookup.CreateProperty("TranslationX");
             this.TranslateYEditor.PropertyEntry = (PropertyEntry)propertyLookup.CreateProperty("TranslationY");
             this.TranslateZEditor.PropertyEntry = (PropertyEntry)propertyLookup.CreateProperty("TranslationZ");
         }
         else
         {
             this.TranslateXEditor.PropertyEntry = (PropertyEntry)propertyLookup.CreateProperty("TranslateTransform/OffsetX");
             this.TranslateYEditor.PropertyEntry = (PropertyEntry)propertyLookup.CreateProperty("TranslateTransform/OffsetY");
             this.TranslateZEditor.PropertyEntry = (PropertyEntry)propertyLookup.CreateProperty("TranslateTransform/OffsetZ");
         }
     }
     else
     {
         if (propertyLookup.Relative)
         {
             this.TranslateXEditor.PropertyEntry = (PropertyEntry)propertyLookup.CreateProperty("TranslationX");
             this.TranslateYEditor.PropertyEntry = (PropertyEntry)propertyLookup.CreateProperty("TranslationY");
         }
         else
         {
             this.TranslateXEditor.PropertyEntry = (PropertyEntry)propertyLookup.CreateProperty("TranslateTransform/X");
             this.TranslateYEditor.PropertyEntry = (PropertyEntry)propertyLookup.CreateProperty("TranslateTransform/Y");
         }
         this.TranslateZEditor.PropertyEntry = (PropertyEntry)null;
     }
 }
Beispiel #4
0
        public void UpdatePropertyContainers(TransformPropertyLookup propertyLookup)
        {
            AttributeCollection attributes = new AttributeCollection(new Attribute[2]
            {
                (Attribute) new NumberRangesAttribute(new double?(double.NegativeInfinity), new double?(-180.0), new double?(180.0), new double?(double.PositiveInfinity), new bool?()),
                (Attribute) new NumberIncrementsAttribute(new double?(0.1), new double?(1.0), new double?(5.0))
            });

            this.transformProperty = propertyLookup.TransformProperty;
            if (propertyLookup.TransformType == TransformType.Transform2D)
            {
                if (propertyLookup.Relative)
                {
                    this.RotationPropertyContainer.PropertyEntry = (PropertyEntry)propertyLookup.CreateProperty("RotationAngle", attributes);
                    this.RotationSpinner.PropertyEntry           = (PropertyEntry)propertyLookup.CreateProperty("RotationAngle", attributes);
                }
                else
                {
                    this.RotationPropertyContainer.PropertyEntry = (PropertyEntry)propertyLookup.CreateProperty("RotateTransform/Angle", attributes);
                    this.RotationSpinner.PropertyEntry           = (PropertyEntry)propertyLookup.CreateProperty("RotateTransform/Angle", attributes);
                }
                this.ArcBall.PropertyEntry = (PropertyEntry)null;
            }
            else
            {
                this.RotationPropertyContainer.PropertyEntry = (PropertyEntry)null;
                this.RotationSpinner.PropertyEntry           = (PropertyEntry)null;
                this.ArcBall.PropertyEntry = (PropertyEntry)propertyLookup.CreateProperty("RotationAngles");
            }
        }
        public void UpdatePropertyContainers(TransformPropertyLookup propertyLookup)
        {
            AttributeCollection attributes = new AttributeCollection(new Attribute[1]
            {
                (Attribute) new NumberIncrementsAttribute(new double?(0.01), new double?(0.1), new double?(1.0))
            });

            this.CenterOfRotationXEditor.PropertyEntry = (PropertyEntry)propertyLookup.CreateProperty("PlaneProjection.CenterOfRotationX", attributes);
            this.CenterOfRotationYEditor.PropertyEntry = (PropertyEntry)propertyLookup.CreateProperty("PlaneProjection.CenterOfRotationY", attributes);
            this.CenterOfRotationZEditor.PropertyEntry = (PropertyEntry)propertyLookup.CreateProperty("PlaneProjection.CenterOfRotationZ", attributes);
        }
Beispiel #6
0
        public void UpdatePropertyContainers(TransformPropertyLookup propertyLookup)
        {
            AttributeCollection attributes = new AttributeCollection(new Attribute[2]
            {
                (Attribute) new NumberRangesAttribute(new double?(double.NegativeInfinity), new double?(0.0), new double?(1.0), new double?(double.PositiveInfinity), new bool?()),
                (Attribute) new NumberIncrementsAttribute(new double?(0.01), new double?(0.05), new double?(0.1))
            });
            ITypeResolver     typeResolver      = (ITypeResolver)propertyLookup.TransformProperty.SceneNodeObjectSet.ProjectContext;
            PropertyReference propertyReference = new PropertyReference(typeResolver.ResolveProperty(Base2DElement.RenderTransformOriginProperty) as ReferenceStep);
            ReferenceStep     property1         = PlatformTypeHelper.GetProperty(typeResolver, PlatformTypes.Point, MemberType.LocalProperty, "X");
            ReferenceStep     property2         = PlatformTypeHelper.GetProperty(typeResolver, PlatformTypes.Point, MemberType.LocalProperty, "Y");

            this.renderTransformOriginXProperty = propertyReference.Append(property1);
            this.renderTransformOriginYProperty = propertyReference.Append(property2);
            PropertyReference reference = propertyLookup.TransformProperty.Reference;

            if (reference.Count == 1 && reference.FirstStep.Equals((object)Base2DElement.RenderTransformProperty))
            {
                if (propertyLookup.Relative)
                {
                    this.CenterPointXEditor.PropertyEntry = (PropertyEntry)null;
                    this.CenterPointYEditor.PropertyEntry = (PropertyEntry)null;
                }
                else
                {
                    this.CenterPointXEditor.PropertyEntry = (PropertyEntry)propertyLookup.CreateNormalProperty(this.renderTransformOriginXProperty, attributes);
                    this.CenterPointYEditor.PropertyEntry = (PropertyEntry)propertyLookup.CreateNormalProperty(this.renderTransformOriginYProperty, attributes);
                }
            }
            else
            {
                this.CenterPointXEditor.PropertyEntry = (PropertyEntry)propertyLookup.CreateProperty("CenterX", attributes);
                this.CenterPointYEditor.PropertyEntry = (PropertyEntry)propertyLookup.CreateProperty("CenterY", attributes);
            }
            if (propertyLookup.TransformType == TransformType.Transform3D)
            {
                this.CenterPointZEditor.PropertyEntry = (PropertyEntry)propertyLookup.CreateProperty("CenterZ", attributes);
            }
            else
            {
                this.CenterPointZEditor.PropertyEntry = (PropertyEntry)null;
            }
        }
Beispiel #7
0
        public void UpdatePropertyContainers(TransformPropertyLookup propertyLookup)
        {
            double num = propertyLookup.TransformType == TransformType.Transform3D ? 0.0 : -5.0;
            AttributeCollection attributes = new AttributeCollection(new Attribute[2]
            {
                (Attribute) new NumberRangesAttribute(new double?(propertyLookup.TransformType == TransformType.Transform3D ? 0.0 : double.NegativeInfinity), new double?(num), new double?(5.0), new double?(double.PositiveInfinity), new bool?()),
                (Attribute) new NumberIncrementsAttribute(new double?(0.01), new double?(0.05), new double?(0.1))
            });

            if (propertyLookup.TransformType == TransformType.Transform3D)
            {
                if (propertyLookup.Relative)
                {
                    this.ScaleXEditor.set_PropertyEntry((PropertyEntry)propertyLookup.CreateProperty("ScaleX", attributes));
                    this.ScaleYEditor.set_PropertyEntry((PropertyEntry)propertyLookup.CreateProperty("ScaleY", attributes));
                    this.ScaleZEditor.set_PropertyEntry((PropertyEntry)propertyLookup.CreateProperty("ScaleZ", attributes));
                }
                else
                {
                    this.ScaleXEditor.set_PropertyEntry((PropertyEntry)propertyLookup.CreateProperty("ScaleTransform/ScaleX", attributes));
                    this.ScaleYEditor.set_PropertyEntry((PropertyEntry)propertyLookup.CreateProperty("ScaleTransform/ScaleY", attributes));
                    this.ScaleZEditor.set_PropertyEntry((PropertyEntry)propertyLookup.CreateProperty("ScaleTransform/ScaleZ", attributes));
                }
            }
            else
            {
                if (propertyLookup.Relative)
                {
                    this.ScaleXEditor.set_PropertyEntry((PropertyEntry)propertyLookup.CreateProperty("ScaleX", attributes));
                    this.ScaleYEditor.set_PropertyEntry((PropertyEntry)propertyLookup.CreateProperty("ScaleY", attributes));
                }
                else
                {
                    this.ScaleXEditor.set_PropertyEntry((PropertyEntry)propertyLookup.CreateProperty("ScaleTransform/ScaleX", attributes));
                    this.ScaleYEditor.set_PropertyEntry((PropertyEntry)propertyLookup.CreateProperty("ScaleTransform/ScaleY", attributes));
                }
                this.ScaleZEditor.set_PropertyEntry((PropertyEntry)null);
            }
        }
Beispiel #8
0
 public void UpdatePropertyContainers(TransformPropertyLookup propertyLookup)
 {
     this.LocalOffsetXEditor.PropertyEntry = (PropertyEntry)propertyLookup.CreateProperty("PlaneProjection.LocalOffsetX");
     this.LocalOffsetYEditor.PropertyEntry = (PropertyEntry)propertyLookup.CreateProperty("PlaneProjection.LocalOffsetY");
     this.LocalOffsetZEditor.PropertyEntry = (PropertyEntry)propertyLookup.CreateProperty("PlaneProjection.LocalOffsetZ");
 }
 public void UpdatePropertyContainers(TransformPropertyLookup propertyLookup)
 {
     this.RotateXEditor.PropertyEntry = (PropertyEntry)propertyLookup.CreateProperty("PlaneProjection.RotationX");
     this.RotateYEditor.PropertyEntry = (PropertyEntry)propertyLookup.CreateProperty("PlaneProjection.RotationY");
     this.RotateZEditor.PropertyEntry = (PropertyEntry)propertyLookup.CreateProperty("PlaneProjection.RotationZ");
 }