protected void SendWarning(string format, params object[] args) { if (Warning != null) { ClientsConverterEventArgs cea = new ClientsConverterEventArgs(); cea.Message = string.Format(CultureInfo.CurrentUICulture, format, args); Warning(this, cea); if (cea.Cancel) { throw new ClientsConverterException("Conversion has been canceled by user."); } } }
void OnClientsConverterWarning(object sender, ClientsConverterEventArgs e) { if (e != null) { SendWarning(e.Message); } }