Beispiel #1
0
        /// <summary>
        /// creates a copy of the selected addon
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void DuplicateSelectedAddon_Click(object sender, RoutedEventArgs e)
        {
            if (AddonListBox.SelectedIndex == -1)
            {
                NotificationManager.PublishErrorNotification("error duplicating c3addon, no c3addon selected");
                return;
            }

            var currentAddon = (C3Addon)AddonListBox.SelectedItem;

            AddonManager.DuplicateAddon(currentAddon);
            AddonListBox.ItemsSource = AddonManager.AllAddons;
            AddonListBox.Items.Refresh();

            NotificationManager.PublishNotification($"addon duplicated successfully");
        }