public override void SaveToFile(System.Xml.XmlWriter writer)
        {
            writer.WriteStartElement("ParticleEffect");
            writer.WriteStartAttribute("Type");
            writer.WriteValue("OneShot");
            writer.WriteEndAttribute();
            writer.WriteStartAttribute("TexturePolling");
            writer.WriteValue(TexturePolling);
            writer.WriteEndAttribute();
            writer.WriteStartAttribute("BlendState");
            writer.WriteValue(BlendingState);
            writer.WriteEndAttribute();
            writer.WriteStartAttribute("Radius");
            writer.WriteValue(CircleRadius.ToString());
            writer.WriteEndAttribute();

            Emitter.WriteToFile(writer);

            foreach (Particle p in MasterParticles)
            {
                p.SaveToFile(writer);
            }

            writer.WriteEndElement();
        }
Example #2
0
        public void WriteXml(System.Xml.XmlWriter writer)
        {
            writer.WriteAttributeString("Url", Url);
            writer.WriteAttributeString("ServiceName", ServiceName);
            
            writer.WriteStartAttribute("HostedServiceProperties");
            writer.WriteEndAttribute();

            writer.WriteStartAttribute("Deployments");
            writer.WriteEndAttribute();
        }
 private void WriteXMLAttributeAndValue(System.Xml.XmlTextWriter xmlWriter, string attributeName, string attributeValue)
 {
     xmlWriter.WriteStartAttribute(attributeName);
     xmlWriter.WriteValue(attributeValue);
 }
Example #4
0
        //protected byte _mask = 0x7F;					// маска отображения данных
        //protected ViewEnum _mapView = ViewEnum.None;		// Отображение данных
        public void WriteXml(System.Xml.XmlWriter w)
        {
            //"RPM_SCALE_FIRE,&H3BF0,16,1,16,50,RPM scale (Ignition time),123"
            //# Variable,Start-Address,X,Y,Map size,value,Map-name
            w.WriteStartAttribute("Map"); w.WriteValue(_variable);

            w.WriteStartElement("Offset"); w.WriteValue(Convert.ToString(_startAddress, 16)); w.WriteEndElement();
            w.WriteStartElement("Columns"); w.WriteValue(_X); w.WriteEndElement();
            w.WriteStartElement("Rows"); w.WriteValue(_Y); w.WriteEndElement();
            w.WriteStartElement("Cells"); w.WriteValue(_mapSize); w.WriteEndElement();
            w.WriteStartElement("Scale"); w.WriteValue(_value); w.WriteEndElement();
            w.WriteStartElement("ByteOnCell"); w.WriteValue(_byteOnCell); w.WriteEndElement();
            w.WriteStartElement("Name"); w.WriteValue(_mapName); w.WriteEndElement();
            w.WriteStartElement("Comment"); w.WriteValue(_comment); w.WriteEndElement();

            w.WriteStartElement("FRom");
            {
                w.WriteStartElement("ColumnSize"); w.WriteValue(_sizeOfCellX); w.WriteEndElement();
                w.WriteStartElement("RowSize"); w.WriteValue(_sizeOfCellY); w.WriteEndElement();
                w.WriteStartElement("ColorLoValues"); w.WriteValue(Convert.ToString(_loColor, 16)); w.WriteEndElement();
                w.WriteStartElement("ColorHiValues"); w.WriteValue(Convert.ToString(_hiColor, 16)); w.WriteEndElement();
                w.WriteStartElement("X-Map"); w.WriteValue(_xSatteliteConstName); w.WriteEndElement();
                w.WriteStartElement("Y-Map"); w.WriteValue(_ySatteliteConstName); w.WriteEndElement();
                w.WriteStartElement("Hide"); w.WriteValue(_hide); w.WriteEndElement();
                w.WriteStartElement("Flip"); w.WriteValue(_flip); w.WriteEndElement();
                w.WriteStartElement("Mask"); w.WriteValue(_mask); w.WriteEndElement();
                w.WriteStartElement("MapView"); w.WriteValue(Convert.ToInt32(_mapView)); w.WriteEndElement();
            }
            w.WriteEndElement();
        }
 protected virtual void _WriteAttribute(
     System.Xml.XmlWriter xmlWriter,
     string attributeName,
     string attributeNamespace,
     string attributeValue,
     string attributeValueNamespace
     )
 {
     if (String.IsNullOrEmpty(attributeValue))
         return;
     if (attributeName.Contains(":"))
     {
         xmlWriter.WriteStartAttribute
             (
             attributeName.Substring(0, attributeName.IndexOf(":")),
             attributeName.Substring(attributeName.IndexOf(":")+1),
             String.Empty
             );
     }
     else
     {
         xmlWriter.WriteStartAttribute
             (
             attributeName,
             attributeNamespace
             );
     }
     if (String.IsNullOrEmpty(attributeValueNamespace))
         xmlWriter.WriteString(attributeValue);
     else
         xmlWriter.WriteString(String.Format
             (
             "{0}:{1}",
             xmlWriter.LookupPrefix(attributeValueNamespace),
             attributeValue
             ));
     xmlWriter.WriteEndAttribute();
 }
Example #6
0
		private void WriteAcls(System.Xml.XmlWriter writer, SCAclItem acl)
		{
			writer.WriteStartElement("acl");

			writer.WriteStartAttribute("ContainerID");
			writer.WriteValue(acl.ContainerID);
			writer.WriteEndAttribute();

			writer.WriteStartAttribute("ContainerPermission");
			writer.WriteValue(acl.ContainerPermission);
			writer.WriteEndAttribute();

			writer.WriteStartAttribute("ContainerSchemaType");
			writer.WriteValue(acl.ContainerSchemaType);
			writer.WriteEndAttribute();

			writer.WriteStartAttribute("MemberID");
			writer.WriteValue(acl.MemberID);
			writer.WriteEndAttribute();

			writer.WriteStartAttribute("MemberSchemaType");
			writer.WriteValue(acl.MemberSchemaType);
			writer.WriteEndAttribute();

			writer.WriteStartAttribute("SortID");
			writer.WriteValue(acl.SortID);
			writer.WriteEndAttribute();

			writer.WriteStartAttribute("VersionEndTime");
			writer.WriteValue(acl.VersionEndTime);
			writer.WriteEndAttribute();

			writer.WriteStartAttribute("VersionStartTime");
			writer.WriteValue(acl.VersionStartTime);
			writer.WriteEndAttribute();

			writer.WriteEndElement();
		}
Example #7
0
		private void WriteCondition(System.Xml.XmlWriter writer, Conditions.SCCondition obj)
		{
			writer.WriteStartElement("condition");

			writer.WriteStartAttribute("Expression");
			writer.WriteValue(obj.Condition);
			writer.WriteEndAttribute();

			writer.WriteStartAttribute("Description");
			writer.WriteValue(obj.Description);
			writer.WriteEndAttribute();

			writer.WriteStartAttribute("OwnerID");
			writer.WriteValue(obj.OwnerID);
			writer.WriteEndAttribute();

			writer.WriteStartAttribute("SortID");
			writer.WriteValue(obj.SortID);
			writer.WriteEndAttribute();

			writer.WriteStartAttribute("Type");
			writer.WriteValue(obj.Type);
			writer.WriteEndAttribute();

			writer.WriteStartAttribute("VersionEndTime");
			writer.WriteValue(obj.VersionEndTime);
			writer.WriteEndAttribute();

			writer.WriteStartAttribute("VersionStartTime");
			writer.WriteValue(obj.VersionStartTime);
			writer.WriteEndAttribute();

			writer.WriteEndElement();
		}
		private void WriteReferenceChangeTitle(System.Xml.XmlWriter writer, ReferenceHistoryEntry entry)
		{
			writer.WriteStartAttribute("title");

			if (entry.Status == SchemaObjectStatus.Normal)
			{
				writer.WriteString("建立关系");
			}
			else
			{
				writer.WriteString("解除关系");
			}

			writer.WriteEndAttribute();
		}
Example #9
0
        public override void OnSave(System.Xml.XmlWriter writer)
        {
            base.OnSave(writer);

            writer.WriteStartAttribute("castsshadows");
            writer.WriteValue(CastsShadows);
            writer.WriteEndAttribute();

            writer.WriteStartAttribute("color");
            writer.WriteValue(ParseUtils.WriteVector3(Color));
            writer.WriteEndAttribute();

            writer.WriteStartAttribute("parameters");
            writer.WriteValue(ParseUtils.WriteVector4(Parameters));
            writer.WriteEndAttribute();

            writer.WriteStartAttribute("type");
            writer.WriteValue(type.ToString());
            writer.WriteEndAttribute();

            if (scene.MainLight == this)
            {
                writer.WriteStartAttribute("ismainlight");
                writer.WriteValue(true);
                writer.WriteEndAttribute();
            }
        }
Example #10
0
 public override void OnSave(System.Xml.XmlWriter writer)
 {
     base.OnSave(writer);
     writer.WriteStartAttribute("meshname");
     writer.WriteValue(mesh.Name);
     writer.WriteEndAttribute();
 }
		private void WriteEndTime(System.Xml.XmlWriter writer, HistoryEntry entry)
		{
			if (entry.VersionEndTime != infinit)
			{
				writer.WriteStartAttribute("end");
				writer.WriteValue(entry.VersionEndTime.ToUniversalTime().ToString("R"));
				writer.WriteEndAttribute();

				writer.WriteAttributeString("isDuration", "true");
			}
		}
		private static void WriteStartTime(System.Xml.XmlWriter writer, HistoryEntry entry)
		{
			writer.WriteStartAttribute("start");
			writer.WriteValue(entry.VersionStartTime.ToUniversalTime().ToString("R"));
			writer.WriteEndAttribute();
		}
		private void WriteMembershipChangeTitle(System.Xml.XmlWriter writer, MembershipHistoryEntry entry)
		{
			writer.WriteStartAttribute("title");

			if (entry.Status == SchemaObjectStatus.Normal)
			{
				writer.WriteString("建立成员关系 ");
			}
			else
			{
				writer.WriteString("解除成员关系");
			}

			writer.WriteEndAttribute();
		}
        public override void OnSave(System.Xml.XmlWriter writer)
        {
            base.OnSave(writer);

            writer.WriteStartAttribute("hmfilename");
            writer.WriteValue(heightmapFileName);
            writer.WriteEndAttribute();

            writer.WriteStartAttribute("heightrange");
            writer.WriteValue(ParseUtils.WriteVector2(heightRange));
            writer.WriteEndAttribute();
        }
Example #15
0
 public virtual void WriteXml(System.Xml.XmlWriter writer)
 {
     writer.WriteStartAttribute("OrderId");
     writer.WriteValue(OrderId);
     writer.WriteEndAttribute();
     writer.WriteStartAttribute("ProductId");
     writer.WriteValue(ProductId);
     writer.WriteEndAttribute();
 }
Example #16
0
 /// <summary>
 /// Method to write content to xml attribute.
 /// </summary>
 /// <param name="_writer">The XmlWriter object to write file.</param>
 /// <param name="_data">The object which contains data to save.</param>
 public void write(System.Xml.XmlWriter _writer, object _data)
 {
     _writer.WriteStartAttribute(Identifier);
     _writer.WriteValue(Transformer.write(FieldAccess.getField(_data, FieldName)));
     _writer.WriteEndAttribute();
 }
		private void WriteObjectChangeTitle(System.Xml.XmlWriter writer, HistoryEntry entry)
		{
			writer.WriteStartAttribute("title");
			if (entry.Status == SchemaObjectStatus.Normal)
				writer.WriteValue("属性编辑");
			else
			{
				writer.WriteValue("状态变更:" + entry.Status.ToString());
			}

			writer.WriteEndAttribute();
		}