public string Path = "C:\Users\" + Environment.UserName + "\AppData\Roaming\ParaInfor.xml";
if (Path != null)
{
if (XmlSerializeHelper.Load(Path) == null)
{
XmlSerializeHelper.XmlSerializeToFile(ParaInfor, Path, Encoding.UTF8);
}
else
{
ParaInfor = XmlSerializeHelper.XmlDeserializeFromFile<ParaInfor>(Path, Encoding.UTF8);
}
}
else
{
throw new Exception("path null !");
}
var para = vm.ParaInfor;
if (para != null)
{
XmlSerializeHelper.XmlSerializeToFile(para, vm.Path, Encoding.UTF8);
}