public static ASPTrayBase ReadOne(string filePath, IMyLog log) { if (!s_MsgFile_IsOld(filePath)) { using (BinaryReader br = new BinaryReader(OpenFile.ForRead(filePath, true, false, log))) { return(ASPTrayBase.ReadOne(br)); } } return(null); }
private void NetFrom_V2(BinaryReader br) { Int32 count = br.ReadInt32(); for (Int32 i = 0; i < count; i++) { ASPTrayBase f1 = ASPTrayBase.ReadOne(br); if (f1 != null) { ObjectList.Add(f1); } } }
public static ASPTrayBase ReadOne(BinaryReader br) { ASPTrayBase r = null; Int32 i32 = br.ReadInt32(); eASPtrayType e = (eASPtrayType)i32; switch (e) { case eASPtrayType.NormalMessage: r = new Data_Net__00NormalMessage(br); break; case eASPtrayType.NormalMessageResult: r = new Data_Net__01NormalMessageResult(br); break; case eASPtrayType.ScreenShotRequest: r = new Data_Net__02ScreenshotRequest(br); break; case eASPtrayType.ScreenShotResult: r = new Data_Net__03ScreenshotResult(br); break; case eASPtrayType.CheckTelNumbers: r = new Data_Net__04CheckTelNumbers(br); break; case eASPtrayType.CheckTelNumbersResult: r = new Data_Net__05CheckTelNumbersResult(br); break; default: throw new IOException("File format not supported"); } return(r); }
public override string GetFileName() { return(ASPTrayBase.s_MsgFile_GetFileName(MsgTicks, UserId)); }