Beispiel #1
0
        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);
        }
Beispiel #2
0
 public static TimeSpan AliveSince(this Data_Net__00NormalMessage c)
 {
     return(DateTime.UtcNow - new DateTime(c.MsgTicks, DateTimeKind.Utc));
 }
Beispiel #3
0
 private static string TickText(Data_Net__00NormalMessage c)
 {
     return((new DateTime(c.MsgTicks)).ToString("ddMMyyyy"));
 }
Beispiel #4
0
 public static string UniqueId(this Data_Net__00NormalMessage c)
 {
     return(c.MsgTicks.ToString() + "_" + TickText(c) + "_" + c.UserId);
 }