#pragma warning disable 1591, 0114, 0108
// ------------------------------------------------------------------------------
//
// Generated by Xsd2Code. Version 3.4.0.38967
// WatermarkDefinition-2.3.0.csBindingListCSharpTrueFalseFalseFalseTrueTrueFalseTrueFalseFalseTrueFalseNet20SerializeDeserializeSaveToFileLoadFromFileTrueFalseFalseFalseFalseDefaultUTF8FalseTrue
//
// ------------------------------------------------------------------------------
namespace OSGeo.MapGuide.ObjectModels.WatermarkDefinition_2_3_0 {
using System;
using System.Diagnostics;
using System.Xml.Serialization;
using System.Collections;
using System.Xml.Schema;
using System.ComponentModel;
using System.IO;
using System.Text;
using OSGeo.MapGuide.ObjectModels.WatermarkDefinition;
using OSGeo.MapGuide.ObjectModels.LayerDefinition_1_0_0;
using OSGeo.MapGuide.ObjectModels.Common;
using OSGeo.MapGuide.ObjectModels.SymbolDefinition_1_1_0;
///
/// The specification of a watermark.
///
[System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.0.38968")]
[System.SerializableAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
[System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=false)]
public partial class WatermarkDefinition : WatermarkDefinitionType, System.ComponentModel.INotifyPropertyChanged {
[EditorBrowsable(EditorBrowsableState.Never)]
private string versionField;
private static System.Xml.Serialization.XmlSerializer serializer;
public WatermarkDefinition() {
this.versionField = "2.3.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 {
get {
if ((serializer == null)) {
serializer = new System.Xml.Serialization.XmlSerializer(typeof(WatermarkDefinition));
}
return serializer;
}
}
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
public virtual void OnPropertyChanged(string propertyName) {
System.ComponentModel.PropertyChangedEventHandler handler = this.PropertyChanged;
if ((handler != null)) {
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
}
}
#region Serialize/Deserialize
///
/// Serializes current WatermarkDefinition 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 WatermarkDefinition object
///
/// string workflow markup to deserialize
/// Output WatermarkDefinition object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool Deserialize(string xml, out WatermarkDefinition obj, out System.Exception exception) {
exception = null;
obj = default(WatermarkDefinition);
try {
obj = Deserialize(xml);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool Deserialize(string xml, out WatermarkDefinition obj) {
System.Exception exception = null;
return Deserialize(xml, out obj, out exception);
}
public static WatermarkDefinition Deserialize(string xml) {
System.IO.StringReader stringReader = null;
try {
stringReader = new System.IO.StringReader(xml);
return ((WatermarkDefinition)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
}
finally {
if ((stringReader != null)) {
stringReader.Dispose();
}
}
}
///
/// Serializes current WatermarkDefinition 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 WatermarkDefinition object
///
/// string xml file to load and deserialize
/// Output WatermarkDefinition object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool LoadFromFile(string fileName, out WatermarkDefinition obj, out System.Exception exception) {
exception = null;
obj = default(WatermarkDefinition);
try {
obj = LoadFromFile(fileName);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool LoadFromFile(string fileName, out WatermarkDefinition obj) {
System.Exception exception = null;
return LoadFromFile(fileName, out obj, out exception);
}
public static WatermarkDefinition 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 WatermarkDefinition object
///
public virtual WatermarkDefinition Clone() {
return ((WatermarkDefinition)(this.MemberwiseClone()));
}
#endregion
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.0.38968")]
[System.SerializableAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=true)]
public partial class WatermarkDefinitionType : System.ComponentModel.INotifyPropertyChanged {
[EditorBrowsable(EditorBrowsableState.Never)]
private WatermarkDefinitionTypeContent contentField;
[EditorBrowsable(EditorBrowsableState.Never)]
private WatermarkAppearanceType appearanceField;
[EditorBrowsable(EditorBrowsableState.Never)]
private WatermarkDefinitionTypePosition positionField;
[EditorBrowsable(EditorBrowsableState.Never)]
private ExtendedDataType extendedData1Field;
private static System.Xml.Serialization.XmlSerializer serializer;
///
/// WatermarkDefinitionType class constructor
///
public WatermarkDefinitionType() {
//this.extendedData1Field = new ExtendedDataType();
//this.positionField = new WatermarkDefinitionTypePosition();
//this.appearanceField = new WatermarkAppearanceType();
//this.contentField = new WatermarkDefinitionTypeContent();
}
[System.Xml.Serialization.XmlElementAttribute(Order=0)]
public WatermarkDefinitionTypeContent 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");
}
}
}
[System.Xml.Serialization.XmlElementAttribute(Order=1)]
public WatermarkAppearanceType Appearance {
get {
return this.appearanceField;
}
set {
if ((this.appearanceField != null)) {
if ((appearanceField.Equals(value) != true)) {
this.appearanceField = value;
this.OnPropertyChanged("Appearance");
}
}
else {
this.appearanceField = value;
this.OnPropertyChanged("Appearance");
}
}
}
[System.Xml.Serialization.XmlElementAttribute(Order=2)]
public WatermarkDefinitionTypePosition 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");
}
}
}
[System.Xml.Serialization.XmlElementAttribute(Order=3)]
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(WatermarkDefinitionType));
}
return serializer;
}
}
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
public virtual void OnPropertyChanged(string propertyName) {
System.ComponentModel.PropertyChangedEventHandler handler = this.PropertyChanged;
if ((handler != null)) {
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
}
}
#region Serialize/Deserialize
///
/// Serializes current WatermarkDefinitionType 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 WatermarkDefinitionType object
///
/// string workflow markup to deserialize
/// Output WatermarkDefinitionType object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool Deserialize(string xml, out WatermarkDefinitionType obj, out System.Exception exception) {
exception = null;
obj = default(WatermarkDefinitionType);
try {
obj = Deserialize(xml);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool Deserialize(string xml, out WatermarkDefinitionType obj) {
System.Exception exception = null;
return Deserialize(xml, out obj, out exception);
}
public static WatermarkDefinitionType Deserialize(string xml) {
System.IO.StringReader stringReader = null;
try {
stringReader = new System.IO.StringReader(xml);
return ((WatermarkDefinitionType)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
}
finally {
if ((stringReader != null)) {
stringReader.Dispose();
}
}
}
///
/// Serializes current WatermarkDefinitionType 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 WatermarkDefinitionType object
///
/// string xml file to load and deserialize
/// Output WatermarkDefinitionType object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool LoadFromFile(string fileName, out WatermarkDefinitionType obj, out System.Exception exception) {
exception = null;
obj = default(WatermarkDefinitionType);
try {
obj = LoadFromFile(fileName);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool LoadFromFile(string fileName, out WatermarkDefinitionType obj) {
System.Exception exception = null;
return LoadFromFile(fileName, out obj, out exception);
}
public static WatermarkDefinitionType 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 WatermarkDefinitionType object
///
public virtual WatermarkDefinitionType Clone() {
return ((WatermarkDefinitionType)(this.MemberwiseClone()));
}
#endregion
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.0.38968")]
[System.SerializableAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
public partial class WatermarkDefinitionTypeContent : System.ComponentModel.INotifyPropertyChanged {
[EditorBrowsable(EditorBrowsableState.Never)]
private SymbolDefinitionBase itemField;
private static System.Xml.Serialization.XmlSerializer serializer;
///
/// WatermarkDefinitionTypeContent class constructor
///
public WatermarkDefinitionTypeContent() {
//this.itemField = new SymbolDefinitionBase();
}
[System.Xml.Serialization.XmlElementAttribute("CompoundSymbolDefinition", typeof(CompoundSymbolDefinition), Order=0)]
[System.Xml.Serialization.XmlElementAttribute("SimpleSymbolDefinition", typeof(SimpleSymbolDefinition), Order=0)]
public SymbolDefinitionBase 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");
}
}
}
private static System.Xml.Serialization.XmlSerializer Serializer {
get {
if ((serializer == null)) {
serializer = new System.Xml.Serialization.XmlSerializer(typeof(WatermarkDefinitionTypeContent));
}
return serializer;
}
}
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
public virtual void OnPropertyChanged(string propertyName) {
System.ComponentModel.PropertyChangedEventHandler handler = this.PropertyChanged;
if ((handler != null)) {
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
}
}
#region Serialize/Deserialize
///
/// Serializes current WatermarkDefinitionTypeContent 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 WatermarkDefinitionTypeContent object
///
/// string workflow markup to deserialize
/// Output WatermarkDefinitionTypeContent object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool Deserialize(string xml, out WatermarkDefinitionTypeContent obj, out System.Exception exception) {
exception = null;
obj = default(WatermarkDefinitionTypeContent);
try {
obj = Deserialize(xml);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool Deserialize(string xml, out WatermarkDefinitionTypeContent obj) {
System.Exception exception = null;
return Deserialize(xml, out obj, out exception);
}
public static WatermarkDefinitionTypeContent Deserialize(string xml) {
System.IO.StringReader stringReader = null;
try {
stringReader = new System.IO.StringReader(xml);
return ((WatermarkDefinitionTypeContent)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
}
finally {
if ((stringReader != null)) {
stringReader.Dispose();
}
}
}
///
/// Serializes current WatermarkDefinitionTypeContent 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 WatermarkDefinitionTypeContent object
///
/// string xml file to load and deserialize
/// Output WatermarkDefinitionTypeContent object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool LoadFromFile(string fileName, out WatermarkDefinitionTypeContent obj, out System.Exception exception) {
exception = null;
obj = default(WatermarkDefinitionTypeContent);
try {
obj = LoadFromFile(fileName);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool LoadFromFile(string fileName, out WatermarkDefinitionTypeContent obj) {
System.Exception exception = null;
return LoadFromFile(fileName, out obj, out exception);
}
public static WatermarkDefinitionTypeContent 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 WatermarkDefinitionTypeContent object
///
public virtual WatermarkDefinitionTypeContent Clone() {
return ((WatermarkDefinitionTypeContent)(this.MemberwiseClone()));
}
#endregion
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.0.38968")]
[System.SerializableAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=true)]
public partial class WatermarkAppearanceType : System.ComponentModel.INotifyPropertyChanged {
[EditorBrowsable(EditorBrowsableState.Never)]
private double transparencyField;
[EditorBrowsable(EditorBrowsableState.Never)]
private double rotationField;
private static System.Xml.Serialization.XmlSerializer serializer;
public WatermarkAppearanceType() {
this.transparencyField = 0;
this.rotationField = 0;
}
[System.Xml.Serialization.XmlElementAttribute(Order=0)]
[System.ComponentModel.DefaultValueAttribute(0)]
public double Transparency {
get {
return this.transparencyField;
}
set {
if ((transparencyField.Equals(value) != true)) {
this.transparencyField = value;
this.OnPropertyChanged("Transparency");
}
}
}
[System.Xml.Serialization.XmlElementAttribute(Order=1)]
[System.ComponentModel.DefaultValueAttribute(0)]
public double Rotation {
get {
return this.rotationField;
}
set {
if ((rotationField.Equals(value) != true)) {
this.rotationField = value;
this.OnPropertyChanged("Rotation");
}
}
}
private static System.Xml.Serialization.XmlSerializer Serializer {
get {
if ((serializer == null)) {
serializer = new System.Xml.Serialization.XmlSerializer(typeof(WatermarkAppearanceType));
}
return serializer;
}
}
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
public virtual void OnPropertyChanged(string propertyName) {
System.ComponentModel.PropertyChangedEventHandler handler = this.PropertyChanged;
if ((handler != null)) {
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
}
}
#region Serialize/Deserialize
///
/// Serializes current WatermarkAppearanceType 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 WatermarkAppearanceType object
///
/// string workflow markup to deserialize
/// Output WatermarkAppearanceType object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool Deserialize(string xml, out WatermarkAppearanceType obj, out System.Exception exception) {
exception = null;
obj = default(WatermarkAppearanceType);
try {
obj = Deserialize(xml);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool Deserialize(string xml, out WatermarkAppearanceType obj) {
System.Exception exception = null;
return Deserialize(xml, out obj, out exception);
}
public static WatermarkAppearanceType Deserialize(string xml) {
System.IO.StringReader stringReader = null;
try {
stringReader = new System.IO.StringReader(xml);
return ((WatermarkAppearanceType)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
}
finally {
if ((stringReader != null)) {
stringReader.Dispose();
}
}
}
///
/// Serializes current WatermarkAppearanceType 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 WatermarkAppearanceType object
///
/// string xml file to load and deserialize
/// Output WatermarkAppearanceType object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool LoadFromFile(string fileName, out WatermarkAppearanceType obj, out System.Exception exception) {
exception = null;
obj = default(WatermarkAppearanceType);
try {
obj = LoadFromFile(fileName);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool LoadFromFile(string fileName, out WatermarkAppearanceType obj) {
System.Exception exception = null;
return LoadFromFile(fileName, out obj, out exception);
}
public static WatermarkAppearanceType 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 WatermarkAppearanceType object
///
public virtual WatermarkAppearanceType Clone() {
return ((WatermarkAppearanceType)(this.MemberwiseClone()));
}
#endregion
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.0.38968")]
[System.SerializableAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
public partial class WatermarkDefinitionTypePosition : System.ComponentModel.INotifyPropertyChanged {
[EditorBrowsable(EditorBrowsableState.Never)]
private PositionType itemField;
private static System.Xml.Serialization.XmlSerializer serializer;
[System.Xml.Serialization.XmlElementAttribute("TilePosition", typeof(TilePositionType), Order=0)]
[System.Xml.Serialization.XmlElementAttribute("XYPosition", typeof(XYPositionType), Order=0)]
public PositionType 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");
}
}
}
private static System.Xml.Serialization.XmlSerializer Serializer {
get {
if ((serializer == null)) {
serializer = new System.Xml.Serialization.XmlSerializer(typeof(WatermarkDefinitionTypePosition));
}
return serializer;
}
}
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
public virtual void OnPropertyChanged(string propertyName) {
System.ComponentModel.PropertyChangedEventHandler handler = this.PropertyChanged;
if ((handler != null)) {
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
}
}
#region Serialize/Deserialize
///
/// Serializes current WatermarkDefinitionTypePosition 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 WatermarkDefinitionTypePosition object
///
/// string workflow markup to deserialize
/// Output WatermarkDefinitionTypePosition object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool Deserialize(string xml, out WatermarkDefinitionTypePosition obj, out System.Exception exception) {
exception = null;
obj = default(WatermarkDefinitionTypePosition);
try {
obj = Deserialize(xml);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool Deserialize(string xml, out WatermarkDefinitionTypePosition obj) {
System.Exception exception = null;
return Deserialize(xml, out obj, out exception);
}
public static WatermarkDefinitionTypePosition Deserialize(string xml) {
System.IO.StringReader stringReader = null;
try {
stringReader = new System.IO.StringReader(xml);
return ((WatermarkDefinitionTypePosition)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
}
finally {
if ((stringReader != null)) {
stringReader.Dispose();
}
}
}
///
/// Serializes current WatermarkDefinitionTypePosition 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 WatermarkDefinitionTypePosition object
///
/// string xml file to load and deserialize
/// Output WatermarkDefinitionTypePosition object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool LoadFromFile(string fileName, out WatermarkDefinitionTypePosition obj, out System.Exception exception) {
exception = null;
obj = default(WatermarkDefinitionTypePosition);
try {
obj = LoadFromFile(fileName);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool LoadFromFile(string fileName, out WatermarkDefinitionTypePosition obj) {
System.Exception exception = null;
return LoadFromFile(fileName, out obj, out exception);
}
public static WatermarkDefinitionTypePosition 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 WatermarkDefinitionTypePosition object
///
public virtual WatermarkDefinitionTypePosition Clone() {
return ((WatermarkDefinitionTypePosition)(this.MemberwiseClone()));
}
#endregion
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.0.38968")]
[System.SerializableAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=true)]
public partial class TilePositionType : PositionType, System.ComponentModel.INotifyPropertyChanged {
[EditorBrowsable(EditorBrowsableState.Never)]
private double tileWidthField;
[EditorBrowsable(EditorBrowsableState.Never)]
private double tileHeightField;
[EditorBrowsable(EditorBrowsableState.Never)]
private HorizontalPositionType horizontalPositionField;
[EditorBrowsable(EditorBrowsableState.Never)]
private VerticalPositionType verticalPositionField;
private static System.Xml.Serialization.XmlSerializer serializer;
public TilePositionType() {
this.verticalPositionField = new VerticalPositionType();
this.horizontalPositionField = new HorizontalPositionType();
this.tileWidthField = 150;
this.tileHeightField = 150;
}
[System.Xml.Serialization.XmlElementAttribute(Order=0)]
public double TileWidth {
get {
return this.tileWidthField;
}
set {
if ((tileWidthField.Equals(value) != true)) {
this.tileWidthField = value;
this.OnPropertyChanged("TileWidth");
}
}
}
[System.Xml.Serialization.XmlElementAttribute(Order=1)]
public double TileHeight {
get {
return this.tileHeightField;
}
set {
if ((tileHeightField.Equals(value) != true)) {
this.tileHeightField = value;
this.OnPropertyChanged("TileHeight");
}
}
}
[System.Xml.Serialization.XmlElementAttribute(Order=2)]
public HorizontalPositionType HorizontalPosition {
get {
return this.horizontalPositionField;
}
set {
if ((this.horizontalPositionField != null)) {
if ((horizontalPositionField.Equals(value) != true)) {
this.horizontalPositionField = value;
this.OnPropertyChanged("HorizontalPosition");
}
}
else {
this.horizontalPositionField = value;
this.OnPropertyChanged("HorizontalPosition");
}
}
}
[System.Xml.Serialization.XmlElementAttribute(Order=3)]
public VerticalPositionType VerticalPosition {
get {
return this.verticalPositionField;
}
set {
if ((this.verticalPositionField != null)) {
if ((verticalPositionField.Equals(value) != true)) {
this.verticalPositionField = value;
this.OnPropertyChanged("VerticalPosition");
}
}
else {
this.verticalPositionField = value;
this.OnPropertyChanged("VerticalPosition");
}
}
}
private static System.Xml.Serialization.XmlSerializer Serializer {
get {
if ((serializer == null)) {
serializer = new System.Xml.Serialization.XmlSerializer(typeof(TilePositionType));
}
return serializer;
}
}
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
public virtual void OnPropertyChanged(string propertyName) {
System.ComponentModel.PropertyChangedEventHandler handler = this.PropertyChanged;
if ((handler != null)) {
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
}
}
#region Serialize/Deserialize
///
/// Serializes current TilePositionType 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 TilePositionType object
///
/// string workflow markup to deserialize
/// Output TilePositionType object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool Deserialize(string xml, out TilePositionType obj, out System.Exception exception) {
exception = null;
obj = default(TilePositionType);
try {
obj = Deserialize(xml);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool Deserialize(string xml, out TilePositionType obj) {
System.Exception exception = null;
return Deserialize(xml, out obj, out exception);
}
public static TilePositionType Deserialize(string xml) {
System.IO.StringReader stringReader = null;
try {
stringReader = new System.IO.StringReader(xml);
return ((TilePositionType)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
}
finally {
if ((stringReader != null)) {
stringReader.Dispose();
}
}
}
///
/// Serializes current TilePositionType 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 TilePositionType object
///
/// string xml file to load and deserialize
/// Output TilePositionType object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool LoadFromFile(string fileName, out TilePositionType obj, out System.Exception exception) {
exception = null;
obj = default(TilePositionType);
try {
obj = LoadFromFile(fileName);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool LoadFromFile(string fileName, out TilePositionType obj) {
System.Exception exception = null;
return LoadFromFile(fileName, out obj, out exception);
}
public static TilePositionType 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 TilePositionType object
///
public virtual TilePositionType Clone() {
return ((TilePositionType)(this.MemberwiseClone()));
}
#endregion
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.0.38968")]
[System.SerializableAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=true)]
public partial class HorizontalPositionType : System.ComponentModel.INotifyPropertyChanged {
[EditorBrowsable(EditorBrowsableState.Never)]
private double offsetField;
[EditorBrowsable(EditorBrowsableState.Never)]
private UnitType unitField;
[EditorBrowsable(EditorBrowsableState.Never)]
private HorizontalAlignmentType alignmentField;
private static System.Xml.Serialization.XmlSerializer serializer;
public HorizontalPositionType() {
this.offsetField = 0;
this.unitField = UnitType.Points;
this.alignmentField = HorizontalAlignmentType.Center;
}
[System.Xml.Serialization.XmlElementAttribute(Order=0)]
public double Offset {
get {
return this.offsetField;
}
set {
if ((offsetField.Equals(value) != true)) {
this.offsetField = value;
this.OnPropertyChanged("Offset");
}
}
}
[System.Xml.Serialization.XmlElementAttribute(Order=1)]
public UnitType Unit {
get {
return this.unitField;
}
set {
if ((unitField.Equals(value) != true)) {
this.unitField = value;
this.OnPropertyChanged("Unit");
}
}
}
[System.Xml.Serialization.XmlElementAttribute(Order=2)]
public HorizontalAlignmentType Alignment {
get {
return this.alignmentField;
}
set {
if ((alignmentField.Equals(value) != true)) {
this.alignmentField = value;
this.OnPropertyChanged("Alignment");
}
}
}
private static System.Xml.Serialization.XmlSerializer Serializer {
get {
if ((serializer == null)) {
serializer = new System.Xml.Serialization.XmlSerializer(typeof(HorizontalPositionType));
}
return serializer;
}
}
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
public virtual void OnPropertyChanged(string propertyName) {
System.ComponentModel.PropertyChangedEventHandler handler = this.PropertyChanged;
if ((handler != null)) {
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
}
}
#region Serialize/Deserialize
///
/// Serializes current HorizontalPositionType 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 HorizontalPositionType object
///
/// string workflow markup to deserialize
/// Output HorizontalPositionType object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool Deserialize(string xml, out HorizontalPositionType obj, out System.Exception exception) {
exception = null;
obj = default(HorizontalPositionType);
try {
obj = Deserialize(xml);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool Deserialize(string xml, out HorizontalPositionType obj) {
System.Exception exception = null;
return Deserialize(xml, out obj, out exception);
}
public static HorizontalPositionType Deserialize(string xml) {
System.IO.StringReader stringReader = null;
try {
stringReader = new System.IO.StringReader(xml);
return ((HorizontalPositionType)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
}
finally {
if ((stringReader != null)) {
stringReader.Dispose();
}
}
}
///
/// Serializes current HorizontalPositionType 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 HorizontalPositionType object
///
/// string xml file to load and deserialize
/// Output HorizontalPositionType object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool LoadFromFile(string fileName, out HorizontalPositionType obj, out System.Exception exception) {
exception = null;
obj = default(HorizontalPositionType);
try {
obj = LoadFromFile(fileName);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool LoadFromFile(string fileName, out HorizontalPositionType obj) {
System.Exception exception = null;
return LoadFromFile(fileName, out obj, out exception);
}
public static HorizontalPositionType 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 HorizontalPositionType object
///
public virtual HorizontalPositionType Clone() {
return ((HorizontalPositionType)(this.MemberwiseClone()));
}
#endregion
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.0.38968")]
[System.SerializableAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=true)]
public partial class VerticalPositionType : System.ComponentModel.INotifyPropertyChanged {
[EditorBrowsable(EditorBrowsableState.Never)]
private double offsetField;
[EditorBrowsable(EditorBrowsableState.Never)]
private UnitType unitField;
[EditorBrowsable(EditorBrowsableState.Never)]
private VerticalAlignmentType alignmentField;
private static System.Xml.Serialization.XmlSerializer serializer;
public VerticalPositionType() {
this.offsetField = 0;
this.unitField = UnitType.Points;
this.alignmentField = VerticalAlignmentType.Center;
}
[System.Xml.Serialization.XmlElementAttribute(Order=0)]
public double Offset {
get {
return this.offsetField;
}
set {
if ((offsetField.Equals(value) != true)) {
this.offsetField = value;
this.OnPropertyChanged("Offset");
}
}
}
[System.Xml.Serialization.XmlElementAttribute(Order=1)]
public UnitType Unit {
get {
return this.unitField;
}
set {
if ((unitField.Equals(value) != true)) {
this.unitField = value;
this.OnPropertyChanged("Unit");
}
}
}
[System.Xml.Serialization.XmlElementAttribute(Order=2)]
public VerticalAlignmentType Alignment {
get {
return this.alignmentField;
}
set {
if ((alignmentField.Equals(value) != true)) {
this.alignmentField = value;
this.OnPropertyChanged("Alignment");
}
}
}
private static System.Xml.Serialization.XmlSerializer Serializer {
get {
if ((serializer == null)) {
serializer = new System.Xml.Serialization.XmlSerializer(typeof(VerticalPositionType));
}
return serializer;
}
}
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
public virtual void OnPropertyChanged(string propertyName) {
System.ComponentModel.PropertyChangedEventHandler handler = this.PropertyChanged;
if ((handler != null)) {
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
}
}
#region Serialize/Deserialize
///
/// Serializes current VerticalPositionType 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 VerticalPositionType object
///
/// string workflow markup to deserialize
/// Output VerticalPositionType object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool Deserialize(string xml, out VerticalPositionType obj, out System.Exception exception) {
exception = null;
obj = default(VerticalPositionType);
try {
obj = Deserialize(xml);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool Deserialize(string xml, out VerticalPositionType obj) {
System.Exception exception = null;
return Deserialize(xml, out obj, out exception);
}
public static VerticalPositionType Deserialize(string xml) {
System.IO.StringReader stringReader = null;
try {
stringReader = new System.IO.StringReader(xml);
return ((VerticalPositionType)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
}
finally {
if ((stringReader != null)) {
stringReader.Dispose();
}
}
}
///
/// Serializes current VerticalPositionType 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 VerticalPositionType object
///
/// string xml file to load and deserialize
/// Output VerticalPositionType object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool LoadFromFile(string fileName, out VerticalPositionType obj, out System.Exception exception) {
exception = null;
obj = default(VerticalPositionType);
try {
obj = LoadFromFile(fileName);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool LoadFromFile(string fileName, out VerticalPositionType obj) {
System.Exception exception = null;
return LoadFromFile(fileName, out obj, out exception);
}
public static VerticalPositionType 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 VerticalPositionType object
///
public virtual VerticalPositionType Clone() {
return ((VerticalPositionType)(this.MemberwiseClone()));
}
#endregion
}
[System.Xml.Serialization.XmlIncludeAttribute(typeof(TilePositionType))]
[System.Xml.Serialization.XmlIncludeAttribute(typeof(XYPositionType))]
[System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.0.38968")]
[System.SerializableAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=true)]
public abstract partial class PositionType : System.ComponentModel.INotifyPropertyChanged {
private static System.Xml.Serialization.XmlSerializer serializer;
private static System.Xml.Serialization.XmlSerializer Serializer {
get {
if ((serializer == null)) {
serializer = new System.Xml.Serialization.XmlSerializer(typeof(PositionType));
}
return serializer;
}
}
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
public virtual void OnPropertyChanged(string propertyName) {
System.ComponentModel.PropertyChangedEventHandler handler = this.PropertyChanged;
if ((handler != null)) {
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
}
}
#region Serialize/Deserialize
///
/// Serializes current PositionType 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 PositionType object
///
/// string workflow markup to deserialize
/// Output PositionType object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool Deserialize(string xml, out PositionType obj, out System.Exception exception) {
exception = null;
obj = default(PositionType);
try {
obj = Deserialize(xml);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool Deserialize(string xml, out PositionType obj) {
System.Exception exception = null;
return Deserialize(xml, out obj, out exception);
}
public static PositionType Deserialize(string xml) {
System.IO.StringReader stringReader = null;
try {
stringReader = new System.IO.StringReader(xml);
return ((PositionType)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
}
finally {
if ((stringReader != null)) {
stringReader.Dispose();
}
}
}
///
/// Serializes current PositionType 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 PositionType object
///
/// string xml file to load and deserialize
/// Output PositionType object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool LoadFromFile(string fileName, out PositionType obj, out System.Exception exception) {
exception = null;
obj = default(PositionType);
try {
obj = LoadFromFile(fileName);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool LoadFromFile(string fileName, out PositionType obj) {
System.Exception exception = null;
return LoadFromFile(fileName, out obj, out exception);
}
public static PositionType 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 PositionType object
///
public virtual PositionType Clone() {
return ((PositionType)(this.MemberwiseClone()));
}
#endregion
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.0.38968")]
[System.SerializableAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=true)]
public partial class XYPositionType : PositionType, System.ComponentModel.INotifyPropertyChanged {
[EditorBrowsable(EditorBrowsableState.Never)]
private HorizontalPositionType xPositionField;
[EditorBrowsable(EditorBrowsableState.Never)]
private VerticalPositionType yPositionField;
private static System.Xml.Serialization.XmlSerializer serializer;
///
/// XYPositionType class constructor
///
public XYPositionType() {
this.yPositionField = new VerticalPositionType();
this.xPositionField = new HorizontalPositionType();
}
[System.Xml.Serialization.XmlElementAttribute(Order=0)]
public HorizontalPositionType XPosition {
get {
return this.xPositionField;
}
set {
if ((this.xPositionField != null)) {
if ((xPositionField.Equals(value) != true)) {
this.xPositionField = value;
this.OnPropertyChanged("XPosition");
}
}
else {
this.xPositionField = value;
this.OnPropertyChanged("XPosition");
}
}
}
[System.Xml.Serialization.XmlElementAttribute(Order=1)]
public VerticalPositionType YPosition {
get {
return this.yPositionField;
}
set {
if ((this.yPositionField != null)) {
if ((yPositionField.Equals(value) != true)) {
this.yPositionField = value;
this.OnPropertyChanged("YPosition");
}
}
else {
this.yPositionField = value;
this.OnPropertyChanged("YPosition");
}
}
}
private static System.Xml.Serialization.XmlSerializer Serializer {
get {
if ((serializer == null)) {
serializer = new System.Xml.Serialization.XmlSerializer(typeof(XYPositionType));
}
return serializer;
}
}
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
public virtual void OnPropertyChanged(string propertyName) {
System.ComponentModel.PropertyChangedEventHandler handler = this.PropertyChanged;
if ((handler != null)) {
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
}
}
#region Serialize/Deserialize
///
/// Serializes current XYPositionType 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 XYPositionType object
///
/// string workflow markup to deserialize
/// Output XYPositionType object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool Deserialize(string xml, out XYPositionType obj, out System.Exception exception) {
exception = null;
obj = default(XYPositionType);
try {
obj = Deserialize(xml);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool Deserialize(string xml, out XYPositionType obj) {
System.Exception exception = null;
return Deserialize(xml, out obj, out exception);
}
public static XYPositionType Deserialize(string xml) {
System.IO.StringReader stringReader = null;
try {
stringReader = new System.IO.StringReader(xml);
return ((XYPositionType)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
}
finally {
if ((stringReader != null)) {
stringReader.Dispose();
}
}
}
///
/// Serializes current XYPositionType 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 XYPositionType object
///
/// string xml file to load and deserialize
/// Output XYPositionType object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool LoadFromFile(string fileName, out XYPositionType obj, out System.Exception exception) {
exception = null;
obj = default(XYPositionType);
try {
obj = LoadFromFile(fileName);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool LoadFromFile(string fileName, out XYPositionType obj) {
System.Exception exception = null;
return LoadFromFile(fileName, out obj, out exception);
}
public static XYPositionType 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 XYPositionType object
///
public virtual XYPositionType Clone() {
return ((XYPositionType)(this.MemberwiseClone()));
}
#endregion
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.0.38968")]
[System.SerializableAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=true)]
public partial class WatermarkType : System.ComponentModel.INotifyPropertyChanged {
[EditorBrowsable(EditorBrowsableState.Never)]
private string nameField;
[EditorBrowsable(EditorBrowsableState.Never)]
private string resourceIdField;
[EditorBrowsable(EditorBrowsableState.Never)]
private UsageType usageField;
[EditorBrowsable(EditorBrowsableState.Never)]
private WatermarkAppearanceType appearanceOverrideField;
[EditorBrowsable(EditorBrowsableState.Never)]
private WatermarkTypePositionOverride positionOverrideField;
[EditorBrowsable(EditorBrowsableState.Never)]
private ExtendedDataType extendedData1Field;
private static System.Xml.Serialization.XmlSerializer serializer;
public WatermarkType() {
this.usageField = UsageType.All;
}
[System.Xml.Serialization.XmlElementAttribute(Order=0)]
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");
}
}
}
[System.Xml.Serialization.XmlElementAttribute(Order=1)]
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");
}
}
}
[System.Xml.Serialization.XmlElementAttribute(Order=2)]
[System.ComponentModel.DefaultValueAttribute(UsageType.All)]
public UsageType Usage {
get {
return this.usageField;
}
set {
if ((usageField.Equals(value) != true)) {
this.usageField = value;
this.OnPropertyChanged("Usage");
}
}
}
[System.Xml.Serialization.XmlElementAttribute(Order=3)]
public WatermarkAppearanceType AppearanceOverride {
get {
return this.appearanceOverrideField;
}
set {
if ((this.appearanceOverrideField != null)) {
if ((appearanceOverrideField.Equals(value) != true)) {
this.appearanceOverrideField = value;
this.OnPropertyChanged("AppearanceOverride");
}
}
else {
this.appearanceOverrideField = value;
this.OnPropertyChanged("AppearanceOverride");
}
}
}
[System.Xml.Serialization.XmlElementAttribute(Order=4)]
public WatermarkTypePositionOverride PositionOverride {
get {
return this.positionOverrideField;
}
set {
if ((this.positionOverrideField != null)) {
if ((positionOverrideField.Equals(value) != true)) {
this.positionOverrideField = value;
this.OnPropertyChanged("PositionOverride");
}
}
else {
this.positionOverrideField = value;
this.OnPropertyChanged("PositionOverride");
}
}
}
[System.Xml.Serialization.XmlElementAttribute(Order=5)]
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(WatermarkType));
}
return serializer;
}
}
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
public virtual void OnPropertyChanged(string propertyName) {
System.ComponentModel.PropertyChangedEventHandler handler = this.PropertyChanged;
if ((handler != null)) {
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
}
}
#region Serialize/Deserialize
///
/// Serializes current WatermarkType 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 WatermarkType object
///
/// string workflow markup to deserialize
/// Output WatermarkType object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool Deserialize(string xml, out WatermarkType obj, out System.Exception exception) {
exception = null;
obj = default(WatermarkType);
try {
obj = Deserialize(xml);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool Deserialize(string xml, out WatermarkType obj) {
System.Exception exception = null;
return Deserialize(xml, out obj, out exception);
}
public static WatermarkType Deserialize(string xml) {
System.IO.StringReader stringReader = null;
try {
stringReader = new System.IO.StringReader(xml);
return ((WatermarkType)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
}
finally {
if ((stringReader != null)) {
stringReader.Dispose();
}
}
}
///
/// Serializes current WatermarkType 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 WatermarkType object
///
/// string xml file to load and deserialize
/// Output WatermarkType object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool LoadFromFile(string fileName, out WatermarkType obj, out System.Exception exception) {
exception = null;
obj = default(WatermarkType);
try {
obj = LoadFromFile(fileName);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool LoadFromFile(string fileName, out WatermarkType obj) {
System.Exception exception = null;
return LoadFromFile(fileName, out obj, out exception);
}
public static WatermarkType 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 WatermarkType object
///
public virtual WatermarkType Clone() {
return ((WatermarkType)(this.MemberwiseClone()));
}
#endregion
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.0.38968")]
[System.SerializableAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
public partial class WatermarkTypePositionOverride : System.ComponentModel.INotifyPropertyChanged {
[EditorBrowsable(EditorBrowsableState.Never)]
private PositionType itemField;
private static System.Xml.Serialization.XmlSerializer serializer;
[System.Xml.Serialization.XmlElementAttribute("TilePosition", typeof(TilePositionType), Order=0)]
[System.Xml.Serialization.XmlElementAttribute("XYPosition", typeof(XYPositionType), Order=0)]
public PositionType 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");
}
}
}
private static System.Xml.Serialization.XmlSerializer Serializer {
get {
if ((serializer == null)) {
serializer = new System.Xml.Serialization.XmlSerializer(typeof(WatermarkTypePositionOverride));
}
return serializer;
}
}
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
public virtual void OnPropertyChanged(string propertyName) {
System.ComponentModel.PropertyChangedEventHandler handler = this.PropertyChanged;
if ((handler != null)) {
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
}
}
#region Serialize/Deserialize
///
/// Serializes current WatermarkTypePositionOverride 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 WatermarkTypePositionOverride object
///
/// string workflow markup to deserialize
/// Output WatermarkTypePositionOverride object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool Deserialize(string xml, out WatermarkTypePositionOverride obj, out System.Exception exception) {
exception = null;
obj = default(WatermarkTypePositionOverride);
try {
obj = Deserialize(xml);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool Deserialize(string xml, out WatermarkTypePositionOverride obj) {
System.Exception exception = null;
return Deserialize(xml, out obj, out exception);
}
public static WatermarkTypePositionOverride Deserialize(string xml) {
System.IO.StringReader stringReader = null;
try {
stringReader = new System.IO.StringReader(xml);
return ((WatermarkTypePositionOverride)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
}
finally {
if ((stringReader != null)) {
stringReader.Dispose();
}
}
}
///
/// Serializes current WatermarkTypePositionOverride 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 WatermarkTypePositionOverride object
///
/// string xml file to load and deserialize
/// Output WatermarkTypePositionOverride object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool LoadFromFile(string fileName, out WatermarkTypePositionOverride obj, out System.Exception exception) {
exception = null;
obj = default(WatermarkTypePositionOverride);
try {
obj = LoadFromFile(fileName);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool LoadFromFile(string fileName, out WatermarkTypePositionOverride obj) {
System.Exception exception = null;
return LoadFromFile(fileName, out obj, out exception);
}
public static WatermarkTypePositionOverride 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 WatermarkTypePositionOverride object
///
public virtual WatermarkTypePositionOverride Clone() {
return ((WatermarkTypePositionOverride)(this.MemberwiseClone()));
}
#endregion
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.0.38968")]
[System.SerializableAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=true)]
public partial class WatermarkInstanceCollectionType : System.ComponentModel.INotifyPropertyChanged {
[EditorBrowsable(EditorBrowsableState.Never)]
private BindingList watermarkField;
private static System.Xml.Serialization.XmlSerializer serializer;
///
/// WatermarkInstanceCollectionType class constructor
///
public WatermarkInstanceCollectionType() {
this.watermarkField = new BindingList();
}
[System.Xml.Serialization.XmlElementAttribute("Watermark", Order=0)]
public BindingList Watermark {
get {
return this.watermarkField;
}
set {
if ((this.watermarkField != null)) {
if ((watermarkField.Equals(value) != true)) {
this.watermarkField = value;
this.OnPropertyChanged("Watermark");
}
}
else {
this.watermarkField = value;
this.OnPropertyChanged("Watermark");
}
}
}
private static System.Xml.Serialization.XmlSerializer Serializer {
get {
if ((serializer == null)) {
serializer = new System.Xml.Serialization.XmlSerializer(typeof(WatermarkInstanceCollectionType));
}
return serializer;
}
}
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
public virtual void OnPropertyChanged(string propertyName) {
System.ComponentModel.PropertyChangedEventHandler handler = this.PropertyChanged;
if ((handler != null)) {
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
}
}
#region Serialize/Deserialize
///
/// Serializes current WatermarkInstanceCollectionType 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 WatermarkInstanceCollectionType object
///
/// string workflow markup to deserialize
/// Output WatermarkInstanceCollectionType object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool Deserialize(string xml, out WatermarkInstanceCollectionType obj, out System.Exception exception) {
exception = null;
obj = default(WatermarkInstanceCollectionType);
try {
obj = Deserialize(xml);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool Deserialize(string xml, out WatermarkInstanceCollectionType obj) {
System.Exception exception = null;
return Deserialize(xml, out obj, out exception);
}
public static WatermarkInstanceCollectionType Deserialize(string xml) {
System.IO.StringReader stringReader = null;
try {
stringReader = new System.IO.StringReader(xml);
return ((WatermarkInstanceCollectionType)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
}
finally {
if ((stringReader != null)) {
stringReader.Dispose();
}
}
}
///
/// Serializes current WatermarkInstanceCollectionType 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 WatermarkInstanceCollectionType object
///
/// string xml file to load and deserialize
/// Output WatermarkInstanceCollectionType object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool LoadFromFile(string fileName, out WatermarkInstanceCollectionType obj, out System.Exception exception) {
exception = null;
obj = default(WatermarkInstanceCollectionType);
try {
obj = LoadFromFile(fileName);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool LoadFromFile(string fileName, out WatermarkInstanceCollectionType obj) {
System.Exception exception = null;
return LoadFromFile(fileName, out obj, out exception);
}
public static WatermarkInstanceCollectionType 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 WatermarkInstanceCollectionType object
///
public virtual WatermarkInstanceCollectionType Clone() {
return ((WatermarkInstanceCollectionType)(this.MemberwiseClone()));
}
#endregion
}
}