Beispiel #1
0
        public void DownloadFile(string url, string file)
        {
            // Create a download item.
            Download download = new Download(url, file);
            // If the same file had previously been downloaded,
            // let the old one assume the identity of the new.
            Download existingDownload = _downloads.SingleOrDefault(d => d == download);

            // Show the downloads bar.
            //DownloadsVisible = true;

            if (existingDownload != null)
            {
                download = existingDownload;
            }
            else
            {
                _downloads.Add(download);
            }

            // Start downloading.
            download.Start();
            // Show the Downloads window.
            DownloadsWindow.Show(dockPanel);
        }
 private void downloadsToolStripMenuItem_CheckedChanged(object sender, EventArgs e)
 {
     if (downloadsToolStripMenuItem.Checked)
     {
         DownloadsWindow.Show(dockPanel);
     }
     else
     {
         DownloadsWindow.Hide();
     }
 }
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            if (Settings.Default.Downloads)
            {
                DownloadsWindow.Show(dockPanel);
            }

            // Create the initial tab.
            this.OpenTab();
        }
Beispiel #4
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            // Initialize UI.
            if (Settings.Default.History)
            {
                History.Show(dockPanel);
            }

            if (Settings.Default.Downloads)
            {
                DownloadsWindow.Show(dockPanel);
            }

            // Create the initial tab.
            OpenTab();

            // Refresh history entries.
            History.RefreshSource();
        }
 private void OnDownloadBegin(object sender, DownloadBeginEventArgs e)
 {
     DownloadsWindow.Show(dockPanel, DockState.DockBottom);
 }