private void ShowMessage(Message message) { MessageText = message.MessageText; ColorCode = MessageService.Instance.GetColorCode(message.MessageType); }
public void ClearMessage() { Message message = new Message(); ColorCode = MessageService.Instance.GetColorCode(message.MessageType); ErrorMessage = message.MessageText; }
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); }