public void DeleteQueryClick()
        {
            var result = _messageBoxView.AskYesNoQuestion(_view, "Are you sure?", Core.Application.NameAndVersion);

            if (result == DialogResult.Yes)
            {
                try
                {
                    _model.RemoveQuery(_model.SelectedQuery);
                }
                catch (ArgumentException ex)
                {
                    _messageBoxView.ShowError(_view, ex.Message, Core.Application.NameAndVersion);
                }
            }
        }
        private bool ValidateAcceptance()
        {
            SetPropertyErrorState();
            // Check for error conditions
            if (SettingsModel.NameError ||
                SettingsModel.FahLogFileNameError ||
                SettingsModel.UnitInfoFileNameError ||
                SettingsModel.QueueFileNameError ||
                SettingsModel.ServerError ||
                SettingsModel.PortError ||
                SettingsModel.CredentialsError ||
                SettingsModel.PathEmpty)
            {
                _messageBoxView.ShowError(_settingsView,
                                          "There are validation errors.  Please correct the yellow highlighted fields.",
                                          Core.Application.NameAndVersion);
                return(false);
            }

            if (SettingsModel.PathError)
            {
                if (_messageBoxView.AskYesNoQuestion(_settingsView,
                                                     "There are validation errors.  Do you wish to accept the input anyway?",
                                                     Core.Application.NameAndVersion) == DialogResult.Yes)
                {
                    return(true);
                }

                return(false);
            }

            return(true);
        }