Exemple #1
0
        private void buttonOK_Click(object sender, EventArgs e)
        {
            // Delete unwanted packages.
            foreach (String Item in this.Removed)
            {
                if (Directory.Exists(this.Target + Item))
                {
                    this.Empty(new DirectoryInfo(this.Target + Item));
                }
            }

            String[] URLlist = (new List <String>(this.Added.Values)).ToArray();

            // Download new packages.
            if (URLlist.Length > 0)
            {
                DownloaderWindow downloader = new DownloaderWindow(URLlist, this.Target);

                try
                {
                    downloader.ShowDialog();
                    downloader.Dispose();
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
        }
 public void Close()
 {
     mWindow.Dispose();
 }