public override void WriteXml(XmlWriter writer) { base.WriteXml(writer); writer.WriteElementString("TapeImage", TapeImage); writer.WriteElementString("OffFlagImage", BackgroundImage); writer.WriteElementString("ForegroundImage", ForegroundImage); writer.WriteElementString("BackgroundImage", BackgroundImage); writer.WriteElementString("Tape_PosX", Tape_PosX.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("Tape_PosY", Tape_PosY.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("Tape_Width", Tape_Width.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("Tape_Height", Tape_Height.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("Tape_CenterX", Tape_CenterX.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("Tape_CenterY", Tape_CenterY.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("OffFlag_PosX", OffFlag_PosX.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("OffFlag_PosY", OffFlag_PosY.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("OffFlag_Width", OffFlag_Width.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("OffFlag_Height", OffFlag_Height.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("OffFlag_IsHidden", OffFlag_IsHidden.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("MinHorizontal", MinHorizontal.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("HorizontalTravel", HorizontalTravel.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("MinVertical", MinVertical.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("VerticalTravel", VerticalTravel.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("MinRotation", MinRotation.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("RotationTravel", RotationTravel.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("InitialHorizontal", InitialHorizontal.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("InitialVertical", InitialVertical.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("InitialRotation", InitialRotation.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("MinInputHorizontal", MinInputHorizontal.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("MaxInputHorizontal", MaxInputHorizontal.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("MinInputVertical", MinInputVertical.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("MaxInputVertical", MaxInputVertical.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("MinInputRotation", MinInputRotation.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("MaxInputRotation", MaxInputRotation.ToString(CultureInfo.InvariantCulture)); }
public override void WriteXml(XmlWriter writer) { base.WriteXml(writer); writer.WriteElementString("KnobImage", KnobImage); writer.WriteElementString("RotationStep", RotationStep.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("StepValue", StepValue.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("InitialRotation", InitialRotation.ToString(CultureInfo.InvariantCulture)); writer.WriteStartElement("ClickType"); writer.WriteElementString("Type", ClickType.ToString()); if (ClickType != ClickType.Touch) { writer.WriteElementString("Sensitivity", Sensitivity.ToString(CultureInfo.InvariantCulture)); } writer.WriteEndElement(); }
public override void WriteXml(XmlWriter writer) { base.WriteXml(writer); writer.WriteElementString("BGPlateImage", BGPlateImage); writer.WriteElementString("KnobImage", KnobImage); writer.WriteElementString("Needle_Scale", Needle_Scale.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("Needle_PosX", Needle_PosX.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("Needle_PosY", Needle_PosY.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("Needle_PivotX", Needle_PivotX.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("Needle_PivotY", Needle_PivotY.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("InitialValue", InitialValue.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("StepValue", StepValue.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("MaxValue", MaxValue.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("MinValue", MinValue.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("InitialRotation", InitialRotation.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("RotationTravel", RotationTravel.ToString(CultureInfo.InvariantCulture)); }
public override void WriteXml(XmlWriter writer) { base.WriteXml(writer); writer.WriteElementString("KnobImage", KnobImage); writer.WriteElementString("InitialValue", InitialValue.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("StepValue", StepValue.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("MaxValue", MaxValue.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("MinValue", MinValue.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("InitialRotation", InitialRotation.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("RotationTravel", RotationTravel.ToString(CultureInfo.InvariantCulture)); writer.WriteStartElement("ClickType"); writer.WriteElementString("Type", ClickType.ToString()); if (ClickType == Controls.ClickType.Swipe) { writer.WriteElementString("Sensitivity", SwipeSensitivity.ToString(CultureInfo.InvariantCulture)); } writer.WriteEndElement(); }
public override void WriteXml(XmlWriter writer) { base.WriteXml(writer); writer.WriteElementString("MetricImage", MetricImage); writer.WriteElementString("InitialValueRotation", InitialValueRotation.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("StepValueRotation", StepValueRotation.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("MaxValueRotation", MaxValueRotation.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("MinValueRotation", MinValueRotation.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("InitialRotation", InitialRotation.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("RotationTravel", RotationTravel.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("InitialValueTranslationX", InitialValueTranslationX.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("StepValueTranslationX", StepValueTranslationX.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("MaxValueTranslationX", MaxValueTranslationX.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("MinValueTranslationX", MinValueTranslationX.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("InitialTranslationX", InitialTranslationX.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("TranslationTravelX", TranslationTravelX.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("InitialValueTranslationY", InitialValueTranslationY.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("StepValueTranslationY", StepValueTranslationY.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("MaxValueTranslationY", MaxValueTranslationY.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("MinValueTranslationY", MinValueTranslationY.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("InitialTranslationY", InitialTranslationY.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("TranslationTravelY", TranslationTravelY.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("ClickableVertical", ClickableVertical.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("ClickableHorizontal", ClickableHorizontal.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("InvertedHorizontal", InvertedHorizontal.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("InvertedVertical", InvertedVertical.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("DragOneOnOne", DragOneOnOne.ToString(CultureInfo.InvariantCulture)); writer.WriteStartElement("ClickType"); writer.WriteElementString("Type", ClickType.ToString( )); if (ClickType == Controls.ClickType.Swipe) { writer.WriteElementString("Sensitivity", SwipeSensitivity.ToString(CultureInfo.InvariantCulture)); } writer.WriteEndElement( ); }
protected override XmlElement VCreateInheritedElement(XmlElement baseElement) { var textureElement = baseElement.OwnerDocument.CreateElement("Texture"); textureElement.SetAttribute("resource", Texture); baseElement.AppendChild(textureElement); var velocityElement = baseElement.OwnerDocument.CreateElement("EmitterVelocity"); velocityElement.SetAttribute("x", EmitterVelocity.X.ToString(CultureInfo.InvariantCulture)); velocityElement.SetAttribute("y", EmitterVelocity.Y.ToString(CultureInfo.InvariantCulture)); baseElement.AppendChild(velocityElement); var variationElement = baseElement.OwnerDocument.CreateElement("EmitterVariation"); variationElement.SetAttribute("x", EmitterVariation.X.ToString(CultureInfo.InvariantCulture)); variationElement.SetAttribute("y", EmitterVariation.Y.ToString(CultureInfo.InvariantCulture)); baseElement.AppendChild(variationElement); var gravityElement = baseElement.OwnerDocument.CreateElement("Gravity"); gravityElement.SetAttribute("x", Gravity.X.ToString(CultureInfo.InvariantCulture)); gravityElement.SetAttribute("y", Gravity.Y.ToString(CultureInfo.InvariantCulture)); baseElement.AppendChild(gravityElement); var particlesPerSecondElement = baseElement.OwnerDocument.CreateElement("ParticlesPerSecond"); particlesPerSecondElement.SetAttribute("value", ParticlesPerSecond.ToString(CultureInfo.InvariantCulture)); baseElement.AppendChild(particlesPerSecondElement); var particlesLifetimeElement = baseElement.OwnerDocument.CreateElement("ParticleLifetime"); particlesLifetimeElement.SetAttribute("value", ParticleLifeTime.ToString(CultureInfo.InvariantCulture)); baseElement.AppendChild(particlesLifetimeElement); var maxParticlesElement = baseElement.OwnerDocument.CreateElement("MaxParticles"); maxParticlesElement.SetAttribute("value", MaxParticles.ToString(CultureInfo.InvariantCulture)); baseElement.AppendChild(maxParticlesElement); XmlElement finalColorElement = baseElement.OwnerDocument.CreateElement("FinalColor"); finalColorElement.SetAttribute("r", FinalColor.R.ToString(CultureInfo.InvariantCulture)); finalColorElement.SetAttribute("g", FinalColor.G.ToString(CultureInfo.InvariantCulture)); finalColorElement.SetAttribute("b", FinalColor.B.ToString(CultureInfo.InvariantCulture)); finalColorElement.SetAttribute("a", FinalColor.A.ToString(CultureInfo.InvariantCulture)); baseElement.AppendChild(finalColorElement); var colorEaseBiasElement = baseElement.OwnerDocument.CreateElement("ColorEaseBias"); colorEaseBiasElement.SetAttribute("value", ColorChangePoint.ToString(CultureInfo.InvariantCulture)); baseElement.AppendChild(colorEaseBiasElement); var initialScaleElement = baseElement.OwnerDocument.CreateElement("InitialParticleScale"); initialScaleElement.SetAttribute("x", InitialScale.X.ToString(CultureInfo.InvariantCulture)); initialScaleElement.SetAttribute("y", InitialScale.Y.ToString(CultureInfo.InvariantCulture)); baseElement.AppendChild(initialScaleElement); var finalScaleElement = baseElement.OwnerDocument.CreateElement("FinalParticleScale"); finalScaleElement.SetAttribute("x", FinalScale.X.ToString(CultureInfo.InvariantCulture)); finalScaleElement.SetAttribute("y", FinalScale.Y.ToString(CultureInfo.InvariantCulture)); baseElement.AppendChild(finalScaleElement); var scaleEaseBiasElement = baseElement.OwnerDocument.CreateElement("ScaleEaseBias"); scaleEaseBiasElement.SetAttribute("value", ScaleChangePoint.ToString(CultureInfo.InvariantCulture)); baseElement.AppendChild(scaleEaseBiasElement); var initialRotationElement = baseElement.OwnerDocument.CreateElement("InitialParticleRotation"); initialRotationElement.SetAttribute("value", InitialRotation.ToString(CultureInfo.InvariantCulture)); baseElement.AppendChild(initialRotationElement); var finalRotationElement = baseElement.OwnerDocument.CreateElement("FinalParticleRotation"); finalRotationElement.SetAttribute("value", FinalRotation.ToString(CultureInfo.InvariantCulture)); baseElement.AppendChild(finalRotationElement); var rotationEaseBiasElement = baseElement.OwnerDocument.CreateElement("RotationEaseBias"); rotationEaseBiasElement.SetAttribute("value", RotationChangePoint.ToString(CultureInfo.InvariantCulture)); baseElement.AppendChild(rotationEaseBiasElement); return(baseElement); }