Пример #1
0
        private void BeginInstall()
        {
            InstallFlags flags = new InstallFlags();

            flags.SetConditionally(pepperBox.Checked, InstallFlags.PEPPER);
            flags.SetConditionally(netscapeBox.Checked, InstallFlags.NETSCAPE);
            flags.SetConditionally(activeXBox.Checked, InstallFlags.ACTIVEX);
            flags.SetConditionally(playerBox.Checked, InstallFlags.PLAYER);
            flags.SetConditionally(playerDesktopBox.Checked, InstallFlags.PLAYER_DESKTOP);
            flags.SetConditionally(playerStartMenuBox.Checked, InstallFlags.PLAYER_START_MENU);

            progressBar.Value   = 0;
            progressBar.Maximum = flags.GetTicks();

            new Task(new Action(() => {
                IntPtr redirection = RedirectionManager.DisableRedirection();

                try {
                    Uninstaller.Uninstall(this);
                    Installer.Install(this, flags);
                    Complete();
                } catch (Exception e) {
                    Failure(e);
                } finally {
                    RedirectionManager.EnableRedirection(redirection);
                }
            })).Start();
        }
Пример #2
0
        private void BeginInstall()
        {
            int requiredValue = (pepperBox.Checked ? 1 : 0) + (netscapeBox.Checked ? 1 : 0) + (activeXBox.Checked ? 2 : 0);

            if (Environment.Is64BitOperatingSystem)
            {
                requiredValue *= 2;
            }

            requiredValue += UNINSTALL_TICKS;
            requiredValue += INSTALL_GENERAL_TICKS;

            progressBar.Value   = 0;
            progressBar.Maximum = requiredValue;

            new Task(new Action(() => {
                IntPtr redirection = RedirectionManager.DisableRedirection();

                try {
                    Uninstaller.Uninstall(this);
                    Installer.Install(this, pepperBox.Checked, netscapeBox.Checked, activeXBox.Checked);
                    Complete();
                } catch (Exception e) {
                    Failure(e);
                } finally {
                    RedirectionManager.EnableRedirection(redirection);
                }
            })).Start();
        }
Пример #3
0
 public void Initialize()
 {
     if (this.simulationManager.simuMode == SimulationManager.SimuMode.Learn)
     {
         this.redirectionManager = this.simulationManager.redirectionManager;
         waitTime = 0.001f;
         BeginNewGame();
         Debug.Log("The Environment " + this.envParameters.env_name + " has been created");
     }
 }
Пример #4
0
        private void BeginInstall()
        {
            progressBar.Value   = 0;
            progressBar.Maximum = UNINSTALL_TICKS;

            new Task(new Action(() => {
                IntPtr redirection = RedirectionManager.DisableRedirection();

                try {
                    Uninstaller.Uninstall(this);
                    Complete();
                } catch (Exception e) {
                    Failure(e);
                } finally {
                    RedirectionManager.EnableRedirection(redirection);
                }
            })).Start();
        }
Пример #5
0
 void GetRedirectionManager()
 {
     redirectionManager = this.gameObject.GetComponent <RedirectionManager>();
 }