Beispiel #1
0
        private void HandleConversationMessage(object sender, ConversationMessageEventArgs e)
        {
            foreach(var trigger in Triggers) {
                var match = GetTriggerRegex(trigger).Match(e.Message);

                if(!match.Success) {
                    continue;
                }

                MessageReceived(e.Sender, match.Groups["message"].Value);

                break;
            }
        }
Beispiel #2
0
 private void ConversationMessageReceived(object sender, ConversationMessageEventArgs e)
 {
     conversation.Text += string.Format(@"{0}: {1}" + Environment.NewLine, e.Sender.ToString(), e.Message);
 }
Beispiel #3
0
 protected virtual void OnConversationMessageReceived(ConversationMessageEventArgs e)
 {
     FireEvent(ConversationMessageReceived, e);
 }