public bool Read()
{
bool b = false;
if (Info.Exists)
{
fs = new FileStream(Info.FullName, FileMode.Open, FileAccess.ReadWrite);
pt = Plist.getPlistType(fs);
IsBinary = pt == plistType.Binary;
fs.Position = 0;
try
{
object obj = Plist.readPlist(fs, pt);
Content = Plist.writeXml(obj);
b = true;
}
catch (Exception ex)
{
Debug.WriteLine(ex);
try
{
if (fs != null && pt == plistType.Xml)
{
fs.Position = 0;
byte[] bytes = new byte[(int)fs.Length];
if (fs.Read(bytes, 0, bytes.Length)>0)
{
Content = Encoding.UTF8.GetString(bytes);
}
}
}
catch (Exception exx)
{
Debug.WriteLine(exx);
}
}
}
return b;
}