ConfigurationEventArgs
class
private void ConfigurationPostEventHandler(object src, ConfigurationEventArgs args) { if (this.statusCheckListBox.Items.Count > 0) { this.statusCheckListBox.SetItemChecked(this.statusCheckListBox.Items.Count - 1, true); } this.statusCheckListBox.Refresh(); }
private void ConfigurationPreEventHandler(object src, ConfigurationEventArgs args) { this.statusCheckListBox.Items.Add(args.Message); if (this.statusCheckListBox.Items.Count > 0) { this.statusCheckListBox.SelectedItem = this.statusCheckListBox.Items[this.statusCheckListBox.Items.Count - 1]; } this.statusCheckListBox.Refresh(); }
private void ConfigurationEventException(object sender, ConfigurationEventArgs args) { MessageBox.Show(string.Format(CultureInfo.CurrentCulture, args.Message), string.Format(CultureInfo.CurrentCulture, Resources.ExceptionCaption), MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, 0); }