Ejemplo n.º 1
0
 private void ForwardMessage(stMsg outMsg, stMsgRecs outRecs, int[] recs, stMsgRich outMsgRich, List <stMsgRichFormat> outRichList, int listLength)
 {
     outMsg.Header.Size = 13 + (uint)outMsg.Message.Length;
     if (outRichList.Count > 0)
     {
         outMsg.Header.Size += (uint)listLength + 3;
     }
     if (recs.Length > 0)
     {
         outMsg.Header.Size += (uint)(5 + (4 * recs.Length));
     }
     ForwardData(RawSerialize(outMsg), 21 + outMsg.Message.Length);
     if (recs.Length > 0)
     {
         ForwardData(RawSerialize(outRecs), 5);
         for (int i = 0; i < recs.Length; i++)
         {
             ForwardData(RawSerialize(recs[i]));
         }
     }
     if (outRichList.Count > 0)
     {
         ForwardData(RawSerialize(outMsgRich), 3);
         outRichList.ForEach(delegate(stMsgRichFormat formatItem) {
             int rgbOffset = (formatItem.RGB != null) ? 6 : 3;
             ForwardData(RawSerialize(formatItem), rgbOffset);
         });
     }
     return;
 }
Ejemplo n.º 2
0
        private stMsgRecs BuildRecipientsInfo(int recsCount)
        {
            stMsgRecs outRecs = new stMsgRecs();

            outRecs.Flag            = (byte)OUT_MESSAGE_CONFERENCE_FLAG;
            outRecs.RecipientsCount = (uint)recsCount;
            return(outRecs);
        }
Ejemplo n.º 3
0
        private void BuildMessage(int recNum, string msg, int[] recs, SortedDictionary <short, string> msgFormat, bool conference)
        {
            stMsg     outMsg     = BuildMsgInfo((uint)recs[recNum], msg);
            stMsgRecs outMsgRecs = BuildRecipientsInfo(recs.Length);
            int       listLength;
            List <stMsgRichFormat> outMsgRichFormat = BuildRichText(ref msgFormat, out listLength);
            stMsgRich outMsgRich = BuildRichInfo(listLength);

            if (!conference)
            {
                ForwardMessage(outMsg, new stMsgRecs(), new int[0], outMsgRich, outMsgRichFormat, listLength);
            }
            else
            {
                ForwardMessage(outMsg, outMsgRecs, recs, outMsgRich, outMsgRichFormat, listLength);
            }
        }