Пример #1
0
 private void btnUninstallMod_Click(object sender, EventArgs e)
 {
     if (lstInstalledMods.SelectedItem != null)
     {
         SetStatus("Uninstalling mod...", false);
         var pkg = (KspPackage)lstInstalledMods.SelectedItem;
         new Thread(delegate()
         {
             mods.UninstallMod(pkg);
             this.Invoke((Action) delegate
             {
                 lstInstalledMods.Items.Remove(pkg);
                 lstAvailableMods.Items.Add(pkg);
                 SetStatus("Done!", true);
             });
         }).Start();
     }
 }