Пример #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);
        }
Пример #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]);
         }
     }
 }
Пример #3
0
 public Uninstaller(DllCollection oldFiles)
 {
     this.oldFiles = oldFiles;
 }
Пример #4
0
 public Installer(DllCollection newFiles, string destFolder)
 {
     this.newFiles   = newFiles;
     this.destFolder = destFolder;
 }