コード例 #1
0
        public static int Read(byte[] buf, int c, DisplayTextMessage dtm)
        {
            dtm.MessageVersionNumber = buf[c];
            dtm.AckNumber = BitConverter.ToUInt16(buf, c + 1);
            dtm.LinesOfText = buf[c + 3];

            c += 4;
            for (byte i = 0; i < dtm.LinesOfText; ++i)
            {
                var tm = new TextMessage();
                c = TextMessage.Read(buf, c, tm);
                dtm.TextMessages.Add(tm);
            }

            return c;
        }
コード例 #2
0
 public static DisplayTextMessage Read(byte[] buf)
 {
     var dtm = new DisplayTextMessage();
     Read(buf, 0, dtm);
     return dtm;
 }