///// <summary> ///// Designed to only be called from the PackSettingsItem class. ///// </summary> ///// <param name="pack"></param> //public void SavePack(PackClass pack) //{ // //get existing pack info from _formoptions (need the version for merging) // PackClass existingPack = (ParentForm as FormOptions).GetPackInfoFromPackName(pack.Name); // //merges the version with the new information // (ParentForm as FormOptions).Settings.SavePackInfo(new PackClass(pack.Name, existingPack.Version, pack.DownloadUrl, pack.VersionUrl)); //} public void RemovePack(PackSettingsItem packItem) { //(this.Parent as FormOptions).deletePackFromXml(packItem.PackName); _items.Remove(packItem); flowLayoutPanel1.Controls.Remove(packItem); }
/// <summary> /// Adds a pack to the internal list, and to the gui list. Does NOT save to file /// </summary> /// <param name="newPack"></param> public void AddPack(PackClass newPack) { PackSettingsItem newItem = new PackSettingsItem(newPack.Name, newPack.DownloadUrl, newPack.VersionUrl, this); _items.Add(newItem); flowLayoutPanel1.Controls.Add(newItem); }