public class ActiveWidgetInfo
{
public int Bottom { get; set; }
public int Height { get; set; }
public int Left { get; set; }
public int Right { get; set; }
public int Top { get; set; }
public int Width { get; set; }
public int X { get; set; }
public int Y { get; set; }
public string ToXml()
{
XmlSerializer xs = new XmlSerializer(typeof(ActiveWidgetInfo));
StringBuilder sb = new StringBuilder();
using (XmlWriter w = XmlWriter.Create(sb))
{
xs.Serialize(w, this);
w.Flush();
return sb.ToString();
}
}
public static ActiveWidgetInfo FromXml(string xml)
{
XmlSerializer xs = new XmlSerializer(typeof(ActiveWidgetInfo));
using (StringReader r = new StringReader(xml))
{
return xs.Deserialize(r) as ActiveWidgetInfo;
}
}
}
{
public int Bottom { get; set; }
public int Height { get; set; }
public int Left { get; set; }
public int Right { get; set; }
public int Top { get; set; }
public int Width { get; set; }
public int X { get; set; }
public int Y { get; set; }
public string ToXml()
{
XmlSerializer xs = new XmlSerializer(typeof(ActiveWidgetInfo));
StringBuilder sb = new StringBuilder();
using (XmlWriter w = XmlWriter.Create(sb))
{
xs.Serialize(w, this);
w.Flush();
return sb.ToString();
}
}
public static ActiveWidgetInfo FromXml(string xml)
{
XmlSerializer xs = new XmlSerializer(typeof(ActiveWidgetInfo));
using (StringReader r = new StringReader(xml))
{
return xs.Deserialize(r) as ActiveWidgetInfo;
}
}
}