public static String getMessageText(ExceptionsMessages msg, params Object[] args) { String message; switch (msg) { case ExceptionsMessages.ERROR_FILESYSTEM_NOTALLOW_SIZE: message = String.Format(Properties.Resources.ERROR_FILESYSTEM_NOTALLOW_SIZE, args); break; case ExceptionsMessages.ERROR_MINIMUN_PART_SIZE: message = string.Format(Properties.Resources.ERROR_MINIMUN_PART_SIZE, args); break; case ExceptionsMessages.ERROR_NO_SPACE_TO_SPLIT: message = Properties.Resources.ERROR_NO_SPACE_TO_SPLIT; break; case ExceptionsMessages.ERROR_OPENING_FILE: message = String.Format(Properties.Resources.ERROR_OPENING_FILE, args); break; case ExceptionsMessages.ERROR_TOTALSIZE_NOTEQUALS: message = Properties.Resources.ERROR_TOTALSIZE_NOTEQUALS; break; default: message = string.Empty; break; } return(message); }
/// <summary> /// Launch Split Message event /// </summary> /// <param name="msg"></param> /// <param name="type"></param> private void onMessage(ExceptionsMessages msg, params Object[] parameters) { if (message != null) { message(this, new MessageArgs(msg, parameters)); } }
private void AddException(Exception exception) { if (exception == null) { return; } ExceptionsMessages.Add(exception.Message); StackTracers.Add(exception.StackTrace); if (exception.InnerException != null) { AddException(exception.InnerException); } }
public bool ProcessLetter(char letter, out Node nextNode) { nextNode = this; var ticket = _queueBehaviour.GetNextTicket(); if (ticket is null) { Debug.Log(ExceptionsMessages.FilaVazia); return(false); } var command = Commands.FirstOrDefault(x => x.IsCommandForTicket(ticket) && x.ProcessedLetter == letter); if (command is null) { Debug.Log(ExceptionsMessages.SemComandoParaBrinquedoETicket(letter, ticket.Letter)); return(false); } nextNode = command.Node; return(_queueBehaviour.AddTickets(command.PoppedTicket, command.PushedTickets)); }
public static MessageBoxIcon getMessageIcon(ExceptionsMessages msg) { MessageBoxIcon icon; switch (msg) { case ExceptionsMessages.ERROR_NO_SPACE_TO_SPLIT: case ExceptionsMessages.ERROR_OPENING_FILE: icon = MessageBoxIcon.Hand; break; case ExceptionsMessages.ERROR_FILESYSTEM_NOTALLOW_SIZE: case ExceptionsMessages.ERROR_MINIMUN_PART_SIZE: case ExceptionsMessages.ERROR_TOTALSIZE_NOTEQUALS: icon = MessageBoxIcon.Error; break; default: icon = MessageBoxIcon.Information; break; } return(icon); }
/// <summary> /// Constructor for the message /// </summary> /// <param name="message"></param> /// <param name="type"></param> public MessageArgs(ExceptionsMessages message, Object[] parameters) { this.Message = message; this.Parameters = parameters; }