コード例 #1
0
ファイル: GGEngine.cs プロジェクト: DamiaX/shgg
 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;
 }
コード例 #2
0
ファイル: GGEngine.cs プロジェクト: DamiaX/shgg
        private stMsgRecs BuildRecipientsInfo(int recsCount)
        {
            stMsgRecs outRecs = new stMsgRecs();

            outRecs.Flag            = (byte)OUT_MESSAGE_CONFERENCE_FLAG;
            outRecs.RecipientsCount = (uint)recsCount;
            return(outRecs);
        }
コード例 #3
0
ファイル: GGEngine.cs プロジェクト: DamiaX/shgg
        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);
            }
        }