Example #1
0
 private void AddPackage(object sender, System.EventArgs e)
 {
     ofd.Filter = "Sims 2 Package (*.package)|*.package|All Files (*.*)|*.*";
     if (ofd.ShowDialog() == DialogResult.OK)
     {
         SimPe.Packages.GeneratableFile package = GeneratableFile.LoadFromFile(ofd.FileName);
         S2CPDescriptor s2cp = new S2CPDescriptor(package, "", "", "", "", Sims2CommunityPack.DEFAULT_COMPRESSION_STRENGTH, new S2CPDescriptorBase[0], extension);
         lblist.Items.Add(s2cp);
         lblist.SelectedIndex = lblist.Items.Count - 1;
     }
 }
Example #2
0
 private void AddPackage(object sender, System.EventArgs e)
 {
     ofd.Filter = "Sims 2 Package (*.package)|*.package|All Files (*.*)|*.*";
     if (ofd.ShowDialog() == DialogResult.OK)
     {
         SimPe.Packages.GeneratableFile package = GeneratableFile.LoadFromFile(ofd.FileName);
         S2CPDescriptorBase             s2cpb   = new S2CPDescriptorBase(package);
         if (s2cpb.Guid == null)
         {
             MessageBox.Show("This Package does not contain a valid GlobalGUID.\nYou can create on by including this File in a diffren Sims2Community Package or by adding a 'Sims2Comunity Identifier' to the Package.");
         }
         else
         {
             lblist.Items.Add(s2cpb);
         }
     }
 }