public void SavePosition(AjustPositionInfo info) { if (Path == null) { return; } if (PosFile == null) { PosFile = new PingFile(ProjectName, "pos"); PosFile.SetPath(new DirectoryInfo(Path)); PosFile.Create(info.raw.PingNum); PosFile.Write(info.SavePackage()); return; } if (PosFile.PingID != info.raw.PingNum) //新的ping号 { PosFile.Close(); PosFile.Create(info.raw.PingNum); } PosFile.Write(info.SavePackage()); }
public void SaveAD(ADInfo info) { if (Path == null) { return; } if (ADFile == null) { ADFile = new PingFile(ProjectName, "ad"); ADFile.SetPath(new DirectoryInfo(Path)); ADFile.Create(info.PingNum); ADFile.Write(info.SavePackage()); return; } if (ADFile.PingID != info.PingNum) //新的ping号 { ADFile.Close(); ADFile.Create(info.PingNum); } ADFile.Write(info.SavePackage()); }
public void SavePosition(AjustPositionInfo info) { if (Path == null) return; if (PosFile == null) { PosFile = new PingFile(ProjectName, "pos"); PosFile.SetPath(new DirectoryInfo(Path)); PosFile.Create(info.raw.PingNum); PosFile.Write(info.SavePackage()); return; } if (PosFile.PingID != info.raw.PingNum) //新的ping号 { PosFile.Close(); PosFile.Create(info.raw.PingNum); } PosFile.Write(info.SavePackage()); }
public void SaveAD(ADInfo info) { if (Path == null) return; if (ADFile == null) { ADFile = new PingFile(ProjectName,"ad"); ADFile.SetPath(new DirectoryInfo(Path)); ADFile.Create(info.PingNum); ADFile.Write(info.SavePackage()); return; } if (ADFile.PingID != info.PingNum) //新的ping号 { ADFile.Close(); ADFile.Create(info.PingNum); } ADFile.Write(info.SavePackage()); }