Ejemplo n.º 1
0
        public void Refresh()
        {
            string[] newFolders = new string[] { ".\\" };
            if (Path.GetFileName(Directory.GetCurrentDirectory()).Equals("trial"))
            {
                newFolders = new string[] { ".\\", "..\\release" }
            }
            ;
            if (Path.GetFileName(Directory.GetCurrentDirectory()).Equals("release"))
            {
                newFolders = new string[] { ".\\", "..\\trial" }
            }
            ;

            newFiles             = new DllCollection(newFolders);
            oldFiles             = new DllCollection(new string[] { InstallFolder });
            comparer             = new Comparer(oldFiles, newFiles);
            txtAnalysis.Text     = "Install path: " + InstallFolder + "\r\n\r\n" + comparer.GetAnalysis();
            btnUninstall.Enabled = (oldFiles.Count > 0);
        }
Ejemplo n.º 2
0
 public Comparer(DllCollection oldFiles, DllCollection newFiles)
 {
     this.oldFiles = oldFiles;
     this.newFiles = newFiles;
     foreach (string key in oldFiles.Keys)
     {
         if (!newFiles.ContainsKey(key))
         {
             leftovers.Add(oldFiles[key]);
         }
         else
         {
             pairs.Add(new KeyValuePair <Dll, Dll>(oldFiles[key], newFiles[key]));
         }
     }
     foreach (string key in newFiles.Keys)
     {
         if (!oldFiles.ContainsKey(key))
         {
             notInstalled.Add(newFiles[key]);
         }
     }
 }
Ejemplo n.º 3
0
 public Uninstaller(DllCollection oldFiles)
 {
     this.oldFiles = oldFiles;
 }
Ejemplo n.º 4
0
 public Installer(DllCollection newFiles, string destFolder)
 {
     this.newFiles   = newFiles;
     this.destFolder = destFolder;
 }