/// <summary> /// removes the selected addon /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void DeleteSelectedAddon_Click(object sender, RoutedEventArgs e) { if (AddonListBox.SelectedIndex == -1) { NotificationManager.PublishErrorNotification("error removing c3addon, no c3addon selected"); return; } var currentAddon = (C3Addon)AddonListBox.SelectedItem; AddonManager.DeleteAddon(currentAddon); AddonListBox.ItemsSource = AddonManager.AllAddons; AddonListBox.Items.Refresh(); NotificationManager.PublishNotification($"addon removed successfully"); }