private void ShowMessage(Message message)
 {
     MessageText = message.MessageText;
     ColorCode = MessageService.Instance.GetColorCode(message.MessageType);
 }
示例#2
0
 public void ClearMessage()
 {
     Message message = new Message();
     ColorCode = MessageService.Instance.GetColorCode(message.MessageType);
     ErrorMessage = message.MessageText;
 }
示例#3
0
        public void ManagerEventHandler(object sender, BLLEventArgs eventArgs)
        {
            string messageText;

            if (!IsEventForMessage(eventArgs, out messageText)) return;

            //string messageText = ConfigValues.Get(eventArgs.MessageKey);

            if (eventArgs.Parameters != null && eventArgs.Parameters.Count > 0)
            {
                foreach (var pair in eventArgs.Parameters)
                {
                    messageText = messageText.Replace("${" + pair.Key + "}$", pair.Value);
                }
            }
            Message newMessage = new Message
                                     {
                                         IsRead = false,
                                         MessageText = messageText,
                                         MessageType = ConvertToMessageType(eventArgs.EventType)
                                     };
            MessageQueue.Add(newMessage);
        }