Example #1
0
 static void qq_ShakeMessageEventHandler(Object sender, FokiteQQShakeMessageEvent e)
 {
     Console.WriteLine("抖动了!");
     Console.WriteLine("消息内容:{0}", e.Receiveresultset);
     qq.SendShake(e.Uin.ToString());
     Console.WriteLine("发送成功否?{0}", qq.SendMessage(e.Uin, e.ReplyMsgid, FokiteCore.messaGing("表抖啦~", new Random().Next(1, 100)), "宋体", new Random().Next(9, 23), "FF0080", true, false, true));
 }
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="notresolvejssring">未解析的字符串</param>
        /// <param name="jsstring">可供解析的字符串</param>
        internal FokiteQQGroupMessageEvent(String notresolvejssring, Object jsstring)
        {
            this.jsonengine       = jsstring;
            this.receiveresultset = notresolvejssring;

            if (Jsonengine == null)
            {
                return;
            }
            runinfo = (Dictionary <String, Object>)jsonengine;
            Object[] ects = (Object[])runinfo["result"];

            runinfo = (Dictionary <String, Object>)ects[0];
            runinfo = (Dictionary <String, Object>)runinfo["value"];

            ects = (Object[])runinfo["content"];
            runinfo["contents"] = FokiteCore.receiveMsgFormat(ects, ref ects, true);
            //runinfo["msgformat"] = ects;
        }
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="notresolvejssring">未解析的字符串</param>
        /// <param name="jsstring">可供解析的字符串</param>
        internal FokiteQQMessageEvent(String notresolvejssring, Object jsstring)
        {
            this.jsonengine       = jsstring;
            this.receiveresultset = notresolvejssring;

            if (Jsonengine == null)
            {
                return;
            }
            Dictionary <String, Object> dic = (Dictionary <String, Object>)jsonengine;

            Object[] ects = (Object[])dic["result"];
            dic = (Dictionary <String, Object>)ects[0];
            dic = (Dictionary <String, Object>)dic["value"];

            runinfo["from_uin"] = dic["from_uin"];
            runinfo["msg_id2"]  = dic["msg_id2"];
            runinfo["time"]     = FokiteCore.convertFromUnixTimestamp(Convert.ToDouble(dic["time"]));

            ects = (Object[])dic["content"];
            runinfo["content"]   = FokiteCore.receiveMsgFormat(ects, ref ects, true);
            runinfo["msgformat"] = ects;
        }
Example #4
0
 static void qq_GroupMessageEventHandler(Object sender, FokiteQQGroupMessageEvent e)
 {
     Console.ForegroundColor = ConsoleColor.Magenta;
     Console.Title           = String.Format("群的Gcode:{0}", e.Groupcode);
     Console.WriteLine("群消息:{0}\r\n{1}\r\n", e.Receiveresultset, new String('-', Console.WindowWidth));
     Console.WriteLine("回复消息成功么?:{0}", qq.SendGroupMessage(guin: e.Uin, msgid: e.ReplyMsgid, content: FokiteCore.messaGing("好的知道了!", Guid.NewGuid().ToString(), new Random().Next(1, 100).ToString()), fontname: "宋体", fontsize: new Random().Next(9, 23), fontcolor: "ff0080", b: false, u: true, i: false));
     Console.ResetColor();
 }