Ejemplo n.º 1
0
 static DependencyMissingUserError Handle(ScriptHookMissingException ex, string action) {
     var webBrowserCommand = new NonRecoveryCommand("Get ScriptHookV");
     webBrowserCommand.Subscribe(
         x => Cheat.Mediator.RequestAsync(new OpenArbWebLink(new Uri("http://www.dev-c.com/gtav/scripthookv"))));
     return new DependencyMissingUserError("Please install ScriptHook", ScriptHook,
         RecoveryCommands.RetryCommands.Concat(new[] {webBrowserCommand}), innerException: ex);
 }
Ejemplo n.º 2
0
 static DependencyMissingUserError Handle(OpenIvMissingException ex, string action) {
     var webBrowserCommand = new NonRecoveryCommand("Get OpenIV");
     webBrowserCommand.Subscribe(
         x => Cheat.Mediator.RequestAsync(new OpenArbWebLink(new Uri("http://openiv.com"))));
     return new DependencyMissingUserError("Please install OpenIV",
         OpenIv,
         RecoveryCommands.RetryCommands.Concat(new[] {webBrowserCommand}),
         innerException: ex);
 }
Ejemplo n.º 3
0
 static IEnumerable<IRecoveryCommand> GetMultiCommands(
     MultiGameRequirementMissingException multiGameRequirementMissingException) {
     foreach (var ex in multiGameRequirementMissingException.Exceptions) {
         if (ex is OpenIvMissingException) {
             var webBrowserCommand = new NonRecoveryCommand("Get OpenIV");
             webBrowserCommand.Subscribe(
                 x => Cheat.Mediator.RequestAsync(new OpenArbWebLink(new Uri("http://openiv.com"))));
             yield return webBrowserCommand;
         } else if (ex is ScriptHookMissingException) {
             var scriptHookCommand = new NonRecoveryCommand("Get ScriptHookV");
             scriptHookCommand.Subscribe(
                 x =>
                     Cheat.Mediator.RequestAsync(
                         new OpenArbWebLink(new Uri("http://www.dev-c.com/gtav/scripthookv"))));
             yield return scriptHookCommand;
         }
     }
 }