示例#1
0
        public QMessage(QMessage _message)
        {
            Name    = _message.Name;
            Sender  = _message.Sender;
            Content = _message.Content;

            foreach (KeyValuePair <string, object> kvp in _message.dicDatas)
            {
                this [kvp.Key] = kvp.Value;
            }
        }
示例#2
0
        private void DispatchEvent(QMessage _message)
        {
            if (null == dicMessageEvents || !dicMessageEvents.ContainsKey(_message.Name))
            {
                return;
            }
            List <MessageEvnet> list = dicMessageEvents [_message.Name];

            for (int i = 0; i < list.Count; i++)
            {
                MessageEvnet messageEvent = list [i];
                if (null != messageEvent)
                {
                    messageEvent(_message);
                }
            }
        }
示例#3
0
 public void SendMessage(QMessage _message)
 {
     DispatchEvent(_message);
 }