BarLayoutXmlSerializer Class
Serializes BarManager layouts to XML.
public class BarLayoutXmlSerializer
- Inheritance:
- object object
Properties
BarManager
Gets the BarManager to that is managing the layout.
public BarManager BarManager { get; }
Property Value
- BarManager:
The BarManager to that is managing the layout.
IsComplete
Gets whether to load/save a complete layout.
public bool IsComplete { get; }
Property Value
- bool:
true
if a complete layout should be loaded/saved; otherwise, a differential layout should be loaded/saved.
Reader
Gets the System.Xml.XmlReader to use for reading data.
public XmlReader Reader { get; }
Property Value
- XmlReader:
The System.Xml.XmlReader to use for reading data.
Writer
Gets the System.Xml.XmlWriter to use for writing data.
public XmlWriter Writer { get; }
Property Value
- XmlWriter:
The System.Xml.XmlWriter to use for writing data.
Methods
GetImageFromString(string)
Gets an Image from a base-64 encoded string.
public Image GetImageFromString(string imageData)
Parameter | Type | Description |
---|---|---|
imageData | string | The encoded string to examine. |
Returns
GetStringFromImage(Image)
Gets a base-64 encoded string representing an Image.
public string GetStringFromImage(Image image)
Parameter | Type | Description |
---|---|---|
image | Image | The Image to encode. |
Returns
ReadBooleanAttribute(string, string, bool)
Reads a node for a boolean attribute value.
public bool ReadBooleanAttribute(string tagName, string attributeName, bool defaultValue)
Parameter | Type | Description |
---|---|---|
tagName | string | The name of the tag being examined. |
attributeName | string | The name of the attribute whose value is being returned. |
defaultValue | bool | The default value to return if the attribute is not specified. |
Returns
ReadDefaultableBooleanAttribute(string, string, DefaultableBoolean)
Reads a node for a DefaultableBoolean attribute value.
public DefaultableBoolean ReadDefaultableBooleanAttribute(string tagName, string attributeName, DefaultableBoolean defaultValue)
Parameter | Type | Description |
---|---|---|
tagName | string | The name of the tag being examined. |
attributeName | string | The name of the attribute whose value is being returned. |
defaultValue | DefaultableBoolean | The default value to return if the attribute is not specified. |
Returns
ReadIntegerAttribute(string, string, int)
Reads a node for an integer attribute value.
public int ReadIntegerAttribute(string tagName, string attributeName, int defaultValue)
Parameter | Type | Description |
---|---|---|
tagName | string | The name of the tag being examined. |
attributeName | string | The name of the attribute whose value is being returned. |
defaultValue | int | The default value to return if the attribute is not specified. |
Returns
ReadPointAttribute(string, string, Point)
Reads a node for a Point attribute value.
public Point ReadPointAttribute(string tagName, string attributeName, Point defaultValue)
Parameter | Type | Description |
---|---|---|
tagName | string | The name of the tag being examined. |
attributeName | string | The name of the attribute whose value is being returned. |
defaultValue | Point | The default value to return if the attribute is not specified. |
Returns
ReadRectangleAttribute(string, string, Rectangle)
Reads a node for a Rectangle attribute value.
public Rectangle ReadRectangleAttribute(string tagName, string attributeName, Rectangle defaultValue)
Parameter | Type | Description |
---|---|---|
tagName | string | The name of the tag being examined. |
attributeName | string | The name of the attribute whose value is being returned. |
defaultValue | Rectangle | The default value to return if the attribute is not specified. |
Returns
ReadRequiredAttribute(string, string)
Reads a node for a required attribute and throws an exception if it doesn't exist.
public string ReadRequiredAttribute(string tagName, string attributeName)
Parameter | Type | Description |
---|---|---|
tagName | string | The name of the tag being examined. |
attributeName | string | The name of the attribute whose value is being returned. |
Returns
ReadSizeAttribute(string, string, Size)
Reads a node for a Size attribute value.
public Size ReadSizeAttribute(string tagName, string attributeName, Size defaultValue)
Parameter | Type | Description |
---|---|---|
tagName | string | The name of the tag being examined. |
attributeName | string | The name of the attribute whose value is being returned. |
defaultValue | Size | The default value to return if the attribute is not specified. |
Returns
ReadStringAttribute(string, string, string)
Reads a node for a string attribute value.
public string ReadStringAttribute(string tagName, string attributeName, string defaultValue)
Parameter | Type | Description |
---|---|---|
tagName | string | The name of the tag being examined. |
attributeName | string | The name of the attribute whose value is being returned. |
defaultValue | string | The default value to return if the attribute is not specified. |
Returns
ThrowException(string)
Throws a basic exception.
public void ThrowException(string message)
Parameter | Type | Description |
---|---|---|
message | string | The message to include in the exception. |
ThrowUnrecognizedTagException(string)
Throws a exception when an unrecognized tag is located.
public void ThrowUnrecognizedTagException(string parentTagName)
Parameter | Type | Description |
---|---|---|
parentTagName | string | The name of the parent tag where the problem occurred. |