示例#1
0
        void HandleTip(object sender, MFCChatMessageEventArgs e)
        {
            if (null != e.ChatMessage && !e.ChatMessage.IsTip)
                return;

            var tipMsg = e.ChatMessage.MessageData.Message;
            if (null != tipMsg && "" != tipMsg)
            {
                var match = Regex.Match(tipMsg, @"(\w*) has tipped (\w*) (\d*) tokens");
                var tip = new Tip() { Tipper = match.Groups[1].Value, Model = match.Groups[2].Value, Amount = Int32.Parse(match.Groups[3].Value) };
                Tips.Add(tip);
                OnTip(new MFCTipEventArgs() { Tip = tip });
            }
        }
示例#2
0
 protected virtual void OnChatMessageReceived(MFCChatMessageEventArgs e)
 {
     if (null != ChatMessageReceived)
         ChatMessageReceived(this, e);
 }