public void Log(CultureStringsBase message, MessageType messageType = MessageType.Default, IEnumerable <Object> formatList = null, ConsoleColor?messageColor = null, Int32 priority = 0, MessageAdditions messageAdditions = MessageAdditions.None) { LogMessage logMessage = new LogMessage(message, messageType, formatList, messageColor, priority, messageAdditions); Messages.Add(logMessage); Logged?.Invoke(logMessage); }
public DropDownItem(CultureStringsBase text, Image image = null) { Value = text; Image = image ?? new Bitmap(16, 16); using Graphics graphics = Graphics.FromImage(Image); using Brush brush = new SolidBrush(Color.FromName(text)); graphics.DrawRectangle(Pens.White, 0, 0, Image.Width, Image.Height); graphics.FillRectangle(brush, 1, 1, Image.Width - 1, Image.Height - 1); }
public LogMessage(CultureStringsBase message, MessageType messageType = MessageType.Default, IEnumerable <Object> data = null, ConsoleColor?messageColor = null, Int32 priority = 0, MessageAdditions messageAdditions = MessageAdditions.CurrentTime, Boolean newLine = true) { Message = message; Data = data?.ToArray(); MessageType = messageType; MessageColor = messageColor ?? MessageColors[MessageType]; Priority = priority; MessageAdditions = messageAdditions; NewLine = newLine; DateTime = DateTime.Now; }