//constructor?
        public Option(Installer i, ComboBox c, PictureBox p, Label l, int index)
        {
            //store the UiTracker
            installer = i;

            //assign the hud objects
            myCombobox = c;
            myPicturebox = p;
            myLabel = l;

            //assign the default setting
            _defaultSetting = index;
        }
        //constructor?
        public Tracker(Buttons b, Installer i, Location asset, Location install, Option aspect, Option scoreMin, Option scoreMax)
        {
            //assign the buttons object
            buttons = b;

            //assign the installer object
            installer = i;

            //assign the hud objects
            assetLocation = asset;
            installLocation = install;

            //assign the options objects
            aspectOption = aspect;
            scoreboardMinmodeOption = scoreMin;
            scoreboardMaxmodeOption = scoreMax;
        }
Beispiel #3
0
        //default functionality as form loads
        private void Form1_Load(object sender, EventArgs e)
        {
            //objects which reference the form and/or other class objects

            //option objects
            this.aspectOption = new Option(installer, aspectCombobox, aspectPicturebox, aspectLabel, Properties.Settings.Default.settingComboboxAspect);
            this.scoreboardMinmodeOption = new Option(installer, scoreboardMinmodeCombobox, scoreboardMinmodePicturebox, scoreboardMinmodeLabel, Properties.Settings.Default.settingComboboxMinmode);
            this.scoreboardMaxmodeOption = new Option(installer, scoreboardMaxmodeCombobox, scoreboardMaxmodePicturebox, scoreboardMaxmodeLabel, Properties.Settings.Default.settingComboboxMaxmode);

            //hud location objects
            this.assetLocation = new Location();
            this.installLocation = new Location();

            //one-off class objects
            this.buttons = new Buttons(this, uninstallButton, installButton);
            this.installer = new Installer(buttons, assetLocation, installLocation);
            this.uninstaller = new Uninstaller();
            this.browser = new Browser(installer, InstallBrowserDialog, InstallBrowserPathLabel, InstallBrowserInstructLabel, Properties.Settings.Default.settingInstallBrowserPath);
            this.downloader = new Downloader(assetLocation, installLocation);

            this.tracker = new Tracker(buttons, installer, assetLocation, installLocation, aspectOption, scoreboardMinmodeOption, scoreboardMaxmodeOption);

            //TODO make these actually dynamic
            //assetLocation.VersionHud = new Version("2.0.4");
            //installLocation.VersionHud = new Version("2.0.4");

            //MessageBox.Show(Convert.ToString("asset version " + assetLocation.VersionHud));
            //MessageBox.Show(Convert.ToString("install version " + installLocation.VersionHud));

            //generate tooltips for the form
            updateTooltips();

            //Generate tooltips, populate strings, comboboxes, and assets.
            tracker.Setup();

            //Fill the browser with a best guess default string or a saved string, if one exists
            browser.Setup();

            //download current updates and check if they need to be installed
            if (downloader.checkAndUpdate())
            {
                //TODO special mode for the install button
            }
        }