Exemple #1
0
        internal bool RaiseConfigurationObjectMemberLoadError(string memberName, string propertyName, object unformattedValue, Exception ex)
        {
            bool handled = OnConfigurationObjectMemberLoadError(memberName, propertyName, unformattedValue, ex);

            if (handled)
            {
                return(handled);
            }

            EventHandler <ChoConfigurationObjectMemberErrorEventArgs> configurationObjectMemberLoadError = ConfigurationObjectMemberLoadError;

            if (configurationObjectMemberLoadError != null)
            {
                ChoConfigurationObjectMemberErrorEventArgs configurationObjectMemberErrorEventArgs = new ChoConfigurationObjectMemberErrorEventArgs(memberName, propertyName, unformattedValue, ex);
                configurationObjectMemberLoadError(this, configurationObjectMemberErrorEventArgs);
                return(configurationObjectMemberErrorEventArgs.Handled);
            }

            return(false);
        }
 private void _appSettings_ConfigurationObjectMemberLoadError(object sender, Cinchoo.Core.Configuration.ChoConfigurationObjectMemberErrorEventArgs e)
 {
     MessageBox.Show(e.Exception.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Warning);
     e.Handled = true;
 }