标签:help nec rar time env row oda except list
protected override void OnClosing(CancelEventArgs e)
{
// XmlParaHelper.Write(vm.ParaInfor);
var para = vm.ParaInfor;
if (para != null)
{
XmlSerializeHelper.XmlSerializeToFile(para, vm.Path, Encoding.UTF8);
}
base.OnClosing(e);
}
public string Path = "C:\\Users\\" + Environment.UserName + "\\AppData\\Roaming\\ParaInfor.xml";
public static List<int> BaudRateSetList = new List<int> { 9600, 19200, 115200 };
DataTable dt = ParaToDataTableHelper.GetDataTable();
public SerialPortViewModel()
{
PortNameList = PortData.SerialsIsConnected();
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 !");
}
// ParaInfor = XmlParaHelper.ParaRead<ParaInfor>();
}
dt.Columns.Add("日期", typeof(DateTime));
标签:help nec rar time env row oda except list
原文地址:http://www.cnblogs.com/MiLu/p/6664932.html