示例#1
0
        public Installer(PackBlock packBlock, Windows7ProgressBar progressFile, Windows7ProgressBar progressAll, Label progressText, Label progressDetails, Label progressCurFile, PictureBox launcherButton,
            String gamePath, String ts3Path, String addonsPath)
        {
            this.activeForm = "packBlock";
            this.packBlock = packBlock;

            // construct error report
            this.reportError = new EmailReporter();

            // define controls
            this.progressFile = progressFile;
            this.progressAll = progressAll;
            this.progressText = progressText;
            this.progressDetails = progressDetails;
            this.progressCurFile = progressCurFile;
            this.launcherButton = launcherButton;

            // define paths
            gamePathBox = new TextBox();
            gamePathBox.Text = gamePath;

            ts3PathBox = new TextBox();
            ts3PathBox.Text = ts3Path;

            addonsPathBox = new TextBox();
            addonsPathBox.Text = addonsPath;

            // define background worker
            this.installFiles.DoWork += InstallFiles_DoWork;
            this.installFiles.RunWorkerCompleted += InstallFiles_RunWorkerCompleted;
        }
示例#2
0
        /// <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;
        }
示例#3
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="mainForm"></param>
        /// <param name="progressFile"></param>
        /// <param name="progressAll"></param>
        /// <param name="progressText"></param>
        /// <param name="progressDetails"></param>
        /// <param name="progressCurFile"></param>
        /// <param name="launcherButton"></param>
        public Installer (MainForm mainForm, Windows7ProgressBar progressFile, Windows7ProgressBar progressAll, Label progressText, Label progressDetails, Label progressCurFile, PictureBox launcherButton, PictureBox cancelButton,
            TextBox gamePathBox, TextBox ts3PathBox, TextBox addonsPathBox, Button gamePathErase, Button ts3PathErase, Button addonsPathErase, PictureBox gamePathFind, PictureBox ts3PathFind, PictureBox addonsPathFind,
            ToolStripMenuItem ts3Plugin, ToolStripMenuItem downloadJSRS, ToolStripMenuItem downloadBlastcore)
        {
            this.activeForm = "mainForm";
            this.mainForm = mainForm;

            // construct error report
            this.reportError = new EmailReporter();

            // define controls
            this.progressFile = progressFile;
            this.progressAll = progressAll;
            this.progressText = progressText;
            this.progressDetails = progressDetails;
            this.progressCurFile = progressCurFile;
            this.launcherButton = launcherButton;
            this.cancelButton = cancelButton;

            // define controls (directory fields)
            this.gamePathBox = gamePathBox;
            this.gamePathErase = gamePathErase;
            this.gamePathFind = gamePathFind;

            this.ts3PathBox = ts3PathBox;
            this.ts3PathErase = ts3PathErase;
            this.ts3PathFind = ts3PathFind;

            this.addonsPathBox = addonsPathBox;
            this.addonsPathErase = addonsPathErase;
            this.addonsPathFind = addonsPathFind;

            // define controls (toolstrip menu items)
            this.ts3Plugin = ts3Plugin;
            this.downloadJSRS = downloadJSRS;
            this.downloadBlastcore = downloadBlastcore;

            // define background worker
            this.installFiles.DoWork += InstallFiles_DoWork;
            this.installFiles.RunWorkerCompleted += InstallFiles_RunWorkerCompleted;

            // define timer
            this.delayLaunch.Interval = 2000;
            this.delayLaunch.Tick += DelayLaunch_Tick;
        }
示例#4
0
        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);
        }