public PackageClass()
 {
   Groups = new GroupItemCollection();
   Sections = new SectionItemCollection();
   GeneralInfo = new GeneralInfoItem();
   UniqueFileList = new FileItemCollection();
   Version = "2.0";
   ZipProvider = new ZipProviderClass();
   UnInstallInfo = new UnInstallInfoCollection();
   Dependencies = new DependencyItemCollection();
   PluginDependencies = new PluginDependencyItemCollection();
   ProjectSettings = new ProjectSettings();
   Silent = false;
   IsHiden = false;
   Parent = null;
 }
Exemple #2
0
 public UnInstallInfoCollection Load(string fileName)
 {
     if (File.Exists(fileName))
     {
         try
         {
             XmlSerializer           serializer = new XmlSerializer(typeof(UnInstallInfoCollection));
             FileStream              fs         = new FileStream(fileName, FileMode.Open);
             UnInstallInfoCollection unInstallInfoCollection = (UnInstallInfoCollection)serializer.Deserialize(fs);
             fs.Close();
             return(unInstallInfoCollection);
         }
         catch
         {
             return(null);
         }
     }
     return(null);
 }
 /// <summary>
 /// Start copy the package file based on group settings
 /// 
 /// </summary>
 public void Install()
 {
   if (UnInstallInfo == null)
   {
     UnInstallInfo = new UnInstallInfoCollection(this);
   }
   else
     UnInstallInfo.SetInfo(this);
   foreach (GroupItem groupItem in Groups.Items)
   {
     if (groupItem.Checked)
     {
       foreach (FileItem fileItem in groupItem.Files.Items)
       {
         MpeInstaller.InstallerTypeProviders[fileItem.InstallType].Install(this, fileItem);
         if (FileInstalled != null)
           FileInstalled(this, new InstallEventArgs(groupItem, fileItem));
       }
     }
   }
 }