Пример #1
0
        /// <summary>
        /// creates c3addon file
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void CreateC3AddonButton_OnClick(object sender, RoutedEventArgs e)
        {
            if (AddonManager.CurrentAddon == null)
            {
                NotificationManager.PublishErrorNotification("error creating c3addon file, no c3addon selected");
                return;
            }

            AddonExporter.Insatnce.ExportAddon(AddonManager.CurrentAddon);
            ProcessHelper.Insatnce.StartProcess(OptionsManager.CurrentOptions.C3AddonPath);
            AddonManager.IncrementVersion();
            Build.Text = AddonManager.CurrentAddon.BuildVersion.ToString();
        }
Пример #2
0
        /// <summary>
        /// builds the c3addon zip file
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BuildSelectedAddon_Click(object sender, RoutedEventArgs e)
        {
            if (AddonListBox.SelectedIndex == -1)
            {
                NotificationManager.PublishErrorNotification("error building c3addon, no c3addon selected");
                return;
            }

            var currentAddon = (C3Addon)AddonListBox.SelectedItem;

            AddonManager.LoadAddon(currentAddon);
            AddonExporter.Insatnce.ExportAddon(AddonManager.CurrentAddon);
            ProcessHelper.Insatnce.StartProcess(OptionsManager.CurrentOptions.C3AddonPath);
            AddonManager.IncrementVersion();

            AddonManager.LoadAllAddons();
            AddonListBox.ItemsSource = AddonManager.AllAddons;
        }