public void AddMessage(nHydrate.Generator.Common.GeneratorFramework.Message message) { var newItem = new ListViewItem(); newItem.Tag = message; //Image if (message.MessageType == MessageTypeConstants.Warning) { newItem.ImageIndex = 0; } else if (message.MessageType == MessageTypeConstants.Error) { newItem.ImageIndex = 1; } //Error Number newItem.SubItems.Add((this.Items.Count + 1).ToString()); //Message newItem.SubItems.Add(message.Text); //Type Column if (message.Controller != null) { var typeName = message.Controller.Object.GetType().ToString(); var typeNameArr = typeName.Split('.'); typeName = typeNameArr[typeNameArr.Length - 1]; newItem.SubItems.Add(typeName); } else { newItem.SubItems.Add(string.Empty); } //Add to the list this.Items.Add(newItem); }
public MessageEventArgs(Message message) { _message = message; }