Example #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Launchpad.Launcher.Handlers.LauncherHandler"/> class.
        /// </summary>
        public LauncherHandler()
        {
            this.Patch = PatchProtocolProvider.GetHandler();

            this.Patch.ModuleDownloadProgressChanged += OnLauncherDownloadProgressChanged;
            this.Patch.ModuleInstallationFinished    += OnLauncherDownloadFinished;
        }
Example #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Launchpad.Launcher.Handlers.LauncherHandler"/> class.
        /// </summary>
        public LauncherHandler()
        {
            Patch = Config.GetPatchProtocol();

            Patch.ModuleDownloadProgressChanged += OnLauncherDownloadProgressChanged;
            Patch.ModuleInstallationFinished    += OnLauncherDownloadFinished;
        }
Example #3
0
 public GameHandler()
 {
     Patch = Config.GetPatchProtocol();
     if (Patch != null)
     {
         Patch.ModuleDownloadProgressChanged += OnModuleInstallProgressChanged;
         Patch.ModuleVerifyProgressChanged   += OnModuleInstallProgressChanged;
         Patch.ModuleInstallationFinished    += OnModuleInstallationFinished;
         Patch.ModuleInstallationFailed      += OnModuleInstallationFailed;
     }
 }
Example #4
0
        /// <summary>
        /// Determines whether this instance can connect to a patching service.
        /// </summary>
        /// <returns><c>true</c> if this instance can connect to a patching service; otherwise, <c>false</c>.</returns>
        public bool CanPatch()
        {
            PatchProtocolHandler Patch = Config.GetPatchProtocol();

            if (Patch != null)
            {
                return(Patch.CanPatch());
            }
            else
            {
                return(false);
            }
        }
Example #5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="GameHandler"/> class.
        /// </summary>
        public GameHandler()
        {
            this.Patch = PatchProtocolProvider.GetHandler();
            if (this.Patch == null)
            {
                return;
            }

            this.Patch.ModuleDownloadProgressChanged += OnModuleInstallProgressChanged;
            this.Patch.ModuleVerifyProgressChanged   += OnModuleInstallProgressChanged;
            this.Patch.ModuleUpdateProgressChanged   += OnModuleInstallProgressChanged;

            this.Patch.ModuleInstallationFinished += OnModuleInstallationFinished;
            this.Patch.ModuleInstallationFailed   += OnModuleInstallationFailed;
        }
Example #6
0
        /// <summary>
        /// Checks whether or not the server provides binaries and patches for the specified platform.
        /// </summary>
        /// <returns><c>true</c>, if the server does provide files for the platform, <c>false</c> otherwise.</returns>
        /// <param name="Platform">Platform.</param>
        public bool IsPlatformAvailable(ESystemTarget Platform)
        {
            PatchProtocolHandler Patch = Config.GetPatchProtocol();

            return(Patch.IsPlatformAvailable(Platform));
        }
Example #7
0
        /// <summary>
        /// Determines whether the launcher is outdated.
        /// </summary>
        /// <returns><c>true</c> if the launcher is outdated; otherwise, <c>false</c>.</returns>
        public bool IsLauncherOutdated()
        {
            PatchProtocolHandler Patch = Config.GetPatchProtocol();

            return(Patch.IsLauncherOutdated());
        }
Example #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Launchpad.Launcher.Handlers.LauncherHandler"/> class.
 /// </summary>
 public LauncherHandler()
 {
     Patch = Config.GetPatchProtocol();
 }
Example #9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ChecksHandler"/> class.
 /// </summary>
 public ChecksHandler()
 {
     this.Patch = PatchProtocolProvider.GetHandler();
 }
Example #10
0
        /// <summary>
        /// Determines whether this instance can connect to a patching service.
        /// </summary>
        /// <returns><c>true</c> if this instance can connect to a patching service; otherwise, <c>false</c>.</returns>
        public bool CanPatch()
        {
            PatchProtocolHandler patchService = Configuration.GetPatchProtocol();

            return(patchService != null && patchService.CanPatch());
        }
Example #11
0
        /// <summary>
        /// Checks whether or not the server provides binaries and patches for the specified platform.
        /// </summary>
        /// <returns><c>true</c>, if the server does provide files for the platform, <c>false</c> otherwise.</returns>
        /// <param name="platform">platform.</param>
        public bool IsPlatformAvailable(ESystemTarget platform)
        {
            PatchProtocolHandler patchService = Configuration.GetPatchProtocol();

            return(patchService.IsPlatformAvailable(platform));
        }
Example #12
0
        /// <summary>
        /// Determines whether the launcher is outdated.
        /// </summary>
        /// <returns><c>true</c> if the launcher is outdated; otherwise, <c>false</c>.</returns>
        public bool IsLauncherOutdated()
        {
            PatchProtocolHandler patchService = Configuration.GetPatchProtocol();

            return(patchService.IsModuleOutdated(EModule.Launcher));
        }
Example #13
0
        /// <summary>
        /// Determines whether the game is outdated.
        /// </summary>
        /// <returns><c>true</c> if the game is outdated; otherwise, <c>false</c>.</returns>
        public bool IsGameOutdated()
        {
            PatchProtocolHandler patchService = this.Configuration.GetPatchProtocol();

            return(patchService.IsModuleOutdated(EModule.Game));
        }