private void Add_Click(object sender, RoutedEventArgs e) { var dlg = new EtwProviderWindow(new EtwProvider()); dlg.Owner = this; if (!dlg.ShowDialog().GetValueOrDefault()) { return; } bool added = App.Current.Settings.AddEtwProvider(dlg.Provider); App.Current.Settings.SerializeToConfiguration(); if (added) { _context.Providers.Add(dlg.Provider); } }
private void ModifyProvider(EtwProvider provider) { if (provider == null) { return; } var dlg = new EtwProviderWindow(provider.Clone()); dlg.Owner = this; if (!dlg.ShowDialog().GetValueOrDefault()) { return; } App.Current.Settings.AddEtwProvider(dlg.Provider); App.Current.Settings.SerializeToConfiguration(); }