#pragma warning disable 1591, 0114, 0108 // ------------------------------------------------------------------------------ // // Generated by Xsd2Code. Version 3.3.0.33001 // OSGeo.MapGuide.ObjectModels.PrintLayoutBindingListCSharpTrueFalseTrueTrueTrueFalseTrueFalseNet20SerializeDeserializeSaveToFileLoadFromFileTrueFalseFalseFalseFalse // // ------------------------------------------------------------------------------ namespace OSGeo.MapGuide.ObjectModels.PrintLayout_1_0_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.PrintLayout; [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] [System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=false)] public partial class PrintLayout : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private PrintLayoutPageProperties pagePropertiesField; [EditorBrowsable(EditorBrowsableState.Never)] private PrintLayoutLayoutProperties layoutPropertiesField; [EditorBrowsable(EditorBrowsableState.Never)] private BindingList customLogosField; [EditorBrowsable(EditorBrowsableState.Never)] private BindingList customTextField; private static System.Xml.Serialization.XmlSerializer serializer; public PrintLayoutPageProperties PageProperties { get { return this.pagePropertiesField; } set { if ((this.pagePropertiesField != null)) { if ((pagePropertiesField.Equals(value) != true)) { this.pagePropertiesField = value; this.OnPropertyChanged("PageProperties"); } } else { this.pagePropertiesField = value; this.OnPropertyChanged("PageProperties"); } } } public PrintLayoutLayoutProperties LayoutProperties { get { return this.layoutPropertiesField; } set { if ((this.layoutPropertiesField != null)) { if ((layoutPropertiesField.Equals(value) != true)) { this.layoutPropertiesField = value; this.OnPropertyChanged("LayoutProperties"); } } else { this.layoutPropertiesField = value; this.OnPropertyChanged("LayoutProperties"); } } } [System.Xml.Serialization.XmlArrayItemAttribute("Logo", IsNullable=false)] public BindingList CustomLogos { get { return this.customLogosField; } set { if ((this.customLogosField != null)) { if ((customLogosField.Equals(value) != true)) { this.customLogosField = value; this.OnPropertyChanged("CustomLogos"); } } else { this.customLogosField = value; this.OnPropertyChanged("CustomLogos"); } } } [System.Xml.Serialization.XmlArrayItemAttribute("Text", IsNullable=false)] public BindingList CustomText { get { return this.customTextField; } set { if ((this.customTextField != null)) { if ((customTextField.Equals(value) != true)) { this.customTextField = value; this.OnPropertyChanged("CustomText"); } } else { this.customTextField = value; this.OnPropertyChanged("CustomText"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(PrintLayout)); } 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 PrintLayout 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 PrintLayout object /// /// string workflow markup to deserialize /// Output PrintLayout object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out PrintLayout obj, out System.Exception exception) { exception = null; obj = default(PrintLayout); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out PrintLayout obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static PrintLayout Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((PrintLayout)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current PrintLayout 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 PrintLayout object /// /// string xml file to load and deserialize /// Output PrintLayout object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out PrintLayout obj, out System.Exception exception) { exception = null; obj = default(PrintLayout); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out PrintLayout obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static PrintLayout 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 PrintLayout object /// public virtual PrintLayout Clone() { return ((PrintLayout)(this.MemberwiseClone())); } #endregion } [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] public partial class PrintLayoutPageProperties : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private PrintLayoutPagePropertiesBackgroundColor backgroundColorField; private static System.Xml.Serialization.XmlSerializer serializer; public PrintLayoutPagePropertiesBackgroundColor BackgroundColor { get { return this.backgroundColorField; } set { if ((this.backgroundColorField != null)) { if ((backgroundColorField.Equals(value) != true)) { this.backgroundColorField = value; this.OnPropertyChanged("BackgroundColor"); } } else { this.backgroundColorField = value; this.OnPropertyChanged("BackgroundColor"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(PrintLayoutPageProperties)); } 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 PrintLayoutPageProperties 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 PrintLayoutPageProperties object /// /// string workflow markup to deserialize /// Output PrintLayoutPageProperties object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out PrintLayoutPageProperties obj, out System.Exception exception) { exception = null; obj = default(PrintLayoutPageProperties); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out PrintLayoutPageProperties obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static PrintLayoutPageProperties Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((PrintLayoutPageProperties)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current PrintLayoutPageProperties 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 PrintLayoutPageProperties object /// /// string xml file to load and deserialize /// Output PrintLayoutPageProperties object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out PrintLayoutPageProperties obj, out System.Exception exception) { exception = null; obj = default(PrintLayoutPageProperties); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out PrintLayoutPageProperties obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static PrintLayoutPageProperties 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 PrintLayoutPageProperties object /// public virtual PrintLayoutPageProperties Clone() { return ((PrintLayoutPageProperties)(this.MemberwiseClone())); } #endregion } [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] public partial class PrintLayoutPagePropertiesBackgroundColor : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private string redField; [EditorBrowsable(EditorBrowsableState.Never)] private string blueField; [EditorBrowsable(EditorBrowsableState.Never)] private string greenField; private static System.Xml.Serialization.XmlSerializer serializer; [System.Xml.Serialization.XmlElementAttribute(DataType="integer")] public string Red { get { return this.redField; } set { if ((this.redField != null)) { if ((redField.Equals(value) != true)) { this.redField = value; this.OnPropertyChanged("Red"); } } else { this.redField = value; this.OnPropertyChanged("Red"); } } } [System.Xml.Serialization.XmlElementAttribute(DataType="integer")] public string Blue { get { return this.blueField; } set { if ((this.blueField != null)) { if ((blueField.Equals(value) != true)) { this.blueField = value; this.OnPropertyChanged("Blue"); } } else { this.blueField = value; this.OnPropertyChanged("Blue"); } } } [System.Xml.Serialization.XmlElementAttribute(DataType="integer")] public string Green { get { return this.greenField; } set { if ((this.greenField != null)) { if ((greenField.Equals(value) != true)) { this.greenField = value; this.OnPropertyChanged("Green"); } } else { this.greenField = value; this.OnPropertyChanged("Green"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(PrintLayoutPagePropertiesBackgroundColor)); } 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 PrintLayoutPagePropertiesBackgroundColor 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 PrintLayoutPagePropertiesBackgroundColor object /// /// string workflow markup to deserialize /// Output PrintLayoutPagePropertiesBackgroundColor object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out PrintLayoutPagePropertiesBackgroundColor obj, out System.Exception exception) { exception = null; obj = default(PrintLayoutPagePropertiesBackgroundColor); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out PrintLayoutPagePropertiesBackgroundColor obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static PrintLayoutPagePropertiesBackgroundColor Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((PrintLayoutPagePropertiesBackgroundColor)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current PrintLayoutPagePropertiesBackgroundColor 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 PrintLayoutPagePropertiesBackgroundColor object /// /// string xml file to load and deserialize /// Output PrintLayoutPagePropertiesBackgroundColor object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out PrintLayoutPagePropertiesBackgroundColor obj, out System.Exception exception) { exception = null; obj = default(PrintLayoutPagePropertiesBackgroundColor); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out PrintLayoutPagePropertiesBackgroundColor obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static PrintLayoutPagePropertiesBackgroundColor 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 PrintLayoutPagePropertiesBackgroundColor object /// public virtual PrintLayoutPagePropertiesBackgroundColor Clone() { return ((PrintLayoutPagePropertiesBackgroundColor)(this.MemberwiseClone())); } #endregion } [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] public partial class PrintLayoutLayoutProperties : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private bool showTitleField; [EditorBrowsable(EditorBrowsableState.Never)] private bool showTitleFieldSpecified; [EditorBrowsable(EditorBrowsableState.Never)] private bool showLegendField; [EditorBrowsable(EditorBrowsableState.Never)] private bool showLegendFieldSpecified; [EditorBrowsable(EditorBrowsableState.Never)] private bool showScaleBarField; [EditorBrowsable(EditorBrowsableState.Never)] private bool showScaleBarFieldSpecified; [EditorBrowsable(EditorBrowsableState.Never)] private bool showNorthArrowField; [EditorBrowsable(EditorBrowsableState.Never)] private bool showNorthArrowFieldSpecified; [EditorBrowsable(EditorBrowsableState.Never)] private bool showURLField; [EditorBrowsable(EditorBrowsableState.Never)] private bool showURLFieldSpecified; [EditorBrowsable(EditorBrowsableState.Never)] private bool showDateTimeField; [EditorBrowsable(EditorBrowsableState.Never)] private bool showDateTimeFieldSpecified; [EditorBrowsable(EditorBrowsableState.Never)] private bool showCustomLogosField; [EditorBrowsable(EditorBrowsableState.Never)] private bool showCustomLogosFieldSpecified; [EditorBrowsable(EditorBrowsableState.Never)] private bool showCustomTextField; [EditorBrowsable(EditorBrowsableState.Never)] private bool showCustomTextFieldSpecified; private static System.Xml.Serialization.XmlSerializer serializer; public bool ShowTitle { get { return this.showTitleField; } set { if ((showTitleField.Equals(value) != true)) { this.showTitleField = value; this.OnPropertyChanged("ShowTitle"); } } } [System.Xml.Serialization.XmlIgnoreAttribute()] public bool ShowTitleSpecified { get { return this.showTitleFieldSpecified; } set { if ((showTitleFieldSpecified.Equals(value) != true)) { this.showTitleFieldSpecified = value; this.OnPropertyChanged("ShowTitleSpecified"); } } } public bool ShowLegend { get { return this.showLegendField; } set { if ((showLegendField.Equals(value) != true)) { this.showLegendField = value; this.OnPropertyChanged("ShowLegend"); } } } [System.Xml.Serialization.XmlIgnoreAttribute()] public bool ShowLegendSpecified { get { return this.showLegendFieldSpecified; } set { if ((showLegendFieldSpecified.Equals(value) != true)) { this.showLegendFieldSpecified = value; this.OnPropertyChanged("ShowLegendSpecified"); } } } public bool ShowScaleBar { get { return this.showScaleBarField; } set { if ((showScaleBarField.Equals(value) != true)) { this.showScaleBarField = value; this.OnPropertyChanged("ShowScaleBar"); } } } [System.Xml.Serialization.XmlIgnoreAttribute()] public bool ShowScaleBarSpecified { get { return this.showScaleBarFieldSpecified; } set { if ((showScaleBarFieldSpecified.Equals(value) != true)) { this.showScaleBarFieldSpecified = value; this.OnPropertyChanged("ShowScaleBarSpecified"); } } } public bool ShowNorthArrow { get { return this.showNorthArrowField; } set { if ((showNorthArrowField.Equals(value) != true)) { this.showNorthArrowField = value; this.OnPropertyChanged("ShowNorthArrow"); } } } [System.Xml.Serialization.XmlIgnoreAttribute()] public bool ShowNorthArrowSpecified { get { return this.showNorthArrowFieldSpecified; } set { if ((showNorthArrowFieldSpecified.Equals(value) != true)) { this.showNorthArrowFieldSpecified = value; this.OnPropertyChanged("ShowNorthArrowSpecified"); } } } public bool ShowURL { get { return this.showURLField; } set { if ((showURLField.Equals(value) != true)) { this.showURLField = value; this.OnPropertyChanged("ShowURL"); } } } [System.Xml.Serialization.XmlIgnoreAttribute()] public bool ShowURLSpecified { get { return this.showURLFieldSpecified; } set { if ((showURLFieldSpecified.Equals(value) != true)) { this.showURLFieldSpecified = value; this.OnPropertyChanged("ShowURLSpecified"); } } } public bool ShowDateTime { get { return this.showDateTimeField; } set { if ((showDateTimeField.Equals(value) != true)) { this.showDateTimeField = value; this.OnPropertyChanged("ShowDateTime"); } } } [System.Xml.Serialization.XmlIgnoreAttribute()] public bool ShowDateTimeSpecified { get { return this.showDateTimeFieldSpecified; } set { if ((showDateTimeFieldSpecified.Equals(value) != true)) { this.showDateTimeFieldSpecified = value; this.OnPropertyChanged("ShowDateTimeSpecified"); } } } public bool ShowCustomLogos { get { return this.showCustomLogosField; } set { if ((showCustomLogosField.Equals(value) != true)) { this.showCustomLogosField = value; this.OnPropertyChanged("ShowCustomLogos"); } } } [System.Xml.Serialization.XmlIgnoreAttribute()] public bool ShowCustomLogosSpecified { get { return this.showCustomLogosFieldSpecified; } set { if ((showCustomLogosFieldSpecified.Equals(value) != true)) { this.showCustomLogosFieldSpecified = value; this.OnPropertyChanged("ShowCustomLogosSpecified"); } } } public bool ShowCustomText { get { return this.showCustomTextField; } set { if ((showCustomTextField.Equals(value) != true)) { this.showCustomTextField = value; this.OnPropertyChanged("ShowCustomText"); } } } [System.Xml.Serialization.XmlIgnoreAttribute()] public bool ShowCustomTextSpecified { get { return this.showCustomTextFieldSpecified; } set { if ((showCustomTextFieldSpecified.Equals(value) != true)) { this.showCustomTextFieldSpecified = value; this.OnPropertyChanged("ShowCustomTextSpecified"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(PrintLayoutLayoutProperties)); } 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 PrintLayoutLayoutProperties 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 PrintLayoutLayoutProperties object /// /// string workflow markup to deserialize /// Output PrintLayoutLayoutProperties object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out PrintLayoutLayoutProperties obj, out System.Exception exception) { exception = null; obj = default(PrintLayoutLayoutProperties); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out PrintLayoutLayoutProperties obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static PrintLayoutLayoutProperties Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((PrintLayoutLayoutProperties)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current PrintLayoutLayoutProperties 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 PrintLayoutLayoutProperties object /// /// string xml file to load and deserialize /// Output PrintLayoutLayoutProperties object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out PrintLayoutLayoutProperties obj, out System.Exception exception) { exception = null; obj = default(PrintLayoutLayoutProperties); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out PrintLayoutLayoutProperties obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static PrintLayoutLayoutProperties 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 PrintLayoutLayoutProperties object /// public virtual PrintLayoutLayoutProperties Clone() { return ((PrintLayoutLayoutProperties)(this.MemberwiseClone())); } #endregion } [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] public partial class PrintLayoutLogo : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private PrintLayoutLogoPosition positionField; [EditorBrowsable(EditorBrowsableState.Never)] private string resourceIdField; [EditorBrowsable(EditorBrowsableState.Never)] private string nameField; [EditorBrowsable(EditorBrowsableState.Never)] private PrintLayoutLogoSize sizeField; [EditorBrowsable(EditorBrowsableState.Never)] private float rotationField; [EditorBrowsable(EditorBrowsableState.Never)] private bool rotationFieldSpecified; private static System.Xml.Serialization.XmlSerializer serializer; public PrintLayoutLogoPosition Position { get { return this.positionField; } set { if ((this.positionField != null)) { if ((positionField.Equals(value) != true)) { this.positionField = value; this.OnPropertyChanged("Position"); } } else { this.positionField = value; this.OnPropertyChanged("Position"); } } } 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 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 PrintLayoutLogoSize Size { get { return this.sizeField; } set { if ((this.sizeField != null)) { if ((sizeField.Equals(value) != true)) { this.sizeField = value; this.OnPropertyChanged("Size"); } } else { this.sizeField = value; this.OnPropertyChanged("Size"); } } } public float Rotation { get { return this.rotationField; } set { if ((rotationField.Equals(value) != true)) { this.rotationField = value; this.OnPropertyChanged("Rotation"); } } } [System.Xml.Serialization.XmlIgnoreAttribute()] public bool RotationSpecified { get { return this.rotationFieldSpecified; } set { if ((rotationFieldSpecified.Equals(value) != true)) { this.rotationFieldSpecified = value; this.OnPropertyChanged("RotationSpecified"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(PrintLayoutLogo)); } 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 PrintLayoutLogo 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 PrintLayoutLogo object /// /// string workflow markup to deserialize /// Output PrintLayoutLogo object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out PrintLayoutLogo obj, out System.Exception exception) { exception = null; obj = default(PrintLayoutLogo); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out PrintLayoutLogo obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static PrintLayoutLogo Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((PrintLayoutLogo)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current PrintLayoutLogo 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 PrintLayoutLogo object /// /// string xml file to load and deserialize /// Output PrintLayoutLogo object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out PrintLayoutLogo obj, out System.Exception exception) { exception = null; obj = default(PrintLayoutLogo); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out PrintLayoutLogo obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static PrintLayoutLogo 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 PrintLayoutLogo object /// public virtual PrintLayoutLogo Clone() { return ((PrintLayoutLogo)(this.MemberwiseClone())); } #endregion } [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] public partial class PrintLayoutLogoPosition : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private float leftField; [EditorBrowsable(EditorBrowsableState.Never)] private float bottomField; [EditorBrowsable(EditorBrowsableState.Never)] private string unitsField; private static System.Xml.Serialization.XmlSerializer serializer; public float Left { get { return this.leftField; } set { if ((leftField.Equals(value) != true)) { this.leftField = value; this.OnPropertyChanged("Left"); } } } public float Bottom { get { return this.bottomField; } set { if ((bottomField.Equals(value) != true)) { this.bottomField = value; this.OnPropertyChanged("Bottom"); } } } public string Units { get { return this.unitsField; } set { if ((this.unitsField != null)) { if ((unitsField.Equals(value) != true)) { this.unitsField = value; this.OnPropertyChanged("Units"); } } else { this.unitsField = value; this.OnPropertyChanged("Units"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(PrintLayoutLogoPosition)); } 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 PrintLayoutLogoPosition 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 PrintLayoutLogoPosition object /// /// string workflow markup to deserialize /// Output PrintLayoutLogoPosition object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out PrintLayoutLogoPosition obj, out System.Exception exception) { exception = null; obj = default(PrintLayoutLogoPosition); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out PrintLayoutLogoPosition obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static PrintLayoutLogoPosition Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((PrintLayoutLogoPosition)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current PrintLayoutLogoPosition 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 PrintLayoutLogoPosition object /// /// string xml file to load and deserialize /// Output PrintLayoutLogoPosition object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out PrintLayoutLogoPosition obj, out System.Exception exception) { exception = null; obj = default(PrintLayoutLogoPosition); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out PrintLayoutLogoPosition obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static PrintLayoutLogoPosition 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 PrintLayoutLogoPosition object /// public virtual PrintLayoutLogoPosition Clone() { return ((PrintLayoutLogoPosition)(this.MemberwiseClone())); } #endregion } [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] public partial class PrintLayoutLogoSize : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private float widthField; [EditorBrowsable(EditorBrowsableState.Never)] private float heightField; [EditorBrowsable(EditorBrowsableState.Never)] private string unitsField; private static System.Xml.Serialization.XmlSerializer serializer; public float Width { get { return this.widthField; } set { if ((widthField.Equals(value) != true)) { this.widthField = value; this.OnPropertyChanged("Width"); } } } public float Height { get { return this.heightField; } set { if ((heightField.Equals(value) != true)) { this.heightField = value; this.OnPropertyChanged("Height"); } } } public string Units { get { return this.unitsField; } set { if ((this.unitsField != null)) { if ((unitsField.Equals(value) != true)) { this.unitsField = value; this.OnPropertyChanged("Units"); } } else { this.unitsField = value; this.OnPropertyChanged("Units"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(PrintLayoutLogoSize)); } 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 PrintLayoutLogoSize 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 PrintLayoutLogoSize object /// /// string workflow markup to deserialize /// Output PrintLayoutLogoSize object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out PrintLayoutLogoSize obj, out System.Exception exception) { exception = null; obj = default(PrintLayoutLogoSize); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out PrintLayoutLogoSize obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static PrintLayoutLogoSize Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((PrintLayoutLogoSize)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current PrintLayoutLogoSize 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 PrintLayoutLogoSize object /// /// string xml file to load and deserialize /// Output PrintLayoutLogoSize object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out PrintLayoutLogoSize obj, out System.Exception exception) { exception = null; obj = default(PrintLayoutLogoSize); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out PrintLayoutLogoSize obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static PrintLayoutLogoSize 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 PrintLayoutLogoSize object /// public virtual PrintLayoutLogoSize Clone() { return ((PrintLayoutLogoSize)(this.MemberwiseClone())); } #endregion } [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] public partial class PrintLayoutText : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private PrintLayoutTextPosition positionField; [EditorBrowsable(EditorBrowsableState.Never)] private PrintLayoutTextFont fontField; [EditorBrowsable(EditorBrowsableState.Never)] private string valueField; private static System.Xml.Serialization.XmlSerializer serializer; public PrintLayoutTextPosition Position { get { return this.positionField; } set { if ((this.positionField != null)) { if ((positionField.Equals(value) != true)) { this.positionField = value; this.OnPropertyChanged("Position"); } } else { this.positionField = value; this.OnPropertyChanged("Position"); } } } public PrintLayoutTextFont Font { get { return this.fontField; } set { if ((this.fontField != null)) { if ((fontField.Equals(value) != true)) { this.fontField = value; this.OnPropertyChanged("Font"); } } else { this.fontField = value; this.OnPropertyChanged("Font"); } } } public string Value { get { return this.valueField; } set { if ((this.valueField != null)) { if ((valueField.Equals(value) != true)) { this.valueField = value; this.OnPropertyChanged("Value"); } } else { this.valueField = value; this.OnPropertyChanged("Value"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(PrintLayoutText)); } 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 PrintLayoutText 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 PrintLayoutText object /// /// string workflow markup to deserialize /// Output PrintLayoutText object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out PrintLayoutText obj, out System.Exception exception) { exception = null; obj = default(PrintLayoutText); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out PrintLayoutText obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static PrintLayoutText Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((PrintLayoutText)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current PrintLayoutText 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 PrintLayoutText object /// /// string xml file to load and deserialize /// Output PrintLayoutText object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out PrintLayoutText obj, out System.Exception exception) { exception = null; obj = default(PrintLayoutText); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out PrintLayoutText obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static PrintLayoutText 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 PrintLayoutText object /// public virtual PrintLayoutText Clone() { return ((PrintLayoutText)(this.MemberwiseClone())); } #endregion } [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] public partial class PrintLayoutTextPosition : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private float leftField; [EditorBrowsable(EditorBrowsableState.Never)] private float bottomField; [EditorBrowsable(EditorBrowsableState.Never)] private string unitsField; private static System.Xml.Serialization.XmlSerializer serializer; public float Left { get { return this.leftField; } set { if ((leftField.Equals(value) != true)) { this.leftField = value; this.OnPropertyChanged("Left"); } } } public float Bottom { get { return this.bottomField; } set { if ((bottomField.Equals(value) != true)) { this.bottomField = value; this.OnPropertyChanged("Bottom"); } } } public string Units { get { return this.unitsField; } set { if ((this.unitsField != null)) { if ((unitsField.Equals(value) != true)) { this.unitsField = value; this.OnPropertyChanged("Units"); } } else { this.unitsField = value; this.OnPropertyChanged("Units"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(PrintLayoutTextPosition)); } 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 PrintLayoutTextPosition 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 PrintLayoutTextPosition object /// /// string workflow markup to deserialize /// Output PrintLayoutTextPosition object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out PrintLayoutTextPosition obj, out System.Exception exception) { exception = null; obj = default(PrintLayoutTextPosition); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out PrintLayoutTextPosition obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static PrintLayoutTextPosition Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((PrintLayoutTextPosition)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current PrintLayoutTextPosition 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 PrintLayoutTextPosition object /// /// string xml file to load and deserialize /// Output PrintLayoutTextPosition object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out PrintLayoutTextPosition obj, out System.Exception exception) { exception = null; obj = default(PrintLayoutTextPosition); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out PrintLayoutTextPosition obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static PrintLayoutTextPosition 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 PrintLayoutTextPosition object /// public virtual PrintLayoutTextPosition Clone() { return ((PrintLayoutTextPosition)(this.MemberwiseClone())); } #endregion } [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] public partial class PrintLayoutTextFont : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private string nameField; [EditorBrowsable(EditorBrowsableState.Never)] private float heightField; [EditorBrowsable(EditorBrowsableState.Never)] private string unitsField; 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 float Height { get { return this.heightField; } set { if ((heightField.Equals(value) != true)) { this.heightField = value; this.OnPropertyChanged("Height"); } } } public string Units { get { return this.unitsField; } set { if ((this.unitsField != null)) { if ((unitsField.Equals(value) != true)) { this.unitsField = value; this.OnPropertyChanged("Units"); } } else { this.unitsField = value; this.OnPropertyChanged("Units"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(PrintLayoutTextFont)); } 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 PrintLayoutTextFont 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 PrintLayoutTextFont object /// /// string workflow markup to deserialize /// Output PrintLayoutTextFont object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out PrintLayoutTextFont obj, out System.Exception exception) { exception = null; obj = default(PrintLayoutTextFont); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out PrintLayoutTextFont obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static PrintLayoutTextFont Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((PrintLayoutTextFont)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current PrintLayoutTextFont 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 PrintLayoutTextFont object /// /// string xml file to load and deserialize /// Output PrintLayoutTextFont object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out PrintLayoutTextFont obj, out System.Exception exception) { exception = null; obj = default(PrintLayoutTextFont); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out PrintLayoutTextFont obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static PrintLayoutTextFont 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 PrintLayoutTextFont object /// public virtual PrintLayoutTextFont Clone() { return ((PrintLayoutTextFont)(this.MemberwiseClone())); } #endregion } }