Esempio n. 1
0
        private void ChangeInstallation(GameInstallation installation)
        {
            _installation = installation;

            if (_fileSystem != null)
            {
                _fileSystem.Dispose();
                _fileSystem = null;
            }

            if (_game != null)
            {
                _game.Dispose();
                _game = null;
            }

            _fileSystem = installation.CreateFileSystem();

            _game = new Game(
                HostPlatform.GraphicsDevice,
                HostPlatform.GraphicsDevice2D,
                _fileSystem,
                installation.Game);

            InstallationChanged?.Invoke(this, new InstallationChangedEventArgs(installation, _fileSystem));
        }
Esempio n. 2
0
        private void ChangeInstallation(GameInstallation installation)
        {
            _installation = installation;

            if (_fileSystem != null)
            {
                _fileSystem.Dispose();
                _fileSystem = null;
            }

            var launcherImagePath = installation.Game.LauncherImagePath;

            if (launcherImagePath != null)
            {
                var fullImagePath = Path.Combine(installation.Path, launcherImagePath);
                _installationImageView.Image = new Bitmap(fullImagePath);
            }
            else
            {
                _installationImageView.Image = null;
            }

            _fileSystem = installation.CreateFileSystem();

            InstallationChanged?.Invoke(this, new InstallationChangedEventArgs(installation, _fileSystem));
        }
Esempio n. 3
0
 /// <summary>
 /// Fires the <see cref="InstallationChanged"/> event.
 /// </summary>
 /// <param name="remoteService">The remote service.</param>
 private void OnInstallationChanged(ManagementBaseObject remoteService)
 {
     InstallationChanged?.Invoke(remoteService);
 }