예제 #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);
 }