private void S_nugetShortSelectedEvent(NuGetPacketShort sender) { NuGetPacketShort ng = sender as NuGetPacketShort; if (ng == null) { return; } IPackage package = ng.package; if (package == null) { return; } if (ns == null) { ns = new NuGetPacketInfo(vs); ns.Dock = DockStyle.Fill; //sp.Panel2.Controls.Clear(); sp.Panel2.Controls.Add(ns); } bool isInstalled = false; foreach (IPackage p in InstalledPackages) { if (p.GetFullName() == package.GetFullName()) { isInstalled = true; break; } } ns.LoadPackage(package, repo, tasks, isInstalled); }
private void EmptyNuGetInfo() { sp.Panel2.Controls.Clear(); sp.Panel2.Refresh(); ns = null; }