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); }
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); }
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; } } }