#pragma warning disable 1591, 0114, 0108 // ------------------------------------------------------------------------------ // // Generated by Xsd2Code. Version 3.3.0.33001 // OSGeo.MapGuide.ObjectModels.SymbolDefinitionBindingListCSharpTrueFalseTrueTrueTrueFalseTrueFalseNet20SerializeDeserializeSaveToFileLoadFromFileTrueFalseFalseFalseFalse // // ------------------------------------------------------------------------------ namespace OSGeo.MapGuide.ObjectModels.SymbolDefinition_1_1_0 { using System; using System.Diagnostics; using System.Xml.Serialization; using System.Collections; using System.Xml.Schema; using System.ComponentModel; using System.IO; using OSGeo.MapGuide.ObjectModels.SymbolDefinition; using OSGeo.MapGuide.ObjectModels.Common; /// /// A 2D simple symbol for stylization. /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=true)] public partial class SimpleSymbolDefinition : SymbolDefinitionBase, System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private BindingList graphicsField; [EditorBrowsable(EditorBrowsableState.Never)] private ResizeBox resizeBoxField; [EditorBrowsable(EditorBrowsableState.Never)] private PointUsage pointUsageField; [EditorBrowsable(EditorBrowsableState.Never)] private LineUsage lineUsageField; [EditorBrowsable(EditorBrowsableState.Never)] private AreaUsage areaUsageField; [EditorBrowsable(EditorBrowsableState.Never)] private ParameterDefinition parameterDefinitionField; [EditorBrowsable(EditorBrowsableState.Never)] private ExtendedDataType extendedData1Field; [EditorBrowsable(EditorBrowsableState.Never)] private string versionField; public SimpleSymbolDefinition() { this.versionField = "1.1.0"; } [System.Xml.Serialization.XmlAttributeAttribute()] public string version { get { return this.versionField; } set { if ((this.versionField != null)) { if ((versionField.Equals(value) != true)) { this.versionField = value; this.OnPropertyChanged("version"); } } else { this.versionField = value; this.OnPropertyChanged("version"); } } } private static System.Xml.Serialization.XmlSerializer serializer; /// /// The collection of graphic elements defining this symbol. /// [System.Xml.Serialization.XmlArrayItemAttribute(typeof(Image), IsNullable=false)] [System.Xml.Serialization.XmlArrayItemAttribute(typeof(Path), IsNullable=false)] [System.Xml.Serialization.XmlArrayItemAttribute(typeof(Text), IsNullable=false)] public BindingList Graphics { get { return this.graphicsField; } set { if ((this.graphicsField != null)) { if ((graphicsField.Equals(value) != true)) { this.graphicsField = value; this.OnPropertyChanged("Graphics"); } } else { this.graphicsField = value; this.OnPropertyChanged("Graphics"); } } } /// /// The optional box used to resize and reposition select graphic elements. The graphical extent of all elements with ResizeControl set to AddToResizeBox will be added to this box, potentially causing it to grow in size. Any change in size causes all elements with ResizeControl set to AdjustToResizeBox to be proportionally resized and repositioned. /// public ResizeBox ResizeBox { get { return this.resizeBoxField; } set { if ((this.resizeBoxField != null)) { if ((resizeBoxField.Equals(value) != true)) { this.resizeBoxField = value; this.OnPropertyChanged("ResizeBox"); } } else { this.resizeBoxField = value; this.OnPropertyChanged("ResizeBox"); } } } /// /// Specifies how the symbol is used in the context of point features. /// public PointUsage PointUsage { get { return this.pointUsageField; } set { if ((this.pointUsageField != null)) { if ((pointUsageField.Equals(value) != true)) { this.pointUsageField = value; this.OnPropertyChanged("PointUsage"); } } else { this.pointUsageField = value; this.OnPropertyChanged("PointUsage"); } } } /// /// Specifies how the symbol is used in the context of linear features. /// public LineUsage LineUsage { get { return this.lineUsageField; } set { if ((this.lineUsageField != null)) { if ((lineUsageField.Equals(value) != true)) { this.lineUsageField = value; this.OnPropertyChanged("LineUsage"); } } else { this.lineUsageField = value; this.OnPropertyChanged("LineUsage"); } } } /// /// Specifies how the symbol is used in the context of area features. /// public AreaUsage AreaUsage { get { return this.areaUsageField; } set { if ((this.areaUsageField != null)) { if ((areaUsageField.Equals(value) != true)) { this.areaUsageField = value; this.OnPropertyChanged("AreaUsage"); } } else { this.areaUsageField = value; this.OnPropertyChanged("AreaUsage"); } } } /// /// The list of parameters used in this symbol. If a parameter is not listed here this is considered a bug in the symbol definition. /// public ParameterDefinition ParameterDefinition { get { return this.parameterDefinitionField; } set { if ((this.parameterDefinitionField != null)) { if ((parameterDefinitionField.Equals(value) != true)) { this.parameterDefinitionField = value; this.OnPropertyChanged("ParameterDefinition"); } } else { this.parameterDefinitionField = value; this.OnPropertyChanged("ParameterDefinition"); } } } public ExtendedDataType ExtendedData1 { get { return this.extendedData1Field; } set { if ((this.extendedData1Field != null)) { if ((extendedData1Field.Equals(value) != true)) { this.extendedData1Field = value; this.OnPropertyChanged("ExtendedData1"); } } else { this.extendedData1Field = value; this.OnPropertyChanged("ExtendedData1"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(SimpleSymbolDefinition)); } return serializer; } } //public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; //public virtual void OnPropertyChanged(string info) { // System.ComponentModel.PropertyChangedEventHandler handler = this.PropertyChanged; // if ((handler != null)) { // handler(this, new System.ComponentModel.PropertyChangedEventArgs(info)); // } //} #region Serialize/Deserialize /// /// Serializes current SimpleSymbolDefinition object into an XML document /// /// string XML value public virtual string Serialize() { System.IO.StreamReader streamReader = null; System.IO.MemoryStream memoryStream = null; try { memoryStream = new System.IO.MemoryStream(); Serializer.Serialize(memoryStream, this); memoryStream.Seek(0, System.IO.SeekOrigin.Begin); streamReader = new System.IO.StreamReader(memoryStream); return streamReader.ReadToEnd(); } finally { if ((streamReader != null)) { streamReader.Dispose(); } if ((memoryStream != null)) { memoryStream.Dispose(); } } } /// /// Deserializes workflow markup into an SimpleSymbolDefinition object /// /// string workflow markup to deserialize /// Output SimpleSymbolDefinition object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out SimpleSymbolDefinition obj, out System.Exception exception) { exception = null; obj = default(SimpleSymbolDefinition); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out SimpleSymbolDefinition obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static SimpleSymbolDefinition Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((SimpleSymbolDefinition)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current SimpleSymbolDefinition object into file /// /// full path of outupt xml file /// output Exception value if failed /// true if can serialize and save into file; otherwise, false public virtual bool SaveToFile(string fileName, out System.Exception exception) { exception = null; try { SaveToFile(fileName); return true; } catch (System.Exception e) { exception = e; return false; } } public virtual void SaveToFile(string fileName) { System.IO.StreamWriter streamWriter = null; try { string xmlString = Serialize(); System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName); streamWriter = xmlFile.CreateText(); streamWriter.WriteLine(xmlString); streamWriter.Close(); } finally { if ((streamWriter != null)) { streamWriter.Dispose(); } } } /// /// Deserializes xml markup from file into an SimpleSymbolDefinition object /// /// string xml file to load and deserialize /// Output SimpleSymbolDefinition object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out SimpleSymbolDefinition obj, out System.Exception exception) { exception = null; obj = default(SimpleSymbolDefinition); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out SimpleSymbolDefinition obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static SimpleSymbolDefinition LoadFromFile(string fileName) { System.IO.FileStream file = null; System.IO.StreamReader sr = null; try { file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read); sr = new System.IO.StreamReader(file); string xmlString = sr.ReadToEnd(); sr.Close(); file.Close(); return Deserialize(xmlString); } finally { if ((file != null)) { file.Dispose(); } if ((sr != null)) { sr.Dispose(); } } } #endregion #region Clone method /// /// Create a clone of this SimpleSymbolDefinition object /// public virtual SimpleSymbolDefinition Clone() { return ((SimpleSymbolDefinition)(this.MemberwiseClone())); } #endregion } [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=true)] public partial class Image : GraphicBase, System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private object itemField; [EditorBrowsable(EditorBrowsableState.Never)] private string sizeXField; [EditorBrowsable(EditorBrowsableState.Never)] private string sizeYField; [EditorBrowsable(EditorBrowsableState.Never)] private string sizeScalableField; [EditorBrowsable(EditorBrowsableState.Never)] private string angleField; [EditorBrowsable(EditorBrowsableState.Never)] private string positionXField; [EditorBrowsable(EditorBrowsableState.Never)] private string positionYField; [EditorBrowsable(EditorBrowsableState.Never)] private ExtendedDataType extendedData1Field; private static System.Xml.Serialization.XmlSerializer serializer; public Image() { this.sizeXField = "1.0"; this.sizeYField = "1.0"; /* this.sizeScalableField = "true"; this.angleField = "0.0"; this.positionXField = "0.0"; this.positionYField = "0.0"; */ } [System.Xml.Serialization.XmlElementAttribute("Content", typeof(byte[]), DataType="base64Binary")] [System.Xml.Serialization.XmlElementAttribute("Reference", typeof(ImageReference))] public object Item { get { return this.itemField; } set { if ((this.itemField != null)) { if ((itemField.Equals(value) != true)) { this.itemField = value; this.OnPropertyChanged("Item"); } } else { this.itemField = value; this.OnPropertyChanged("Item"); } } } public string SizeX { get { return this.sizeXField; } set { if ((this.sizeXField != null)) { if ((sizeXField.Equals(value) != true)) { this.sizeXField = value; this.OnPropertyChanged("SizeX"); } } else { this.sizeXField = value; this.OnPropertyChanged("SizeX"); } } } public string SizeY { get { return this.sizeYField; } set { if ((this.sizeYField != null)) { if ((sizeYField.Equals(value) != true)) { this.sizeYField = value; this.OnPropertyChanged("SizeY"); } } else { this.sizeYField = value; this.OnPropertyChanged("SizeY"); } } } //[System.ComponentModel.DefaultValueAttribute("true")] public string SizeScalable { get { return this.sizeScalableField; } set { if ((this.sizeScalableField != null)) { if ((sizeScalableField.Equals(value) != true)) { this.sizeScalableField = value; this.OnPropertyChanged("SizeScalable"); } } else { this.sizeScalableField = value; this.OnPropertyChanged("SizeScalable"); } } } //[System.ComponentModel.DefaultValueAttribute("0.0")] public string Angle { get { return this.angleField; } set { if ((this.angleField != null)) { if ((angleField.Equals(value) != true)) { this.angleField = value; this.OnPropertyChanged("Angle"); } } else { this.angleField = value; this.OnPropertyChanged("Angle"); } } } //[System.ComponentModel.DefaultValueAttribute("0.0")] public string PositionX { get { return this.positionXField; } set { if ((this.positionXField != null)) { if ((positionXField.Equals(value) != true)) { this.positionXField = value; this.OnPropertyChanged("PositionX"); } } else { this.positionXField = value; this.OnPropertyChanged("PositionX"); } } } //[System.ComponentModel.DefaultValueAttribute("0.0")] public string PositionY { get { return this.positionYField; } set { if ((this.positionYField != null)) { if ((positionYField.Equals(value) != true)) { this.positionYField = value; this.OnPropertyChanged("PositionY"); } } else { this.positionYField = value; this.OnPropertyChanged("PositionY"); } } } public ExtendedDataType ExtendedData1 { get { return this.extendedData1Field; } set { if ((this.extendedData1Field != null)) { if ((extendedData1Field.Equals(value) != true)) { this.extendedData1Field = value; this.OnPropertyChanged("ExtendedData1"); } } else { this.extendedData1Field = value; this.OnPropertyChanged("ExtendedData1"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(Image)); } return serializer; } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; public virtual void OnPropertyChanged(string info) { System.ComponentModel.PropertyChangedEventHandler handler = this.PropertyChanged; if ((handler != null)) { handler(this, new System.ComponentModel.PropertyChangedEventArgs(info)); } } #region Serialize/Deserialize /// /// Serializes current Image object into an XML document /// /// string XML value public virtual string Serialize() { System.IO.StreamReader streamReader = null; System.IO.MemoryStream memoryStream = null; try { memoryStream = new System.IO.MemoryStream(); Serializer.Serialize(memoryStream, this); memoryStream.Seek(0, System.IO.SeekOrigin.Begin); streamReader = new System.IO.StreamReader(memoryStream); return streamReader.ReadToEnd(); } finally { if ((streamReader != null)) { streamReader.Dispose(); } if ((memoryStream != null)) { memoryStream.Dispose(); } } } /// /// Deserializes workflow markup into an Image object /// /// string workflow markup to deserialize /// Output Image object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out Image obj, out System.Exception exception) { exception = null; obj = default(Image); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out Image obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static Image Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((Image)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current Image object into file /// /// full path of outupt xml file /// output Exception value if failed /// true if can serialize and save into file; otherwise, false public virtual bool SaveToFile(string fileName, out System.Exception exception) { exception = null; try { SaveToFile(fileName); return true; } catch (System.Exception e) { exception = e; return false; } } public virtual void SaveToFile(string fileName) { System.IO.StreamWriter streamWriter = null; try { string xmlString = Serialize(); System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName); streamWriter = xmlFile.CreateText(); streamWriter.WriteLine(xmlString); streamWriter.Close(); } finally { if ((streamWriter != null)) { streamWriter.Dispose(); } } } /// /// Deserializes xml markup from file into an Image object /// /// string xml file to load and deserialize /// Output Image object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out Image obj, out System.Exception exception) { exception = null; obj = default(Image); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out Image obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static Image LoadFromFile(string fileName) { System.IO.FileStream file = null; System.IO.StreamReader sr = null; try { file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read); sr = new System.IO.StreamReader(file); string xmlString = sr.ReadToEnd(); sr.Close(); file.Close(); return Deserialize(xmlString); } finally { if ((file != null)) { file.Dispose(); } if ((sr != null)) { sr.Dispose(); } } } #endregion #region Clone method /// /// Create a clone of this Image object /// public virtual Image Clone() { return ((Image)(this.MemberwiseClone())); } #endregion } [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=true)] public partial class ImageReference : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private string resourceIdField; [EditorBrowsable(EditorBrowsableState.Never)] private string libraryItemNameField; private static System.Xml.Serialization.XmlSerializer serializer; public string ResourceId { get { return this.resourceIdField; } set { if ((this.resourceIdField != null)) { if ((resourceIdField.Equals(value) != true)) { this.resourceIdField = value; this.OnPropertyChanged("ResourceId"); } } else { this.resourceIdField = value; this.OnPropertyChanged("ResourceId"); } } } public string LibraryItemName { get { return this.libraryItemNameField; } set { if ((this.libraryItemNameField != null)) { if ((libraryItemNameField.Equals(value) != true)) { this.libraryItemNameField = value; this.OnPropertyChanged("LibraryItemName"); } } else { this.libraryItemNameField = value; this.OnPropertyChanged("LibraryItemName"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(ImageReference)); } return serializer; } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; public virtual void OnPropertyChanged(string info) { System.ComponentModel.PropertyChangedEventHandler handler = this.PropertyChanged; if ((handler != null)) { handler(this, new System.ComponentModel.PropertyChangedEventArgs(info)); } } #region Serialize/Deserialize /// /// Serializes current ImageReference object into an XML document /// /// string XML value public virtual string Serialize() { System.IO.StreamReader streamReader = null; System.IO.MemoryStream memoryStream = null; try { memoryStream = new System.IO.MemoryStream(); Serializer.Serialize(memoryStream, this); memoryStream.Seek(0, System.IO.SeekOrigin.Begin); streamReader = new System.IO.StreamReader(memoryStream); return streamReader.ReadToEnd(); } finally { if ((streamReader != null)) { streamReader.Dispose(); } if ((memoryStream != null)) { memoryStream.Dispose(); } } } /// /// Deserializes workflow markup into an ImageReference object /// /// string workflow markup to deserialize /// Output ImageReference object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out ImageReference obj, out System.Exception exception) { exception = null; obj = default(ImageReference); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out ImageReference obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static ImageReference Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((ImageReference)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current ImageReference object into file /// /// full path of outupt xml file /// output Exception value if failed /// true if can serialize and save into file; otherwise, false public virtual bool SaveToFile(string fileName, out System.Exception exception) { exception = null; try { SaveToFile(fileName); return true; } catch (System.Exception e) { exception = e; return false; } } public virtual void SaveToFile(string fileName) { System.IO.StreamWriter streamWriter = null; try { string xmlString = Serialize(); System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName); streamWriter = xmlFile.CreateText(); streamWriter.WriteLine(xmlString); streamWriter.Close(); } finally { if ((streamWriter != null)) { streamWriter.Dispose(); } } } /// /// Deserializes xml markup from file into an ImageReference object /// /// string xml file to load and deserialize /// Output ImageReference object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out ImageReference obj, out System.Exception exception) { exception = null; obj = default(ImageReference); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out ImageReference obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static ImageReference LoadFromFile(string fileName) { System.IO.FileStream file = null; System.IO.StreamReader sr = null; try { file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read); sr = new System.IO.StreamReader(file); string xmlString = sr.ReadToEnd(); sr.Close(); file.Close(); return Deserialize(xmlString); } finally { if ((file != null)) { file.Dispose(); } if ((sr != null)) { sr.Dispose(); } } } #endregion #region Clone method /// /// Create a clone of this ImageReference object /// public virtual ImageReference Clone() { return ((ImageReference)(this.MemberwiseClone())); } #endregion } [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=true)] public partial class SimpleSymbol : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private object itemField; [EditorBrowsable(EditorBrowsableState.Never)] private string renderingPassField; [EditorBrowsable(EditorBrowsableState.Never)] private ExtendedDataType extendedData1Field; private static System.Xml.Serialization.XmlSerializer serializer; public SimpleSymbol() { this.renderingPassField = "0"; } [System.Xml.Serialization.XmlElementAttribute("ResourceId", typeof(string))] [System.Xml.Serialization.XmlElementAttribute("SimpleSymbolDefinition", typeof(SimpleSymbolDefinition))] public object Item { get { return this.itemField; } set { if ((this.itemField != null)) { if ((itemField.Equals(value) != true)) { this.itemField = value; this.OnPropertyChanged("Item"); } } else { this.itemField = value; this.OnPropertyChanged("Item"); } } } /// /// The optional rendering pass in which this symbol definition draws. If specified this must be greater than or equal to zero. Defaults to 0. /// //[System.ComponentModel.DefaultValueAttribute("0")] public string RenderingPass { get { return this.renderingPassField; } set { if ((this.renderingPassField != null)) { if ((renderingPassField.Equals(value) != true)) { this.renderingPassField = value; this.OnPropertyChanged("RenderingPass"); } } else { this.renderingPassField = value; this.OnPropertyChanged("RenderingPass"); } } } public ExtendedDataType ExtendedData1 { get { return this.extendedData1Field; } set { if ((this.extendedData1Field != null)) { if ((extendedData1Field.Equals(value) != true)) { this.extendedData1Field = value; this.OnPropertyChanged("ExtendedData1"); } } else { this.extendedData1Field = value; this.OnPropertyChanged("ExtendedData1"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(SimpleSymbol)); } return serializer; } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; public virtual void OnPropertyChanged(string info) { System.ComponentModel.PropertyChangedEventHandler handler = this.PropertyChanged; if ((handler != null)) { handler(this, new System.ComponentModel.PropertyChangedEventArgs(info)); } } #region Serialize/Deserialize /// /// Serializes current SimpleSymbol object into an XML document /// /// string XML value public virtual string Serialize() { System.IO.StreamReader streamReader = null; System.IO.MemoryStream memoryStream = null; try { memoryStream = new System.IO.MemoryStream(); Serializer.Serialize(memoryStream, this); memoryStream.Seek(0, System.IO.SeekOrigin.Begin); streamReader = new System.IO.StreamReader(memoryStream); return streamReader.ReadToEnd(); } finally { if ((streamReader != null)) { streamReader.Dispose(); } if ((memoryStream != null)) { memoryStream.Dispose(); } } } /// /// Deserializes workflow markup into an SimpleSymbol object /// /// string workflow markup to deserialize /// Output SimpleSymbol object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out SimpleSymbol obj, out System.Exception exception) { exception = null; obj = default(SimpleSymbol); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out SimpleSymbol obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static SimpleSymbol Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((SimpleSymbol)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current SimpleSymbol object into file /// /// full path of outupt xml file /// output Exception value if failed /// true if can serialize and save into file; otherwise, false public virtual bool SaveToFile(string fileName, out System.Exception exception) { exception = null; try { SaveToFile(fileName); return true; } catch (System.Exception e) { exception = e; return false; } } public virtual void SaveToFile(string fileName) { System.IO.StreamWriter streamWriter = null; try { string xmlString = Serialize(); System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName); streamWriter = xmlFile.CreateText(); streamWriter.WriteLine(xmlString); streamWriter.Close(); } finally { if ((streamWriter != null)) { streamWriter.Dispose(); } } } /// /// Deserializes xml markup from file into an SimpleSymbol object /// /// string xml file to load and deserialize /// Output SimpleSymbol object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out SimpleSymbol obj, out System.Exception exception) { exception = null; obj = default(SimpleSymbol); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out SimpleSymbol obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static SimpleSymbol LoadFromFile(string fileName) { System.IO.FileStream file = null; System.IO.StreamReader sr = null; try { file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read); sr = new System.IO.StreamReader(file); string xmlString = sr.ReadToEnd(); sr.Close(); file.Close(); return Deserialize(xmlString); } finally { if ((file != null)) { file.Dispose(); } if ((sr != null)) { sr.Dispose(); } } } #endregion #region Clone method /// /// Create a clone of this SimpleSymbol object /// public virtual SimpleSymbol Clone() { return ((SimpleSymbol)(this.MemberwiseClone())); } #endregion } [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=true)] public partial class Parameter : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private string identifierField; [EditorBrowsable(EditorBrowsableState.Never)] private string defaultValueField; [EditorBrowsable(EditorBrowsableState.Never)] private string displayNameField; [EditorBrowsable(EditorBrowsableState.Never)] private string descriptionField; [EditorBrowsable(EditorBrowsableState.Never)] private DataType2 dataTypeField; [EditorBrowsable(EditorBrowsableState.Never)] private ExtendedDataType extendedData1Field; private static System.Xml.Serialization.XmlSerializer serializer; public Parameter() { this.dataTypeField = DataType2.String; } /// /// The parameter identifier as used in the symbol. /// public string Identifier { get { return this.identifierField; } set { if ((this.identifierField != null)) { if ((identifierField.Equals(value) != true)) { this.identifierField = value; this.OnPropertyChanged("Identifier"); } } else { this.identifierField = value; this.OnPropertyChanged("Identifier"); } } } /// /// The default value of the parameter if no override is defined in the symbol instance. This can be an expression. /// public string DefaultValue { get { return this.defaultValueField; } set { if ((this.defaultValueField != null)) { if ((defaultValueField.Equals(value) != true)) { this.defaultValueField = value; this.OnPropertyChanged("DefaultValue"); } } else { this.defaultValueField = value; this.OnPropertyChanged("DefaultValue"); } } } /// /// An optional short description of the parameter. This can be used, for example, to ask the user to specify a parameter value. /// public string DisplayName { get { return this.displayNameField; } set { if ((this.displayNameField != null)) { if ((displayNameField.Equals(value) != true)) { this.displayNameField = value; this.OnPropertyChanged("DisplayName"); } } else { this.displayNameField = value; this.OnPropertyChanged("DisplayName"); } } } /// /// An optional long description of the parameter. This might include a description of useful values for this parameter. /// public string Description { get { return this.descriptionField; } set { if ((this.descriptionField != null)) { if ((descriptionField.Equals(value) != true)) { this.descriptionField = value; this.OnPropertyChanged("Description"); } } else { this.descriptionField = value; this.OnPropertyChanged("Description"); } } } /// /// An optional explicit declaration of data type or data usage context. This is a hint used by the UI when assigning a value to this parameter. Defaults to String. /// //[System.ComponentModel.DefaultValueAttribute(DataType2.String)] public DataType2 DataType { get { return this.dataTypeField; } set { if ((dataTypeField.Equals(value) != true)) { this.dataTypeField = value; this.OnPropertyChanged("DataType"); } } } public ExtendedDataType ExtendedData1 { get { return this.extendedData1Field; } set { if ((this.extendedData1Field != null)) { if ((extendedData1Field.Equals(value) != true)) { this.extendedData1Field = value; this.OnPropertyChanged("ExtendedData1"); } } else { this.extendedData1Field = value; this.OnPropertyChanged("ExtendedData1"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(Parameter)); } return serializer; } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; public virtual void OnPropertyChanged(string info) { System.ComponentModel.PropertyChangedEventHandler handler = this.PropertyChanged; if ((handler != null)) { handler(this, new System.ComponentModel.PropertyChangedEventArgs(info)); } } #region Serialize/Deserialize /// /// Serializes current Parameter object into an XML document /// /// string XML value public virtual string Serialize() { System.IO.StreamReader streamReader = null; System.IO.MemoryStream memoryStream = null; try { memoryStream = new System.IO.MemoryStream(); Serializer.Serialize(memoryStream, this); memoryStream.Seek(0, System.IO.SeekOrigin.Begin); streamReader = new System.IO.StreamReader(memoryStream); return streamReader.ReadToEnd(); } finally { if ((streamReader != null)) { streamReader.Dispose(); } if ((memoryStream != null)) { memoryStream.Dispose(); } } } /// /// Deserializes workflow markup into an Parameter object /// /// string workflow markup to deserialize /// Output Parameter object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out Parameter obj, out System.Exception exception) { exception = null; obj = default(Parameter); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out Parameter obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static Parameter Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((Parameter)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current Parameter object into file /// /// full path of outupt xml file /// output Exception value if failed /// true if can serialize and save into file; otherwise, false public virtual bool SaveToFile(string fileName, out System.Exception exception) { exception = null; try { SaveToFile(fileName); return true; } catch (System.Exception e) { exception = e; return false; } } public virtual void SaveToFile(string fileName) { System.IO.StreamWriter streamWriter = null; try { string xmlString = Serialize(); System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName); streamWriter = xmlFile.CreateText(); streamWriter.WriteLine(xmlString); streamWriter.Close(); } finally { if ((streamWriter != null)) { streamWriter.Dispose(); } } } /// /// Deserializes xml markup from file into an Parameter object /// /// string xml file to load and deserialize /// Output Parameter object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out Parameter obj, out System.Exception exception) { exception = null; obj = default(Parameter); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out Parameter obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static Parameter LoadFromFile(string fileName) { System.IO.FileStream file = null; System.IO.StreamReader sr = null; try { file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read); sr = new System.IO.StreamReader(file); string xmlString = sr.ReadToEnd(); sr.Close(); file.Close(); return Deserialize(xmlString); } finally { if ((file != null)) { file.Dispose(); } if ((sr != null)) { sr.Dispose(); } } } #endregion #region Clone method /// /// Create a clone of this Parameter object /// public virtual Parameter Clone() { return ((Parameter)(this.MemberwiseClone())); } #endregion } /// /// The list of parameters used in this symbol. If a parameter is not listed here this is considered a bug in the symbol definition. /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=true)] public partial class ParameterDefinition : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private BindingList parameterField; [EditorBrowsable(EditorBrowsableState.Never)] private ExtendedDataType extendedData1Field; private static System.Xml.Serialization.XmlSerializer serializer; [System.Xml.Serialization.XmlElementAttribute("Parameter")] public BindingList Parameter { get { return this.parameterField; } set { if ((this.parameterField != null)) { if ((parameterField.Equals(value) != true)) { this.parameterField = value; this.OnPropertyChanged("Parameter"); } } else { this.parameterField = value; this.OnPropertyChanged("Parameter"); } } } public ExtendedDataType ExtendedData1 { get { return this.extendedData1Field; } set { if ((this.extendedData1Field != null)) { if ((extendedData1Field.Equals(value) != true)) { this.extendedData1Field = value; this.OnPropertyChanged("ExtendedData1"); } } else { this.extendedData1Field = value; this.OnPropertyChanged("ExtendedData1"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(ParameterDefinition)); } return serializer; } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; public virtual void OnPropertyChanged(string info) { System.ComponentModel.PropertyChangedEventHandler handler = this.PropertyChanged; if ((handler != null)) { handler(this, new System.ComponentModel.PropertyChangedEventArgs(info)); } } #region Serialize/Deserialize /// /// Serializes current ParameterDefinition object into an XML document /// /// string XML value public virtual string Serialize() { System.IO.StreamReader streamReader = null; System.IO.MemoryStream memoryStream = null; try { memoryStream = new System.IO.MemoryStream(); Serializer.Serialize(memoryStream, this); memoryStream.Seek(0, System.IO.SeekOrigin.Begin); streamReader = new System.IO.StreamReader(memoryStream); return streamReader.ReadToEnd(); } finally { if ((streamReader != null)) { streamReader.Dispose(); } if ((memoryStream != null)) { memoryStream.Dispose(); } } } /// /// Deserializes workflow markup into an ParameterDefinition object /// /// string workflow markup to deserialize /// Output ParameterDefinition object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out ParameterDefinition obj, out System.Exception exception) { exception = null; obj = default(ParameterDefinition); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out ParameterDefinition obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static ParameterDefinition Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((ParameterDefinition)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current ParameterDefinition object into file /// /// full path of outupt xml file /// output Exception value if failed /// true if can serialize and save into file; otherwise, false public virtual bool SaveToFile(string fileName, out System.Exception exception) { exception = null; try { SaveToFile(fileName); return true; } catch (System.Exception e) { exception = e; return false; } } public virtual void SaveToFile(string fileName) { System.IO.StreamWriter streamWriter = null; try { string xmlString = Serialize(); System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName); streamWriter = xmlFile.CreateText(); streamWriter.WriteLine(xmlString); streamWriter.Close(); } finally { if ((streamWriter != null)) { streamWriter.Dispose(); } } } /// /// Deserializes xml markup from file into an ParameterDefinition object /// /// string xml file to load and deserialize /// Output ParameterDefinition object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out ParameterDefinition obj, out System.Exception exception) { exception = null; obj = default(ParameterDefinition); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out ParameterDefinition obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static ParameterDefinition LoadFromFile(string fileName) { System.IO.FileStream file = null; System.IO.StreamReader sr = null; try { file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read); sr = new System.IO.StreamReader(file); string xmlString = sr.ReadToEnd(); sr.Close(); file.Close(); return Deserialize(xmlString); } finally { if ((file != null)) { file.Dispose(); } if ((sr != null)) { sr.Dispose(); } } } #endregion #region Clone method /// /// Create a clone of this ParameterDefinition object /// public virtual ParameterDefinition Clone() { return ((ParameterDefinition)(this.MemberwiseClone())); } #endregion } /// /// Specifies how the symbol is used in the context of area features. /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=true)] public partial class AreaUsage : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private string angleControlField; [EditorBrowsable(EditorBrowsableState.Never)] private string originControlField; [EditorBrowsable(EditorBrowsableState.Never)] private string clippingControlField; [EditorBrowsable(EditorBrowsableState.Never)] private string angleField; [EditorBrowsable(EditorBrowsableState.Never)] private string originXField; [EditorBrowsable(EditorBrowsableState.Never)] private string originYField; [EditorBrowsable(EditorBrowsableState.Never)] private string repeatXField; [EditorBrowsable(EditorBrowsableState.Never)] private string repeatYField; [EditorBrowsable(EditorBrowsableState.Never)] private string bufferWidthField; [EditorBrowsable(EditorBrowsableState.Never)] private ExtendedDataType extendedData1Field; private static System.Xml.Serialization.XmlSerializer serializer; public AreaUsage() { /* this.angleControlField = "\'FromAngle\'"; this.originControlField = "\'Global\'"; this.clippingControlField = "\'Clip\'"; this.angleField = "0.0"; this.originXField = "0.0"; this.originYField = "0.0"; this.repeatXField = "0.0"; this.repeatYField = "0.0"; this.bufferWidthField = "0.0"; */ } /// /// Specifies how the symbol angle is defined. This must evaluate to one of: FromAngle (default) or FromGeometry. /// //[System.ComponentModel.DefaultValueAttribute("\'FromAngle\'")] public string AngleControl { get { return this.angleControlField; } set { if ((this.angleControlField != null)) { if ((angleControlField.Equals(value) != true)) { this.angleControlField = value; this.OnPropertyChanged("AngleControl"); } } else { this.angleControlField = value; this.OnPropertyChanged("AngleControl"); } } } /// /// Specifies how the symbol grid origin is defined. This must evaluate to one of: Global (default), Local, or Centroid. /// //[System.ComponentModel.DefaultValueAttribute("\'Global\'")] public string OriginControl { get { return this.originControlField; } set { if ((this.originControlField != null)) { if ((originControlField.Equals(value) != true)) { this.originControlField = value; this.OnPropertyChanged("OriginControl"); } } else { this.originControlField = value; this.OnPropertyChanged("OriginControl"); } } } /// /// Specifies the clipping behavior of the symbol at polygon boundaries. This must evaluate to one of: Clip (default), Inside, or Overlap. /// //[System.ComponentModel.DefaultValueAttribute("\'Clip\'")] public string ClippingControl { get { return this.clippingControlField; } set { if ((this.clippingControlField != null)) { if ((clippingControlField.Equals(value) != true)) { this.clippingControlField = value; this.OnPropertyChanged("ClippingControl"); } } else { this.clippingControlField = value; this.OnPropertyChanged("ClippingControl"); } } } /// /// Specifies the angle of each repeating symbol, in degrees. If AngleControl evaluates to FromAngle then this specifies the absolute angle of the symbol. If AngleControl evaluates to FromGeometry then this specifies the symbol angle relative to the geometry. Defaults to 0. /// //[System.ComponentModel.DefaultValueAttribute("0.0")] public string Angle { get { return this.angleField; } set { if ((this.angleField != null)) { if ((angleField.Equals(value) != true)) { this.angleField = value; this.OnPropertyChanged("Angle"); } } else { this.angleField = value; this.OnPropertyChanged("Angle"); } } } /// /// The x-coordinate of the symbol grid origin, in mm. Only applies if OriginControl evaluates to Global or Local. Defaults to 0. /// //[System.ComponentModel.DefaultValueAttribute("0.0")] public string OriginX { get { return this.originXField; } set { if ((this.originXField != null)) { if ((originXField.Equals(value) != true)) { this.originXField = value; this.OnPropertyChanged("OriginX"); } } else { this.originXField = value; this.OnPropertyChanged("OriginX"); } } } /// /// The y-coordinate of the symbol grid origin, in mm. Only applies if OriginControl evaluates to Global or Local. Defaults to 0. /// //[System.ComponentModel.DefaultValueAttribute("0.0")] public string OriginY { get { return this.originYField; } set { if ((this.originYField != null)) { if ((originYField.Equals(value) != true)) { this.originYField = value; this.OnPropertyChanged("OriginY"); } } else { this.originYField = value; this.OnPropertyChanged("OriginY"); } } } /// /// The horizontal separation between symbols, in mm. Defaults to 0. /// //[System.ComponentModel.DefaultValueAttribute("0.0")] public string RepeatX { get { return this.repeatXField; } set { if ((this.repeatXField != null)) { if ((repeatXField.Equals(value) != true)) { this.repeatXField = value; this.OnPropertyChanged("RepeatX"); } } else { this.repeatXField = value; this.OnPropertyChanged("RepeatX"); } } } /// /// The vertical separation between symbols, in mm. Defaults to 0. /// //[System.ComponentModel.DefaultValueAttribute("0.0")] public string RepeatY { get { return this.repeatYField; } set { if ((this.repeatYField != null)) { if ((repeatYField.Equals(value) != true)) { this.repeatYField = value; this.OnPropertyChanged("RepeatY"); } } else { this.repeatYField = value; this.OnPropertyChanged("RepeatY"); } } } /// /// The width, in mm, of the buffer zone relative to the polygon boundary in which the symbol is rendered. Defaults to 0. /// //[System.ComponentModel.DefaultValueAttribute("0.0")] public string BufferWidth { get { return this.bufferWidthField; } set { if ((this.bufferWidthField != null)) { if ((bufferWidthField.Equals(value) != true)) { this.bufferWidthField = value; this.OnPropertyChanged("BufferWidth"); } } else { this.bufferWidthField = value; this.OnPropertyChanged("BufferWidth"); } } } public ExtendedDataType ExtendedData1 { get { return this.extendedData1Field; } set { if ((this.extendedData1Field != null)) { if ((extendedData1Field.Equals(value) != true)) { this.extendedData1Field = value; this.OnPropertyChanged("ExtendedData1"); } } else { this.extendedData1Field = value; this.OnPropertyChanged("ExtendedData1"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(AreaUsage)); } return serializer; } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; public virtual void OnPropertyChanged(string info) { System.ComponentModel.PropertyChangedEventHandler handler = this.PropertyChanged; if ((handler != null)) { handler(this, new System.ComponentModel.PropertyChangedEventArgs(info)); } } #region Serialize/Deserialize /// /// Serializes current AreaUsage object into an XML document /// /// string XML value public virtual string Serialize() { System.IO.StreamReader streamReader = null; System.IO.MemoryStream memoryStream = null; try { memoryStream = new System.IO.MemoryStream(); Serializer.Serialize(memoryStream, this); memoryStream.Seek(0, System.IO.SeekOrigin.Begin); streamReader = new System.IO.StreamReader(memoryStream); return streamReader.ReadToEnd(); } finally { if ((streamReader != null)) { streamReader.Dispose(); } if ((memoryStream != null)) { memoryStream.Dispose(); } } } /// /// Deserializes workflow markup into an AreaUsage object /// /// string workflow markup to deserialize /// Output AreaUsage object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out AreaUsage obj, out System.Exception exception) { exception = null; obj = default(AreaUsage); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out AreaUsage obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static AreaUsage Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((AreaUsage)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current AreaUsage object into file /// /// full path of outupt xml file /// output Exception value if failed /// true if can serialize and save into file; otherwise, false public virtual bool SaveToFile(string fileName, out System.Exception exception) { exception = null; try { SaveToFile(fileName); return true; } catch (System.Exception e) { exception = e; return false; } } public virtual void SaveToFile(string fileName) { System.IO.StreamWriter streamWriter = null; try { string xmlString = Serialize(); System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName); streamWriter = xmlFile.CreateText(); streamWriter.WriteLine(xmlString); streamWriter.Close(); } finally { if ((streamWriter != null)) { streamWriter.Dispose(); } } } /// /// Deserializes xml markup from file into an AreaUsage object /// /// string xml file to load and deserialize /// Output AreaUsage object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out AreaUsage obj, out System.Exception exception) { exception = null; obj = default(AreaUsage); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out AreaUsage obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static AreaUsage LoadFromFile(string fileName) { System.IO.FileStream file = null; System.IO.StreamReader sr = null; try { file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read); sr = new System.IO.StreamReader(file); string xmlString = sr.ReadToEnd(); sr.Close(); file.Close(); return Deserialize(xmlString); } finally { if ((file != null)) { file.Dispose(); } if ((sr != null)) { sr.Dispose(); } } } #endregion #region Clone method /// /// Create a clone of this AreaUsage object /// public virtual AreaUsage Clone() { return ((AreaUsage)(this.MemberwiseClone())); } #endregion } /// /// Specifies how the symbol is used in the context of linear features. /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=true)] public partial class LineUsage : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private string angleControlField; [EditorBrowsable(EditorBrowsableState.Never)] private string unitsControlField; [EditorBrowsable(EditorBrowsableState.Never)] private string vertexControlField; [EditorBrowsable(EditorBrowsableState.Never)] private string angleField; [EditorBrowsable(EditorBrowsableState.Never)] private string startOffsetField; [EditorBrowsable(EditorBrowsableState.Never)] private string endOffsetField; [EditorBrowsable(EditorBrowsableState.Never)] private string repeatField; [EditorBrowsable(EditorBrowsableState.Never)] private string vertexAngleLimitField; [EditorBrowsable(EditorBrowsableState.Never)] private string vertexJoinField; [EditorBrowsable(EditorBrowsableState.Never)] private string vertexMiterLimitField; [EditorBrowsable(EditorBrowsableState.Never)] private Path defaultPathField; [EditorBrowsable(EditorBrowsableState.Never)] private ExtendedDataType extendedData1Field; private static System.Xml.Serialization.XmlSerializer serializer; public LineUsage() { /* this.angleControlField = "\'FromGeometry\'"; this.unitsControlField = "\'Absolute\'"; this.vertexControlField = "\'OverlapWrap\'"; this.angleField = "0.0"; this.repeatField = "0.0"; this.vertexAngleLimitField = "0.0"; this.vertexJoinField = "\'Round\'"; this.vertexMiterLimitField = "5.0"; */ } /// /// Specifies how the symbol angle is defined. This must evaluate to one of: FromAngle or FromGeometry (default). /// //[System.ComponentModel.DefaultValueAttribute("\'FromGeometry\'")] public string AngleControl { get { return this.angleControlField; } set { if ((this.angleControlField != null)) { if ((angleControlField.Equals(value) != true)) { this.angleControlField = value; this.OnPropertyChanged("AngleControl"); } } else { this.angleControlField = value; this.OnPropertyChanged("AngleControl"); } } } /// /// Specifies whether the distribution parameters are interpreted as absolute values (in mm) or parametric values. This must evaluate to one of: Absolute (default) or Parametric. /// //[System.ComponentModel.DefaultValueAttribute("\'Absolute\'")] public string UnitsControl { get { return this.unitsControlField; } set { if ((this.unitsControlField != null)) { if ((unitsControlField.Equals(value) != true)) { this.unitsControlField = value; this.OnPropertyChanged("UnitsControl"); } } else { this.unitsControlField = value; this.OnPropertyChanged("UnitsControl"); } } } /// /// Specifies the symbol behavior at vertices. This must evaluate to one of: OverlapNone, OverlapDirect, or OverlapWrap (default). /// //[System.ComponentModel.DefaultValueAttribute("\'OverlapWrap\'")] public string VertexControl { get { return this.vertexControlField; } set { if ((this.vertexControlField != null)) { if ((vertexControlField.Equals(value) != true)) { this.vertexControlField = value; this.OnPropertyChanged("VertexControl"); } } else { this.vertexControlField = value; this.OnPropertyChanged("VertexControl"); } } } /// /// Specifies the angle of each repeating symbol, in degrees. If AngleControl evaluates to FromAngle then this specifies the absolute angle of the symbol. If AngleControl evaluates to FromGeometry then this specifies the symbol angle relative to the geometry. Defaults to 0. /// //[System.ComponentModel.DefaultValueAttribute("0.0")] public string Angle { get { return this.angleField; } set { if ((this.angleField != null)) { if ((angleField.Equals(value) != true)) { this.angleField = value; this.OnPropertyChanged("Angle"); } } else { this.angleField = value; this.OnPropertyChanged("Angle"); } } } /// /// Specifies where the symbol distribution begins, relative to the start of the feature. If specified this must be greater than or equal to zero. /// public string StartOffset { get { return this.startOffsetField; } set { if ((this.startOffsetField != null)) { if ((startOffsetField.Equals(value) != true)) { this.startOffsetField = value; this.OnPropertyChanged("StartOffset"); } } else { this.startOffsetField = value; this.OnPropertyChanged("StartOffset"); } } } /// /// Specifies where the symbol distribution ends, relative to the end of the feature. If specified this must be greater than or equal to zero. /// public string EndOffset { get { return this.endOffsetField; } set { if ((this.endOffsetField != null)) { if ((endOffsetField.Equals(value) != true)) { this.endOffsetField = value; this.OnPropertyChanged("EndOffset"); } } else { this.endOffsetField = value; this.OnPropertyChanged("EndOffset"); } } } /// /// Specifies the separation between repeating symbols. Defaults to 0. /// //[System.ComponentModel.DefaultValueAttribute("0.0")] public string Repeat { get { return this.repeatField; } set { if ((this.repeatField != null)) { if ((repeatField.Equals(value) != true)) { this.repeatField = value; this.OnPropertyChanged("Repeat"); } } else { this.repeatField = value; this.OnPropertyChanged("Repeat"); } } } /// /// Specifies the limiting angle, in degrees, by a which the feature geometry can change before some of the VertexControl options take effect. If specified this must be greater than or equal to zero. Defaults to 0. /// //[System.ComponentModel.DefaultValueAttribute("0.0")] public string VertexAngleLimit { get { return this.vertexAngleLimitField; } set { if ((this.vertexAngleLimitField != null)) { if ((vertexAngleLimitField.Equals(value) != true)) { this.vertexAngleLimitField = value; this.OnPropertyChanged("VertexAngleLimit"); } } else { this.vertexAngleLimitField = value; this.OnPropertyChanged("VertexAngleLimit"); } } } /// /// Specifies the wrapping behavior at vertices for all graphic elements. Only applies if VertexControl evaluates to OverlapWrap. This must evaluate to one of: None, Bevel, Round (default), or Miter. /// //[System.ComponentModel.DefaultValueAttribute("\'Round\'")] public string VertexJoin { get { return this.vertexJoinField; } set { if ((this.vertexJoinField != null)) { if ((vertexJoinField.Equals(value) != true)) { this.vertexJoinField = value; this.OnPropertyChanged("VertexJoin"); } } else { this.vertexJoinField = value; this.OnPropertyChanged("VertexJoin"); } } } /// /// The limit to use when drawing miter vertex joins. A miter vertex join is trimmed if the ratio of the miter length to symbol height is greater than the miter limit. If specified this must be greater than zero. Defaults to 5. /// //[System.ComponentModel.DefaultValueAttribute("5.0")] public string VertexMiterLimit { get { return this.vertexMiterLimitField; } set { if ((this.vertexMiterLimitField != null)) { if ((vertexMiterLimitField.Equals(value) != true)) { this.vertexMiterLimitField = value; this.OnPropertyChanged("VertexMiterLimit"); } } else { this.vertexMiterLimitField = value; this.OnPropertyChanged("VertexMiterLimit"); } } } /// /// Specifies the default path attributes to use when drawing the symbol. These apply to any centerline that gets drawn where the symbol can't draw, and to path elements that don't specify attributes. The geometry contained in this path is ignored and should be empty. /// public Path DefaultPath { get { return this.defaultPathField; } set { if ((this.defaultPathField != null)) { if ((defaultPathField.Equals(value) != true)) { this.defaultPathField = value; this.OnPropertyChanged("DefaultPath"); } } else { this.defaultPathField = value; this.OnPropertyChanged("DefaultPath"); } } } public ExtendedDataType ExtendedData1 { get { return this.extendedData1Field; } set { if ((this.extendedData1Field != null)) { if ((extendedData1Field.Equals(value) != true)) { this.extendedData1Field = value; this.OnPropertyChanged("ExtendedData1"); } } else { this.extendedData1Field = value; this.OnPropertyChanged("ExtendedData1"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(LineUsage)); } return serializer; } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; public virtual void OnPropertyChanged(string info) { System.ComponentModel.PropertyChangedEventHandler handler = this.PropertyChanged; if ((handler != null)) { handler(this, new System.ComponentModel.PropertyChangedEventArgs(info)); } } #region Serialize/Deserialize /// /// Serializes current LineUsage object into an XML document /// /// string XML value public virtual string Serialize() { System.IO.StreamReader streamReader = null; System.IO.MemoryStream memoryStream = null; try { memoryStream = new System.IO.MemoryStream(); Serializer.Serialize(memoryStream, this); memoryStream.Seek(0, System.IO.SeekOrigin.Begin); streamReader = new System.IO.StreamReader(memoryStream); return streamReader.ReadToEnd(); } finally { if ((streamReader != null)) { streamReader.Dispose(); } if ((memoryStream != null)) { memoryStream.Dispose(); } } } /// /// Deserializes workflow markup into an LineUsage object /// /// string workflow markup to deserialize /// Output LineUsage object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out LineUsage obj, out System.Exception exception) { exception = null; obj = default(LineUsage); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out LineUsage obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static LineUsage Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((LineUsage)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current LineUsage object into file /// /// full path of outupt xml file /// output Exception value if failed /// true if can serialize and save into file; otherwise, false public virtual bool SaveToFile(string fileName, out System.Exception exception) { exception = null; try { SaveToFile(fileName); return true; } catch (System.Exception e) { exception = e; return false; } } public virtual void SaveToFile(string fileName) { System.IO.StreamWriter streamWriter = null; try { string xmlString = Serialize(); System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName); streamWriter = xmlFile.CreateText(); streamWriter.WriteLine(xmlString); streamWriter.Close(); } finally { if ((streamWriter != null)) { streamWriter.Dispose(); } } } /// /// Deserializes xml markup from file into an LineUsage object /// /// string xml file to load and deserialize /// Output LineUsage object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out LineUsage obj, out System.Exception exception) { exception = null; obj = default(LineUsage); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out LineUsage obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static LineUsage LoadFromFile(string fileName) { System.IO.FileStream file = null; System.IO.StreamReader sr = null; try { file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read); sr = new System.IO.StreamReader(file); string xmlString = sr.ReadToEnd(); sr.Close(); file.Close(); return Deserialize(xmlString); } finally { if ((file != null)) { file.Dispose(); } if ((sr != null)) { sr.Dispose(); } } } #endregion #region Clone method /// /// Create a clone of this LineUsage object /// public virtual LineUsage Clone() { return ((LineUsage)(this.MemberwiseClone())); } #endregion } [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=true)] public partial class Path : GraphicBase, System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private string geometryField; [EditorBrowsable(EditorBrowsableState.Never)] private string fillColorField; [EditorBrowsable(EditorBrowsableState.Never)] private string lineColorField; [EditorBrowsable(EditorBrowsableState.Never)] private string lineWeightField; [EditorBrowsable(EditorBrowsableState.Never)] private string lineWeightScalableField; [EditorBrowsable(EditorBrowsableState.Never)] private string lineCapField; [EditorBrowsable(EditorBrowsableState.Never)] private string lineJoinField; [EditorBrowsable(EditorBrowsableState.Never)] private string lineMiterLimitField; [EditorBrowsable(EditorBrowsableState.Never)] private ExtendedDataType extendedData1Field; private static System.Xml.Serialization.XmlSerializer serializer; public Path() { /* this.lineWeightField = "0.0"; this.lineWeightScalableField = "true"; this.lineCapField = "\'Round\'"; this.lineJoinField = "\'Round\'"; this.lineMiterLimitField = "5.0"; */ } public string Geometry { get { return this.geometryField; } set { if ((this.geometryField != null)) { if ((geometryField.Equals(value) != true)) { this.geometryField = value; this.OnPropertyChanged("Geometry"); } } else { this.geometryField = value; this.OnPropertyChanged("Geometry"); } } } public string FillColor { get { return this.fillColorField; } set { if ((this.fillColorField != null)) { if ((fillColorField.Equals(value) != true)) { this.fillColorField = value; this.OnPropertyChanged("FillColor"); } } else { this.fillColorField = value; this.OnPropertyChanged("FillColor"); } } } public string LineColor { get { return this.lineColorField; } set { if ((this.lineColorField != null)) { if ((lineColorField.Equals(value) != true)) { this.lineColorField = value; this.OnPropertyChanged("LineColor"); } } else { this.lineColorField = value; this.OnPropertyChanged("LineColor"); } } } //[System.ComponentModel.DefaultValueAttribute("0.0")] public string LineWeight { get { return this.lineWeightField; } set { if ((this.lineWeightField != null)) { if ((lineWeightField.Equals(value) != true)) { this.lineWeightField = value; this.OnPropertyChanged("LineWeight"); } } else { this.lineWeightField = value; this.OnPropertyChanged("LineWeight"); } } } //[System.ComponentModel.DefaultValueAttribute("true")] public string LineWeightScalable { get { return this.lineWeightScalableField; } set { if ((this.lineWeightScalableField != null)) { if ((lineWeightScalableField.Equals(value) != true)) { this.lineWeightScalableField = value; this.OnPropertyChanged("LineWeightScalable"); } } else { this.lineWeightScalableField = value; this.OnPropertyChanged("LineWeightScalable"); } } } //[System.ComponentModel.DefaultValueAttribute("\'Round\'")] public string LineCap { get { return this.lineCapField; } set { if ((this.lineCapField != null)) { if ((lineCapField.Equals(value) != true)) { this.lineCapField = value; this.OnPropertyChanged("LineCap"); } } else { this.lineCapField = value; this.OnPropertyChanged("LineCap"); } } } //[System.ComponentModel.DefaultValueAttribute("\'Round\'")] public string LineJoin { get { return this.lineJoinField; } set { if ((this.lineJoinField != null)) { if ((lineJoinField.Equals(value) != true)) { this.lineJoinField = value; this.OnPropertyChanged("LineJoin"); } } else { this.lineJoinField = value; this.OnPropertyChanged("LineJoin"); } } } //[System.ComponentModel.DefaultValueAttribute("5.0")] public string LineMiterLimit { get { return this.lineMiterLimitField; } set { if ((this.lineMiterLimitField != null)) { if ((lineMiterLimitField.Equals(value) != true)) { this.lineMiterLimitField = value; this.OnPropertyChanged("LineMiterLimit"); } } else { this.lineMiterLimitField = value; this.OnPropertyChanged("LineMiterLimit"); } } } public ExtendedDataType ExtendedData1 { get { return this.extendedData1Field; } set { if ((this.extendedData1Field != null)) { if ((extendedData1Field.Equals(value) != true)) { this.extendedData1Field = value; this.OnPropertyChanged("ExtendedData1"); } } else { this.extendedData1Field = value; this.OnPropertyChanged("ExtendedData1"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(Path)); } return serializer; } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; public virtual void OnPropertyChanged(string info) { System.ComponentModel.PropertyChangedEventHandler handler = this.PropertyChanged; if ((handler != null)) { handler(this, new System.ComponentModel.PropertyChangedEventArgs(info)); } } #region Serialize/Deserialize /// /// Serializes current Path object into an XML document /// /// string XML value public virtual string Serialize() { System.IO.StreamReader streamReader = null; System.IO.MemoryStream memoryStream = null; try { memoryStream = new System.IO.MemoryStream(); Serializer.Serialize(memoryStream, this); memoryStream.Seek(0, System.IO.SeekOrigin.Begin); streamReader = new System.IO.StreamReader(memoryStream); return streamReader.ReadToEnd(); } finally { if ((streamReader != null)) { streamReader.Dispose(); } if ((memoryStream != null)) { memoryStream.Dispose(); } } } /// /// Deserializes workflow markup into an Path object /// /// string workflow markup to deserialize /// Output Path object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out Path obj, out System.Exception exception) { exception = null; obj = default(Path); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out Path obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static Path Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((Path)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current Path object into file /// /// full path of outupt xml file /// output Exception value if failed /// true if can serialize and save into file; otherwise, false public virtual bool SaveToFile(string fileName, out System.Exception exception) { exception = null; try { SaveToFile(fileName); return true; } catch (System.Exception e) { exception = e; return false; } } public virtual void SaveToFile(string fileName) { System.IO.StreamWriter streamWriter = null; try { string xmlString = Serialize(); System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName); streamWriter = xmlFile.CreateText(); streamWriter.WriteLine(xmlString); streamWriter.Close(); } finally { if ((streamWriter != null)) { streamWriter.Dispose(); } } } /// /// Deserializes xml markup from file into an Path object /// /// string xml file to load and deserialize /// Output Path object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out Path obj, out System.Exception exception) { exception = null; obj = default(Path); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out Path obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static Path LoadFromFile(string fileName) { System.IO.FileStream file = null; System.IO.StreamReader sr = null; try { file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read); sr = new System.IO.StreamReader(file); string xmlString = sr.ReadToEnd(); sr.Close(); file.Close(); return Deserialize(xmlString); } finally { if ((file != null)) { file.Dispose(); } if ((sr != null)) { sr.Dispose(); } } } #endregion #region Clone method /// /// Create a clone of this Path object /// public virtual Path Clone() { return ((Path)(this.MemberwiseClone())); } #endregion } [System.Xml.Serialization.XmlIncludeAttribute(typeof(Text))] [System.Xml.Serialization.XmlIncludeAttribute(typeof(Image))] [System.Xml.Serialization.XmlIncludeAttribute(typeof(Path))] [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=true)] public partial class GraphicBase : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private string resizeControlField; private static System.Xml.Serialization.XmlSerializer serializer; public GraphicBase() { //this.resizeControlField = "\'ResizeNone\'"; } //[System.ComponentModel.DefaultValueAttribute("\'ResizeNone\'")] public string ResizeControl { get { return this.resizeControlField; } set { if ((this.resizeControlField != null)) { if ((resizeControlField.Equals(value) != true)) { this.resizeControlField = value; this.OnPropertyChanged("ResizeControl"); } } else { this.resizeControlField = value; this.OnPropertyChanged("ResizeControl"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(GraphicBase)); } return serializer; } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; public virtual void OnPropertyChanged(string info) { System.ComponentModel.PropertyChangedEventHandler handler = this.PropertyChanged; if ((handler != null)) { handler(this, new System.ComponentModel.PropertyChangedEventArgs(info)); } } #region Serialize/Deserialize /// /// Serializes current GraphicBase object into an XML document /// /// string XML value public virtual string Serialize() { System.IO.StreamReader streamReader = null; System.IO.MemoryStream memoryStream = null; try { memoryStream = new System.IO.MemoryStream(); Serializer.Serialize(memoryStream, this); memoryStream.Seek(0, System.IO.SeekOrigin.Begin); streamReader = new System.IO.StreamReader(memoryStream); return streamReader.ReadToEnd(); } finally { if ((streamReader != null)) { streamReader.Dispose(); } if ((memoryStream != null)) { memoryStream.Dispose(); } } } /// /// Deserializes workflow markup into an GraphicBase object /// /// string workflow markup to deserialize /// Output GraphicBase object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out GraphicBase obj, out System.Exception exception) { exception = null; obj = default(GraphicBase); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out GraphicBase obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static GraphicBase Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((GraphicBase)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current GraphicBase object into file /// /// full path of outupt xml file /// output Exception value if failed /// true if can serialize and save into file; otherwise, false public virtual bool SaveToFile(string fileName, out System.Exception exception) { exception = null; try { SaveToFile(fileName); return true; } catch (System.Exception e) { exception = e; return false; } } public virtual void SaveToFile(string fileName) { System.IO.StreamWriter streamWriter = null; try { string xmlString = Serialize(); System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName); streamWriter = xmlFile.CreateText(); streamWriter.WriteLine(xmlString); streamWriter.Close(); } finally { if ((streamWriter != null)) { streamWriter.Dispose(); } } } /// /// Deserializes xml markup from file into an GraphicBase object /// /// string xml file to load and deserialize /// Output GraphicBase object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out GraphicBase obj, out System.Exception exception) { exception = null; obj = default(GraphicBase); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out GraphicBase obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static GraphicBase LoadFromFile(string fileName) { System.IO.FileStream file = null; System.IO.StreamReader sr = null; try { file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read); sr = new System.IO.StreamReader(file); string xmlString = sr.ReadToEnd(); sr.Close(); file.Close(); return Deserialize(xmlString); } finally { if ((file != null)) { file.Dispose(); } if ((sr != null)) { sr.Dispose(); } } } #endregion #region Clone method /// /// Create a clone of this GraphicBase object /// public virtual GraphicBase Clone() { return ((GraphicBase)(this.MemberwiseClone())); } #endregion } [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=true)] public partial class Text : GraphicBase, System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private string contentField; [EditorBrowsable(EditorBrowsableState.Never)] private string fontNameField; [EditorBrowsable(EditorBrowsableState.Never)] private string boldField; [EditorBrowsable(EditorBrowsableState.Never)] private string italicField; [EditorBrowsable(EditorBrowsableState.Never)] private string underlinedField; [EditorBrowsable(EditorBrowsableState.Never)] private string overlinedField; [EditorBrowsable(EditorBrowsableState.Never)] private string obliqueAngleField; [EditorBrowsable(EditorBrowsableState.Never)] private string trackSpacingField; [EditorBrowsable(EditorBrowsableState.Never)] private string heightField; [EditorBrowsable(EditorBrowsableState.Never)] private string heightScalableField; [EditorBrowsable(EditorBrowsableState.Never)] private string angleField; [EditorBrowsable(EditorBrowsableState.Never)] private string positionXField; [EditorBrowsable(EditorBrowsableState.Never)] private string positionYField; [EditorBrowsable(EditorBrowsableState.Never)] private string horizontalAlignmentField; [EditorBrowsable(EditorBrowsableState.Never)] private string verticalAlignmentField; [EditorBrowsable(EditorBrowsableState.Never)] private string justificationField; [EditorBrowsable(EditorBrowsableState.Never)] private string lineSpacingField; [EditorBrowsable(EditorBrowsableState.Never)] private string textColorField; [EditorBrowsable(EditorBrowsableState.Never)] private string ghostColorField; [EditorBrowsable(EditorBrowsableState.Never)] private TextFrame frameField; [EditorBrowsable(EditorBrowsableState.Never)] private string markupField; [EditorBrowsable(EditorBrowsableState.Never)] private ExtendedDataType extendedData1Field; private static System.Xml.Serialization.XmlSerializer serializer; public Text() { /* this.fontNameField = "\'Arial\'"; this.boldField = "false"; this.italicField = "false"; this.underlinedField = "false"; this.overlinedField = "false"; this.obliqueAngleField = "0.0"; this.trackSpacingField = "1.0"; this.heightField = "4.0"; this.heightScalableField = "true"; this.angleField = "0.0"; this.positionXField = "0.0"; this.positionYField = "0.0"; this.horizontalAlignmentField = "\'Center\'"; this.verticalAlignmentField = "\'Halfline\'"; this.justificationField = "\'FromAlignment\'"; this.lineSpacingField = "1.05"; this.textColorField = "ff000000"; this.markupField = "\'Plain\'"; */ } public string Content { get { return this.contentField; } set { if ((this.contentField != null)) { if ((contentField.Equals(value) != true)) { this.contentField = value; this.OnPropertyChanged("Content"); } } else { this.contentField = value; this.OnPropertyChanged("Content"); } } } public string FontName { get { return this.fontNameField; } set { if ((this.fontNameField != null)) { if ((fontNameField.Equals(value) != true)) { this.fontNameField = value; this.OnPropertyChanged("FontName"); } } else { this.fontNameField = value; this.OnPropertyChanged("FontName"); } } } //[System.ComponentModel.DefaultValueAttribute("false")] public string Bold { get { return this.boldField; } set { if ((this.boldField != null)) { if ((boldField.Equals(value) != true)) { this.boldField = value; this.OnPropertyChanged("Bold"); } } else { this.boldField = value; this.OnPropertyChanged("Bold"); } } } //[System.ComponentModel.DefaultValueAttribute("false")] public string Italic { get { return this.italicField; } set { if ((this.italicField != null)) { if ((italicField.Equals(value) != true)) { this.italicField = value; this.OnPropertyChanged("Italic"); } } else { this.italicField = value; this.OnPropertyChanged("Italic"); } } } //[System.ComponentModel.DefaultValueAttribute("false")] public string Underlined { get { return this.underlinedField; } set { if ((this.underlinedField != null)) { if ((underlinedField.Equals(value) != true)) { this.underlinedField = value; this.OnPropertyChanged("Underlined"); } } else { this.underlinedField = value; this.OnPropertyChanged("Underlined"); } } } //[System.ComponentModel.DefaultValueAttribute("false")] public string Overlined { get { return this.overlinedField; } set { if ((this.overlinedField != null)) { if ((overlinedField.Equals(value) != true)) { this.overlinedField = value; this.OnPropertyChanged("Overlined"); } } else { this.overlinedField = value; this.OnPropertyChanged("Overlined"); } } } //[System.ComponentModel.DefaultValueAttribute("0.0")] public string ObliqueAngle { get { return this.obliqueAngleField; } set { if ((this.obliqueAngleField != null)) { if ((obliqueAngleField.Equals(value) != true)) { this.obliqueAngleField = value; this.OnPropertyChanged("ObliqueAngle"); } } else { this.obliqueAngleField = value; this.OnPropertyChanged("ObliqueAngle"); } } } //[System.ComponentModel.DefaultValueAttribute("1.0")] public string TrackSpacing { get { return this.trackSpacingField; } set { if ((this.trackSpacingField != null)) { if ((trackSpacingField.Equals(value) != true)) { this.trackSpacingField = value; this.OnPropertyChanged("TrackSpacing"); } } else { this.trackSpacingField = value; this.OnPropertyChanged("TrackSpacing"); } } } //[System.ComponentModel.DefaultValueAttribute("4.0")] public string Height { get { return this.heightField; } set { if ((this.heightField != null)) { if ((heightField.Equals(value) != true)) { this.heightField = value; this.OnPropertyChanged("Height"); } } else { this.heightField = value; this.OnPropertyChanged("Height"); } } } //[System.ComponentModel.DefaultValueAttribute("true")] public string HeightScalable { get { return this.heightScalableField; } set { if ((this.heightScalableField != null)) { if ((heightScalableField.Equals(value) != true)) { this.heightScalableField = value; this.OnPropertyChanged("HeightScalable"); } } else { this.heightScalableField = value; this.OnPropertyChanged("HeightScalable"); } } } //[System.ComponentModel.DefaultValueAttribute("0.0")] public string Angle { get { return this.angleField; } set { if ((this.angleField != null)) { if ((angleField.Equals(value) != true)) { this.angleField = value; this.OnPropertyChanged("Angle"); } } else { this.angleField = value; this.OnPropertyChanged("Angle"); } } } //[System.ComponentModel.DefaultValueAttribute("0.0")] public string PositionX { get { return this.positionXField; } set { if ((this.positionXField != null)) { if ((positionXField.Equals(value) != true)) { this.positionXField = value; this.OnPropertyChanged("PositionX"); } } else { this.positionXField = value; this.OnPropertyChanged("PositionX"); } } } //[System.ComponentModel.DefaultValueAttribute("0.0")] public string PositionY { get { return this.positionYField; } set { if ((this.positionYField != null)) { if ((positionYField.Equals(value) != true)) { this.positionYField = value; this.OnPropertyChanged("PositionY"); } } else { this.positionYField = value; this.OnPropertyChanged("PositionY"); } } } //[System.ComponentModel.DefaultValueAttribute("\'Center\'")] public string HorizontalAlignment { get { return this.horizontalAlignmentField; } set { if ((this.horizontalAlignmentField != null)) { if ((horizontalAlignmentField.Equals(value) != true)) { this.horizontalAlignmentField = value; this.OnPropertyChanged("HorizontalAlignment"); } } else { this.horizontalAlignmentField = value; this.OnPropertyChanged("HorizontalAlignment"); } } } //[System.ComponentModel.DefaultValueAttribute("\'Halfline\'")] public string VerticalAlignment { get { return this.verticalAlignmentField; } set { if ((this.verticalAlignmentField != null)) { if ((verticalAlignmentField.Equals(value) != true)) { this.verticalAlignmentField = value; this.OnPropertyChanged("VerticalAlignment"); } } else { this.verticalAlignmentField = value; this.OnPropertyChanged("VerticalAlignment"); } } } //[System.ComponentModel.DefaultValueAttribute("\'FromAlignment\'")] public string Justification { get { return this.justificationField; } set { if ((this.justificationField != null)) { if ((justificationField.Equals(value) != true)) { this.justificationField = value; this.OnPropertyChanged("Justification"); } } else { this.justificationField = value; this.OnPropertyChanged("Justification"); } } } //[System.ComponentModel.DefaultValueAttribute("1.05")] public string LineSpacing { get { return this.lineSpacingField; } set { if ((this.lineSpacingField != null)) { if ((lineSpacingField.Equals(value) != true)) { this.lineSpacingField = value; this.OnPropertyChanged("LineSpacing"); } } else { this.lineSpacingField = value; this.OnPropertyChanged("LineSpacing"); } } } //[System.ComponentModel.DefaultValueAttribute("ff000000")] public string TextColor { get { return this.textColorField; } set { if ((this.textColorField != null)) { if ((textColorField.Equals(value) != true)) { this.textColorField = value; this.OnPropertyChanged("TextColor"); } } else { this.textColorField = value; this.OnPropertyChanged("TextColor"); } } } public string GhostColor { get { return this.ghostColorField; } set { if ((this.ghostColorField != null)) { if ((ghostColorField.Equals(value) != true)) { this.ghostColorField = value; this.OnPropertyChanged("GhostColor"); } } else { this.ghostColorField = value; this.OnPropertyChanged("GhostColor"); } } } public TextFrame Frame { get { return this.frameField; } set { if ((this.frameField != null)) { if ((frameField.Equals(value) != true)) { this.frameField = value; this.OnPropertyChanged("Frame"); } } else { this.frameField = value; this.OnPropertyChanged("Frame"); } } } //[System.ComponentModel.DefaultValueAttribute("\'Plain\'")] public string Markup { get { return this.markupField; } set { if ((this.markupField != null)) { if ((markupField.Equals(value) != true)) { this.markupField = value; this.OnPropertyChanged("Markup"); } } else { this.markupField = value; this.OnPropertyChanged("Markup"); } } } public ExtendedDataType ExtendedData1 { get { return this.extendedData1Field; } set { if ((this.extendedData1Field != null)) { if ((extendedData1Field.Equals(value) != true)) { this.extendedData1Field = value; this.OnPropertyChanged("ExtendedData1"); } } else { this.extendedData1Field = value; this.OnPropertyChanged("ExtendedData1"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(Text)); } return serializer; } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; public virtual void OnPropertyChanged(string info) { System.ComponentModel.PropertyChangedEventHandler handler = this.PropertyChanged; if ((handler != null)) { handler(this, new System.ComponentModel.PropertyChangedEventArgs(info)); } } #region Serialize/Deserialize /// /// Serializes current Text object into an XML document /// /// string XML value public virtual string Serialize() { System.IO.StreamReader streamReader = null; System.IO.MemoryStream memoryStream = null; try { memoryStream = new System.IO.MemoryStream(); Serializer.Serialize(memoryStream, this); memoryStream.Seek(0, System.IO.SeekOrigin.Begin); streamReader = new System.IO.StreamReader(memoryStream); return streamReader.ReadToEnd(); } finally { if ((streamReader != null)) { streamReader.Dispose(); } if ((memoryStream != null)) { memoryStream.Dispose(); } } } /// /// Deserializes workflow markup into an Text object /// /// string workflow markup to deserialize /// Output Text object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out Text obj, out System.Exception exception) { exception = null; obj = default(Text); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out Text obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static Text Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((Text)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current Text object into file /// /// full path of outupt xml file /// output Exception value if failed /// true if can serialize and save into file; otherwise, false public virtual bool SaveToFile(string fileName, out System.Exception exception) { exception = null; try { SaveToFile(fileName); return true; } catch (System.Exception e) { exception = e; return false; } } public virtual void SaveToFile(string fileName) { System.IO.StreamWriter streamWriter = null; try { string xmlString = Serialize(); System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName); streamWriter = xmlFile.CreateText(); streamWriter.WriteLine(xmlString); streamWriter.Close(); } finally { if ((streamWriter != null)) { streamWriter.Dispose(); } } } /// /// Deserializes xml markup from file into an Text object /// /// string xml file to load and deserialize /// Output Text object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out Text obj, out System.Exception exception) { exception = null; obj = default(Text); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out Text obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static Text LoadFromFile(string fileName) { System.IO.FileStream file = null; System.IO.StreamReader sr = null; try { file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read); sr = new System.IO.StreamReader(file); string xmlString = sr.ReadToEnd(); sr.Close(); file.Close(); return Deserialize(xmlString); } finally { if ((file != null)) { file.Dispose(); } if ((sr != null)) { sr.Dispose(); } } } #endregion #region Clone method /// /// Create a clone of this Text object /// public virtual Text Clone() { return ((Text)(this.MemberwiseClone())); } #endregion } [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=true)] public partial class TextFrame : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private string lineColorField; [EditorBrowsable(EditorBrowsableState.Never)] private string fillColorField; [EditorBrowsable(EditorBrowsableState.Never)] private string offsetXField; [EditorBrowsable(EditorBrowsableState.Never)] private string offsetYField; [EditorBrowsable(EditorBrowsableState.Never)] private ExtendedDataType extendedData1Field; private static System.Xml.Serialization.XmlSerializer serializer; public TextFrame() { this.offsetXField = "0.0"; this.offsetYField = "0.0"; } public string LineColor { get { return this.lineColorField; } set { if ((this.lineColorField != null)) { if ((lineColorField.Equals(value) != true)) { this.lineColorField = value; this.OnPropertyChanged("LineColor"); } } else { this.lineColorField = value; this.OnPropertyChanged("LineColor"); } } } public string FillColor { get { return this.fillColorField; } set { if ((this.fillColorField != null)) { if ((fillColorField.Equals(value) != true)) { this.fillColorField = value; this.OnPropertyChanged("FillColor"); } } else { this.fillColorField = value; this.OnPropertyChanged("FillColor"); } } } //[System.ComponentModel.DefaultValueAttribute("0.0")] public string OffsetX { get { return this.offsetXField; } set { if ((this.offsetXField != null)) { if ((offsetXField.Equals(value) != true)) { this.offsetXField = value; this.OnPropertyChanged("OffsetX"); } } else { this.offsetXField = value; this.OnPropertyChanged("OffsetX"); } } } //[System.ComponentModel.DefaultValueAttribute("0.0")] public string OffsetY { get { return this.offsetYField; } set { if ((this.offsetYField != null)) { if ((offsetYField.Equals(value) != true)) { this.offsetYField = value; this.OnPropertyChanged("OffsetY"); } } else { this.offsetYField = value; this.OnPropertyChanged("OffsetY"); } } } public ExtendedDataType ExtendedData1 { get { return this.extendedData1Field; } set { if ((this.extendedData1Field != null)) { if ((extendedData1Field.Equals(value) != true)) { this.extendedData1Field = value; this.OnPropertyChanged("ExtendedData1"); } } else { this.extendedData1Field = value; this.OnPropertyChanged("ExtendedData1"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(TextFrame)); } return serializer; } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; public virtual void OnPropertyChanged(string info) { System.ComponentModel.PropertyChangedEventHandler handler = this.PropertyChanged; if ((handler != null)) { handler(this, new System.ComponentModel.PropertyChangedEventArgs(info)); } } #region Serialize/Deserialize /// /// Serializes current TextFrame object into an XML document /// /// string XML value public virtual string Serialize() { System.IO.StreamReader streamReader = null; System.IO.MemoryStream memoryStream = null; try { memoryStream = new System.IO.MemoryStream(); Serializer.Serialize(memoryStream, this); memoryStream.Seek(0, System.IO.SeekOrigin.Begin); streamReader = new System.IO.StreamReader(memoryStream); return streamReader.ReadToEnd(); } finally { if ((streamReader != null)) { streamReader.Dispose(); } if ((memoryStream != null)) { memoryStream.Dispose(); } } } /// /// Deserializes workflow markup into an TextFrame object /// /// string workflow markup to deserialize /// Output TextFrame object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out TextFrame obj, out System.Exception exception) { exception = null; obj = default(TextFrame); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out TextFrame obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static TextFrame Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((TextFrame)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current TextFrame object into file /// /// full path of outupt xml file /// output Exception value if failed /// true if can serialize and save into file; otherwise, false public virtual bool SaveToFile(string fileName, out System.Exception exception) { exception = null; try { SaveToFile(fileName); return true; } catch (System.Exception e) { exception = e; return false; } } public virtual void SaveToFile(string fileName) { System.IO.StreamWriter streamWriter = null; try { string xmlString = Serialize(); System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName); streamWriter = xmlFile.CreateText(); streamWriter.WriteLine(xmlString); streamWriter.Close(); } finally { if ((streamWriter != null)) { streamWriter.Dispose(); } } } /// /// Deserializes xml markup from file into an TextFrame object /// /// string xml file to load and deserialize /// Output TextFrame object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out TextFrame obj, out System.Exception exception) { exception = null; obj = default(TextFrame); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out TextFrame obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static TextFrame LoadFromFile(string fileName) { System.IO.FileStream file = null; System.IO.StreamReader sr = null; try { file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read); sr = new System.IO.StreamReader(file); string xmlString = sr.ReadToEnd(); sr.Close(); file.Close(); return Deserialize(xmlString); } finally { if ((file != null)) { file.Dispose(); } if ((sr != null)) { sr.Dispose(); } } } #endregion #region Clone method /// /// Create a clone of this TextFrame object /// public virtual TextFrame Clone() { return ((TextFrame)(this.MemberwiseClone())); } #endregion } /// /// Specifies how the symbol is used in the context of point features. /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=true)] public partial class PointUsage : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private string angleControlField; [EditorBrowsable(EditorBrowsableState.Never)] private string angleField; [EditorBrowsable(EditorBrowsableState.Never)] private string originOffsetXField; [EditorBrowsable(EditorBrowsableState.Never)] private string originOffsetYField; [EditorBrowsable(EditorBrowsableState.Never)] private ExtendedDataType extendedData1Field; private static System.Xml.Serialization.XmlSerializer serializer; public PointUsage() { /* this.angleControlField = "\'FromAngle\'"; this.angleField = "0.0"; this.originOffsetXField = "0.0"; this.originOffsetYField = "0.0"; */ } /// /// Specifies how the symbol angle is defined. This must evaluate to one of: FromAngle (default) or FromGeometry. /// //[System.ComponentModel.DefaultValueAttribute("\'FromAngle\'")] public string AngleControl { get { return this.angleControlField; } set { if ((this.angleControlField != null)) { if ((angleControlField.Equals(value) != true)) { this.angleControlField = value; this.OnPropertyChanged("AngleControl"); } } else { this.angleControlField = value; this.OnPropertyChanged("AngleControl"); } } } /// /// Specifies the symbol angle, in degrees. If AngleControl evaluates to FromAngle then this specifies the absolute angle of the symbol. If AngleControl evaluates to FromGeometry then this specifies the symbol angle relative to the geometry. Defaults to 0. /// //[System.ComponentModel.DefaultValueAttribute("0.0")] public string Angle { get { return this.angleField; } set { if ((this.angleField != null)) { if ((angleField.Equals(value) != true)) { this.angleField = value; this.OnPropertyChanged("Angle"); } } else { this.angleField = value; this.OnPropertyChanged("Angle"); } } } /// /// Specifies the horizontal offset to apply to the symbol origin, in mm. This offset is applied before the symbol is scaled and rotated. Defaults to 0. /// //[System.ComponentModel.DefaultValueAttribute("0.0")] public string OriginOffsetX { get { return this.originOffsetXField; } set { if ((this.originOffsetXField != null)) { if ((originOffsetXField.Equals(value) != true)) { this.originOffsetXField = value; this.OnPropertyChanged("OriginOffsetX"); } } else { this.originOffsetXField = value; this.OnPropertyChanged("OriginOffsetX"); } } } /// /// Specifies the vertical offset to apply to the symbol origin, in mm. This offset is applied before the symbol is scaled and rotated. Defaults to 0. /// //[System.ComponentModel.DefaultValueAttribute("0.0")] public string OriginOffsetY { get { return this.originOffsetYField; } set { if ((this.originOffsetYField != null)) { if ((originOffsetYField.Equals(value) != true)) { this.originOffsetYField = value; this.OnPropertyChanged("OriginOffsetY"); } } else { this.originOffsetYField = value; this.OnPropertyChanged("OriginOffsetY"); } } } public ExtendedDataType ExtendedData1 { get { return this.extendedData1Field; } set { if ((this.extendedData1Field != null)) { if ((extendedData1Field.Equals(value) != true)) { this.extendedData1Field = value; this.OnPropertyChanged("ExtendedData1"); } } else { this.extendedData1Field = value; this.OnPropertyChanged("ExtendedData1"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(PointUsage)); } return serializer; } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; public virtual void OnPropertyChanged(string info) { System.ComponentModel.PropertyChangedEventHandler handler = this.PropertyChanged; if ((handler != null)) { handler(this, new System.ComponentModel.PropertyChangedEventArgs(info)); } } #region Serialize/Deserialize /// /// Serializes current PointUsage object into an XML document /// /// string XML value public virtual string Serialize() { System.IO.StreamReader streamReader = null; System.IO.MemoryStream memoryStream = null; try { memoryStream = new System.IO.MemoryStream(); Serializer.Serialize(memoryStream, this); memoryStream.Seek(0, System.IO.SeekOrigin.Begin); streamReader = new System.IO.StreamReader(memoryStream); return streamReader.ReadToEnd(); } finally { if ((streamReader != null)) { streamReader.Dispose(); } if ((memoryStream != null)) { memoryStream.Dispose(); } } } /// /// Deserializes workflow markup into an PointUsage object /// /// string workflow markup to deserialize /// Output PointUsage object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out PointUsage obj, out System.Exception exception) { exception = null; obj = default(PointUsage); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out PointUsage obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static PointUsage Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((PointUsage)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current PointUsage object into file /// /// full path of outupt xml file /// output Exception value if failed /// true if can serialize and save into file; otherwise, false public virtual bool SaveToFile(string fileName, out System.Exception exception) { exception = null; try { SaveToFile(fileName); return true; } catch (System.Exception e) { exception = e; return false; } } public virtual void SaveToFile(string fileName) { System.IO.StreamWriter streamWriter = null; try { string xmlString = Serialize(); System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName); streamWriter = xmlFile.CreateText(); streamWriter.WriteLine(xmlString); streamWriter.Close(); } finally { if ((streamWriter != null)) { streamWriter.Dispose(); } } } /// /// Deserializes xml markup from file into an PointUsage object /// /// string xml file to load and deserialize /// Output PointUsage object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out PointUsage obj, out System.Exception exception) { exception = null; obj = default(PointUsage); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out PointUsage obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static PointUsage LoadFromFile(string fileName) { System.IO.FileStream file = null; System.IO.StreamReader sr = null; try { file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read); sr = new System.IO.StreamReader(file); string xmlString = sr.ReadToEnd(); sr.Close(); file.Close(); return Deserialize(xmlString); } finally { if ((file != null)) { file.Dispose(); } if ((sr != null)) { sr.Dispose(); } } } #endregion #region Clone method /// /// Create a clone of this PointUsage object /// public virtual PointUsage Clone() { return ((PointUsage)(this.MemberwiseClone())); } #endregion } /// /// The optional box used to resize and reposition select graphic elements. The graphical extent of all elements with ResizeControl set to AddToResizeBox will be added to this box, potentially causing it to grow in size. Any change in size causes all elements with ResizeControl set to AdjustToResizeBox to be proportionally resized and repositioned. /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=true)] public partial class ResizeBox : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private string sizeXField; [EditorBrowsable(EditorBrowsableState.Never)] private string sizeYField; [EditorBrowsable(EditorBrowsableState.Never)] private string positionXField; [EditorBrowsable(EditorBrowsableState.Never)] private string positionYField; [EditorBrowsable(EditorBrowsableState.Never)] private string growControlField; [EditorBrowsable(EditorBrowsableState.Never)] private ExtendedDataType extendedData1Field; private static System.Xml.Serialization.XmlSerializer serializer; public ResizeBox() { this.sizeXField = "1.0"; this.sizeYField = "1.0"; this.positionXField = "0.0"; this.positionYField = "0.0"; this.growControlField = "\'GrowInXYMaintainAspect\'"; } /// /// The initial width of the resize box, in mm. This must be greater than or equal to zero. /// public string SizeX { get { return this.sizeXField; } set { if ((this.sizeXField != null)) { if ((sizeXField.Equals(value) != true)) { this.sizeXField = value; this.OnPropertyChanged("SizeX"); } } else { this.sizeXField = value; this.OnPropertyChanged("SizeX"); } } } /// /// The initial height of the resize box, in mm. This must be greater than or equal to zero. /// public string SizeY { get { return this.sizeYField; } set { if ((this.sizeYField != null)) { if ((sizeYField.Equals(value) != true)) { this.sizeYField = value; this.OnPropertyChanged("SizeY"); } } else { this.sizeYField = value; this.OnPropertyChanged("SizeY"); } } } /// /// The initial x-coordinate of the resize box center, in mm. /// public string PositionX { get { return this.positionXField; } set { if ((this.positionXField != null)) { if ((positionXField.Equals(value) != true)) { this.positionXField = value; this.OnPropertyChanged("PositionX"); } } else { this.positionXField = value; this.OnPropertyChanged("PositionX"); } } } /// /// The initial y-coordinate of the resize box center, in mm. /// public string PositionY { get { return this.positionYField; } set { if ((this.positionYField != null)) { if ((positionYField.Equals(value) != true)) { this.positionYField = value; this.OnPropertyChanged("PositionY"); } } else { this.positionYField = value; this.OnPropertyChanged("PositionY"); } } } /// /// Specifies how the resize box grows in size. This must evaluate to one of: GrowInX, GrowInY, GrowInXY, or GrowInXYMaintainAspect (default). /// public string GrowControl { get { return this.growControlField; } set { if ((this.growControlField != null)) { if ((growControlField.Equals(value) != true)) { this.growControlField = value; this.OnPropertyChanged("GrowControl"); } } else { this.growControlField = value; this.OnPropertyChanged("GrowControl"); } } } public ExtendedDataType ExtendedData1 { get { return this.extendedData1Field; } set { if ((this.extendedData1Field != null)) { if ((extendedData1Field.Equals(value) != true)) { this.extendedData1Field = value; this.OnPropertyChanged("ExtendedData1"); } } else { this.extendedData1Field = value; this.OnPropertyChanged("ExtendedData1"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(ResizeBox)); } return serializer; } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; public virtual void OnPropertyChanged(string info) { System.ComponentModel.PropertyChangedEventHandler handler = this.PropertyChanged; if ((handler != null)) { handler(this, new System.ComponentModel.PropertyChangedEventArgs(info)); } } #region Serialize/Deserialize /// /// Serializes current ResizeBox object into an XML document /// /// string XML value public virtual string Serialize() { System.IO.StreamReader streamReader = null; System.IO.MemoryStream memoryStream = null; try { memoryStream = new System.IO.MemoryStream(); Serializer.Serialize(memoryStream, this); memoryStream.Seek(0, System.IO.SeekOrigin.Begin); streamReader = new System.IO.StreamReader(memoryStream); return streamReader.ReadToEnd(); } finally { if ((streamReader != null)) { streamReader.Dispose(); } if ((memoryStream != null)) { memoryStream.Dispose(); } } } /// /// Deserializes workflow markup into an ResizeBox object /// /// string workflow markup to deserialize /// Output ResizeBox object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out ResizeBox obj, out System.Exception exception) { exception = null; obj = default(ResizeBox); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out ResizeBox obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static ResizeBox Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((ResizeBox)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current ResizeBox object into file /// /// full path of outupt xml file /// output Exception value if failed /// true if can serialize and save into file; otherwise, false public virtual bool SaveToFile(string fileName, out System.Exception exception) { exception = null; try { SaveToFile(fileName); return true; } catch (System.Exception e) { exception = e; return false; } } public virtual void SaveToFile(string fileName) { System.IO.StreamWriter streamWriter = null; try { string xmlString = Serialize(); System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName); streamWriter = xmlFile.CreateText(); streamWriter.WriteLine(xmlString); streamWriter.Close(); } finally { if ((streamWriter != null)) { streamWriter.Dispose(); } } } /// /// Deserializes xml markup from file into an ResizeBox object /// /// string xml file to load and deserialize /// Output ResizeBox object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out ResizeBox obj, out System.Exception exception) { exception = null; obj = default(ResizeBox); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out ResizeBox obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static ResizeBox LoadFromFile(string fileName) { System.IO.FileStream file = null; System.IO.StreamReader sr = null; try { file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read); sr = new System.IO.StreamReader(file); string xmlString = sr.ReadToEnd(); sr.Close(); file.Close(); return Deserialize(xmlString); } finally { if ((file != null)) { file.Dispose(); } if ((sr != null)) { sr.Dispose(); } } } #endregion #region Clone method /// /// Create a clone of this ResizeBox object /// public virtual ResizeBox Clone() { return ((ResizeBox)(this.MemberwiseClone())); } #endregion } [System.Xml.Serialization.XmlIncludeAttribute(typeof(CompoundSymbolDefinition))] [System.Xml.Serialization.XmlIncludeAttribute(typeof(SimpleSymbolDefinition))] [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=true)] public partial class SymbolDefinitionBase : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private string nameField; [EditorBrowsable(EditorBrowsableState.Never)] private string descriptionField; private static System.Xml.Serialization.XmlSerializer serializer; public string Name { get { return this.nameField; } set { if ((this.nameField != null)) { if ((nameField.Equals(value) != true)) { this.nameField = value; this.OnPropertyChanged("Name"); } } else { this.nameField = value; this.OnPropertyChanged("Name"); } } } public string Description { get { return this.descriptionField; } set { if ((this.descriptionField != null)) { if ((descriptionField.Equals(value) != true)) { this.descriptionField = value; this.OnPropertyChanged("Description"); } } else { this.descriptionField = value; this.OnPropertyChanged("Description"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(SymbolDefinitionBase)); } return serializer; } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; public virtual void OnPropertyChanged(string info) { System.ComponentModel.PropertyChangedEventHandler handler = this.PropertyChanged; if ((handler != null)) { handler(this, new System.ComponentModel.PropertyChangedEventArgs(info)); } } #region Serialize/Deserialize /// /// Serializes current SymbolDefinitionBase object into an XML document /// /// string XML value public virtual string Serialize() { System.IO.StreamReader streamReader = null; System.IO.MemoryStream memoryStream = null; try { memoryStream = new System.IO.MemoryStream(); Serializer.Serialize(memoryStream, this); memoryStream.Seek(0, System.IO.SeekOrigin.Begin); streamReader = new System.IO.StreamReader(memoryStream); return streamReader.ReadToEnd(); } finally { if ((streamReader != null)) { streamReader.Dispose(); } if ((memoryStream != null)) { memoryStream.Dispose(); } } } /// /// Deserializes workflow markup into an SymbolDefinitionBase object /// /// string workflow markup to deserialize /// Output SymbolDefinitionBase object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out SymbolDefinitionBase obj, out System.Exception exception) { exception = null; obj = default(SymbolDefinitionBase); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out SymbolDefinitionBase obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static SymbolDefinitionBase Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((SymbolDefinitionBase)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current SymbolDefinitionBase object into file /// /// full path of outupt xml file /// output Exception value if failed /// true if can serialize and save into file; otherwise, false public virtual bool SaveToFile(string fileName, out System.Exception exception) { exception = null; try { SaveToFile(fileName); return true; } catch (System.Exception e) { exception = e; return false; } } public virtual void SaveToFile(string fileName) { System.IO.StreamWriter streamWriter = null; try { string xmlString = Serialize(); System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName); streamWriter = xmlFile.CreateText(); streamWriter.WriteLine(xmlString); streamWriter.Close(); } finally { if ((streamWriter != null)) { streamWriter.Dispose(); } } } /// /// Deserializes xml markup from file into an SymbolDefinitionBase object /// /// string xml file to load and deserialize /// Output SymbolDefinitionBase object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out SymbolDefinitionBase obj, out System.Exception exception) { exception = null; obj = default(SymbolDefinitionBase); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out SymbolDefinitionBase obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static SymbolDefinitionBase LoadFromFile(string fileName) { System.IO.FileStream file = null; System.IO.StreamReader sr = null; try { file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read); sr = new System.IO.StreamReader(file); string xmlString = sr.ReadToEnd(); sr.Close(); file.Close(); return Deserialize(xmlString); } finally { if ((file != null)) { file.Dispose(); } if ((sr != null)) { sr.Dispose(); } } } #endregion #region Clone method /// /// Create a clone of this SymbolDefinitionBase object /// public virtual SymbolDefinitionBase Clone() { return ((SymbolDefinitionBase)(this.MemberwiseClone())); } #endregion } /// /// A 2D compound symbol for stylization. /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=true)] public partial class CompoundSymbolDefinition : SymbolDefinitionBase, System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private BindingList simpleSymbolField; [EditorBrowsable(EditorBrowsableState.Never)] private ExtendedDataType extendedData1Field; [EditorBrowsable(EditorBrowsableState.Never)] private string versionField; public CompoundSymbolDefinition() { this.versionField = "1.1.0"; } [System.Xml.Serialization.XmlAttributeAttribute()] public string version { get { return this.versionField; } set { if ((this.versionField != null)) { if ((versionField.Equals(value) != true)) { this.versionField = value; this.OnPropertyChanged("version"); } } else { this.versionField = value; this.OnPropertyChanged("version"); } } } private static System.Xml.Serialization.XmlSerializer serializer; [System.Xml.Serialization.XmlElementAttribute("SimpleSymbol")] public BindingList SimpleSymbol { get { return this.simpleSymbolField; } set { if ((this.simpleSymbolField != null)) { if ((simpleSymbolField.Equals(value) != true)) { this.simpleSymbolField = value; this.OnPropertyChanged("SimpleSymbol"); } } else { this.simpleSymbolField = value; this.OnPropertyChanged("SimpleSymbol"); } } } public ExtendedDataType ExtendedData1 { get { return this.extendedData1Field; } set { if ((this.extendedData1Field != null)) { if ((extendedData1Field.Equals(value) != true)) { this.extendedData1Field = value; this.OnPropertyChanged("ExtendedData1"); } } else { this.extendedData1Field = value; this.OnPropertyChanged("ExtendedData1"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(CompoundSymbolDefinition)); } return serializer; } } //public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; //public virtual void OnPropertyChanged(string info) { // System.ComponentModel.PropertyChangedEventHandler handler = this.PropertyChanged; // if ((handler != null)) { // handler(this, new System.ComponentModel.PropertyChangedEventArgs(info)); // } //} #region Serialize/Deserialize /// /// Serializes current CompoundSymbolDefinition object into an XML document /// /// string XML value public virtual string Serialize() { System.IO.StreamReader streamReader = null; System.IO.MemoryStream memoryStream = null; try { memoryStream = new System.IO.MemoryStream(); Serializer.Serialize(memoryStream, this); memoryStream.Seek(0, System.IO.SeekOrigin.Begin); streamReader = new System.IO.StreamReader(memoryStream); return streamReader.ReadToEnd(); } finally { if ((streamReader != null)) { streamReader.Dispose(); } if ((memoryStream != null)) { memoryStream.Dispose(); } } } /// /// Deserializes workflow markup into an CompoundSymbolDefinition object /// /// string workflow markup to deserialize /// Output CompoundSymbolDefinition object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out CompoundSymbolDefinition obj, out System.Exception exception) { exception = null; obj = default(CompoundSymbolDefinition); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out CompoundSymbolDefinition obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static CompoundSymbolDefinition Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((CompoundSymbolDefinition)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current CompoundSymbolDefinition object into file /// /// full path of outupt xml file /// output Exception value if failed /// true if can serialize and save into file; otherwise, false public virtual bool SaveToFile(string fileName, out System.Exception exception) { exception = null; try { SaveToFile(fileName); return true; } catch (System.Exception e) { exception = e; return false; } } public virtual void SaveToFile(string fileName) { System.IO.StreamWriter streamWriter = null; try { string xmlString = Serialize(); System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName); streamWriter = xmlFile.CreateText(); streamWriter.WriteLine(xmlString); streamWriter.Close(); } finally { if ((streamWriter != null)) { streamWriter.Dispose(); } } } /// /// Deserializes xml markup from file into an CompoundSymbolDefinition object /// /// string xml file to load and deserialize /// Output CompoundSymbolDefinition object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out CompoundSymbolDefinition obj, out System.Exception exception) { exception = null; obj = default(CompoundSymbolDefinition); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out CompoundSymbolDefinition obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static CompoundSymbolDefinition LoadFromFile(string fileName) { System.IO.FileStream file = null; System.IO.StreamReader sr = null; try { file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read); sr = new System.IO.StreamReader(file); string xmlString = sr.ReadToEnd(); sr.Close(); file.Close(); return Deserialize(xmlString); } finally { if ((file != null)) { file.Dispose(); } if ((sr != null)) { sr.Dispose(); } } } #endregion #region Clone method /// /// Create a clone of this CompoundSymbolDefinition object /// public virtual CompoundSymbolDefinition Clone() { return ((CompoundSymbolDefinition)(this.MemberwiseClone())); } #endregion } /// /// The collection of graphic elements defining this symbol. /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=true)] public partial class Graphics : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private BindingList itemsField; private static System.Xml.Serialization.XmlSerializer serializer; [System.Xml.Serialization.XmlElementAttribute("Image", typeof(Image))] [System.Xml.Serialization.XmlElementAttribute("Path", typeof(Path))] [System.Xml.Serialization.XmlElementAttribute("Text", typeof(Text))] public BindingList Items { get { return this.itemsField; } set { if ((this.itemsField != null)) { if ((itemsField.Equals(value) != true)) { this.itemsField = value; this.OnPropertyChanged("Items"); } } else { this.itemsField = value; this.OnPropertyChanged("Items"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(Graphics)); } return serializer; } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; public virtual void OnPropertyChanged(string info) { System.ComponentModel.PropertyChangedEventHandler handler = this.PropertyChanged; if ((handler != null)) { handler(this, new System.ComponentModel.PropertyChangedEventArgs(info)); } } #region Serialize/Deserialize /// /// Serializes current Graphics object into an XML document /// /// string XML value public virtual string Serialize() { System.IO.StreamReader streamReader = null; System.IO.MemoryStream memoryStream = null; try { memoryStream = new System.IO.MemoryStream(); Serializer.Serialize(memoryStream, this); memoryStream.Seek(0, System.IO.SeekOrigin.Begin); streamReader = new System.IO.StreamReader(memoryStream); return streamReader.ReadToEnd(); } finally { if ((streamReader != null)) { streamReader.Dispose(); } if ((memoryStream != null)) { memoryStream.Dispose(); } } } /// /// Deserializes workflow markup into an Graphics object /// /// string workflow markup to deserialize /// Output Graphics object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out Graphics obj, out System.Exception exception) { exception = null; obj = default(Graphics); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out Graphics obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static Graphics Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((Graphics)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current Graphics object into file /// /// full path of outupt xml file /// output Exception value if failed /// true if can serialize and save into file; otherwise, false public virtual bool SaveToFile(string fileName, out System.Exception exception) { exception = null; try { SaveToFile(fileName); return true; } catch (System.Exception e) { exception = e; return false; } } public virtual void SaveToFile(string fileName) { System.IO.StreamWriter streamWriter = null; try { string xmlString = Serialize(); System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName); streamWriter = xmlFile.CreateText(); streamWriter.WriteLine(xmlString); streamWriter.Close(); } finally { if ((streamWriter != null)) { streamWriter.Dispose(); } } } /// /// Deserializes xml markup from file into an Graphics object /// /// string xml file to load and deserialize /// Output Graphics object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out Graphics obj, out System.Exception exception) { exception = null; obj = default(Graphics); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out Graphics obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static Graphics LoadFromFile(string fileName) { System.IO.FileStream file = null; System.IO.StreamReader sr = null; try { file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read); sr = new System.IO.StreamReader(file); string xmlString = sr.ReadToEnd(); sr.Close(); file.Close(); return Deserialize(xmlString); } finally { if ((file != null)) { file.Dispose(); } if ((sr != null)) { sr.Dispose(); } } } #endregion #region Clone method /// /// Create a clone of this Graphics object /// public virtual Graphics Clone() { return ((Graphics)(this.MemberwiseClone())); } #endregion } }