public ValidationMessageAddedEventArgs(ValidationMessage message)
 {
     Messages = new[] { message };
 }
        /// <summary>
        /// Fill the ListView with the Validationmessagedetails
        /// </summary>
        private void fillListView()
        {
            validationMessagesListView.BeginUpdate();

            //Delete the old validation messages
            foreach (ListViewItem item in validationMessagesListView.Items)
            {
                validationMessagesListView.Items.Remove(item);
            }

            //Iterate over the validation messages generated by the different validatiors
            //and add the message to the grid
            String selectedLevel = "";

            if (levelSelector.SelectedItem != null)
            {
                selectedLevel = levelSelector.SelectedItem.ToString();
            }

            if (validationMessages != null && validationMessages.Count != 0)
            {
                foreach (ValidationMessage message in validationMessages)
                {
                    if (selectedLevel == "" || selectedLevel.ToUpper() == "ALL")
                    {
                        addValidationMessageToList(message);
                    }
                    else if (selectedLevel.ToUpper() == "INFO")
                    {
                        if (message.ErrorLevel == ValidationMessage.errorLevelTypes.INFO)
                        {
                            addValidationMessageToList(message);
                        }
                    }
                    else if (selectedLevel.ToUpper() == "WARN")
                    {
                        if (message.ErrorLevel == ValidationMessage.errorLevelTypes.WARN)
                        {
                            addValidationMessageToList(message);
                        }
                    }
                    else if (selectedLevel.ToUpper() == "ERROR")
                    {
                        if (message.ErrorLevel == ValidationMessage.errorLevelTypes.ERROR)
                        {
                            addValidationMessageToList(message);
                        }
                    }
                }
            }
            else
            {
                //No validation messages returned - the validation was successful
                var successMessage = new ValidationMessage("No errors found.", "No errors were found in your model", "-",
                                                           ValidationMessage.errorLevelTypes.INFO, 0);
                if (validationMessages == null)
                {
                    validationMessages = new List <ValidationMessage>();
                }

                validationMessages.Add(successMessage);
                addValidationMessageToList(successMessage);
            }

            validationMessagesListView.EndUpdate();
        }