private void UpdateDownloadPage_ParentChanged(object sender, EventArgs e) { if (_initialized) { return; } _initialized = true; _downloader.Start(); _timer.Start(); }
private void MainForm_Shown(object sender, EventArgs e) { NativeMethods.SetForegroundWindow(Handle); _downloader = new PackageDownloader(Program.Arguments.Site, Program.Arguments.SiteUserName, Program.Arguments.SitePassword, Program.Arguments.Package); _downloader.DownloadCompleted += (s, ea) => DownloadComplete(ea.DownloadFolder); _downloader.DownloadFailed += (s, ea) => ShowException(ea.Exception); _downloader.Start(); _timer.Start(); }