public sendBack(bool s, string q, string m, polltype t) { send = s; qq = q; message = m; size = "10"; color = "000000"; font = "宋体"; type = t; }
public ReceiveMsg(bool call, string tq, string fq, string m, polltype t) { type = t; called = call; to_qq = tq; from_qq = fq; message = m; size = "10"; color = "000000"; font = "宋体"; senderUin = from_qq; }
public ReceiveMsg(bool call, string tq, string fq, string m, string t) { switch (t) { case "\"message\"": type = polltype.message; break; case "\"discu_message\"": type = polltype.discu_message; break; case "\"group_message\"": type = polltype.group_message; break; default: type = polltype.none; break; } called = call; to_qq = tq; from_qq = fq; message = m; size = "10"; color = "000000"; font = "宋体"; senderUin = from_qq; }
/// <summary> /// 可以用来打包返回类型 /// </summary> /// <param name="t">返回消息的类型,polltype枚举</param> /// <param name="send">是否发送消息,如果不需要发送消息则设置false,或者直接返回默认包dontsent</param> /// <param name="qq">发送给的qq,如果是群或讨论组则为群或组号</param> /// <param name="message">需要发送的消息,注意有些特殊符号需要解码</param> /// <returns></returns> protected sendBack packSendBack(polltype t, bool send = false, string qq = "", string message = "") { return(new sendBack(send, qq, message, t)); }