/// <summary> /// Constructor for PackBlock /// </summary> /// <param name="packBlock"></param> /// <param name="installerWorker"></param> /// <param name="progressFile"></param> /// <param name="progressAll"></param> /// <param name="progressCurFile"></param> /// <param name="progressText"></param> /// <param name="progressDetails"></param> /// <param name="launcherButton"></param> public Downloader(PackBlock packBlock, Installer installerWorker, Windows7ProgressBar progressFile, Windows7ProgressBar progressAll, Label progressCurFile, Label progressText, Label progressDetails, PictureBox launcherButton) { this.activeForm = "packBlock"; this.packBlock = packBlock; this.installer = installerWorker; this.megaClient = new MegaApiClient(); // construct error report this.reportError = new EmailReporter(); // define controls this.progressCurFile = progressCurFile; this.progressFile = progressFile; this.progressAll = progressAll; this.progressText = progressText; this.progressDetails = progressDetails; this.launcherButton = launcherButton; // define calculate worker this.calculateFiles.DoWork += CalculateFiles_DoWork; this.calculateFiles.RunWorkerCompleted += CalculateFiles_RunWorkerCompleted; this.calculateFiles.WorkerSupportsCancellation = true; // define download worker this.downloadFiles.DoWork += DownloadFiles_DoWork; this.downloadFiles.RunWorkerCompleted += DownloadFiles_RunWorkerCompleted; this.downloadFiles.WorkerSupportsCancellation = true; }
public RepoReader(MainForm2 mainForm, DoubleBufferFlowPanel flowpanelAddonPacks, TreeView repoTreeView, Downloader downloader, Installer installer, Label lbl_filesOK, Label lbl_filesINVALID, Label lbl_filesMISSING) { this.mainForm = mainForm; this.flowpanelAddonPacks = flowpanelAddonPacks; this.repoTreeView = repoTreeView; this.downloader = downloader; this.installer = installer; this.lbl_filesOK = lbl_filesOK; this.lbl_filesINVALID = lbl_filesINVALID; this.lbl_filesMISSING = lbl_filesMISSING; // define validation worker this.validateRepo.DoWork += ValidateRepo_DoWork; this.validateRepo.RunWorkerCompleted += ValidateRepo_RunWorkerCompleted; this.validateRepo.WorkerSupportsCancellation = true; }
public MainForm() { SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.AllPaintingInWmPaint, true); SetStyle(ControlStyles.DoubleBuffer, true); InitializeComponent(); txt_appTitle.Text = AssemblyTitle; txt_appVersion.Text = AssemblyVersion; QuickUpdateMethod = new zCheckUpdate(WindowVersionStatus, busy); UpdateMethod = new zCheckUpdate(btn_update, btn_checkUpdates, txt_curversion, txt_latestversion, busy); installer = new Installer(this, prb_progressBar_File, prb_progressBar_All, txt_progressStatus, txt_percentageStatus, txt_curFile, btn_Launch, btn_cancelDownload, txtb_armaDirectory, txtb_tsDirectory, txtb_modsDirectory, btn_ereaseArmaDirectory, btn_ereaseTSDirectory, btn_ereaseModsDirectory, btn_browseA3, btn_browseTS3, btn_browseModsDirectory, btn_reinstallTFRPlugins, btn_downloadDragonFyre, btn_downloadBlastcore); downloader = new Downloader(this, installer, prb_progressBar_File, prb_progressBar_All, txt_curFile, txt_progressStatus, txt_percentageStatus, btn_Launch, btn_cancelDownload); remoteReader = new RemoteReader(); fetchAddonPacks = new Packs(this, PacksPanel); eReport = new EmailReporter(); aLooker = new AddonsLooker(lstb_detectedAddons, lstb_activeAddons, chb_dragonfyre, chb_blastcore); loadingSplash = new Windows.Splash(); windowIO = new WindowIO(this); addonsPanelIO = new PanelIO(panel_packs, Panels, 304, 306, 33); communityPanelIO = new PanelIO(panel_community, Panels, 304, 306, 33); launchoptionsPanelIO = new PanelIO(panel_launchOptions, Panels, 304, 306, 33); helpPanelIO = new PanelIO(panel_help, Panels, 304, 306, 33); aboutPanelIO = new PanelIO(panel_about, Panels, 304, 306, 33); topPanelsIO = new PanelIO(panelDirectories, panelMenu, 4); botPanelIO = new PanelIO(panel_bottomHide_Inner, panel_bottomhide, 746, 750, 53); }