private void SetupOptions() { // WPF quirks ftw, we have to run this on the thread which owns the window this.Dispatcher.BeginInvoke((ThreadStart) delegate() { IntPtr windowHandle = new WindowInteropHelper(this).Handle; TrainerOption GodMode = new TrainerOption(Keys.F1, GodMode_HotkeyPressed, windowHandle); TrainerOption InfAmmo = new TrainerOption(Keys.F2, InfAmmo_HotkeyPressed, windowHandle); TrainerOption RapidfireGun = new TrainerOption(Keys.F3, RapidfireGun_HotkeyPressed, windowHandle); TrainerOption NoRecoil = new TrainerOption(Keys.F4, NoRecoil_HotkeyPressed, windowHandle); TrainerOption RapidfireNades = new TrainerOption(Keys.F5, RapidfireNades_HotkeyPressed, windowHandle); TrainerOption NoFog = new TrainerOption(Keys.F6, NoFog_HotkeyPressed, windowHandle); TrainerOption Speedhack = new TrainerOption(Keys.F7, SpeedHack_HotkeyPressed, windowHandle); TrainerOption Megajump = new TrainerOption(Keys.F8, MegaJump_HotkeyPressed, windowHandle); TrainerOption Multijump = new TrainerOption(Keys.F9, MultiJump_HotkeyPressed, windowHandle); TrainerOption EnableAll = new TrainerOption(Keys.F10, EnableAll_HotkeyPressed, windowHandle); TrainerOption ExtendRange = new TrainerOption(Keys.D1, ExtendRange_HotkeyPressed, windowHandle); TrainerOption RapidBuildDestroy = new TrainerOption(Keys.D2, RapidBuildDestroy_HotkeyPressed, windowHandle); TrainerOption SuperNadeRange = new TrainerOption(Keys.D5, SuperNadeRange_HotkeyPressed, windowHandle); TrainerOption NadeSpam = new TrainerOption(Keys.Z, NadeSpammer, windowHandle); Options.Add("GodMode", GodMode); Options.Add("InfAmmo", InfAmmo); Options.Add("RapidfireGun", RapidfireGun); Options.Add("NoRecoil", NoRecoil); Options.Add("RapidfireNades", RapidfireNades); Options.Add("NoFog", NoFog); Options.Add("Speedhack", Speedhack); Options.Add("Megajump", Megajump); Options.Add("Multijump", Multijump); Options.Add("SuperNadeRange", SuperNadeRange); Options.Add("EnableAll", EnableAll); Options.Add("NadeSpam", NadeSpam); Options.Add("ExtendRange", ExtendRange); Options.Add("RapidBuildDestroy", RapidBuildDestroy); }); }
private void SetupOptions() { // WPF quirks ftw, we have to run this on the thread which owns the window this.Dispatcher.BeginInvoke((ThreadStart)delegate() { IntPtr windowHandle = new WindowInteropHelper(this).Handle; TrainerOption GodMode = new TrainerOption(Keys.F1, GodMode_HotkeyPressed, windowHandle); TrainerOption InfAmmo = new TrainerOption(Keys.F2, InfAmmo_HotkeyPressed, windowHandle); TrainerOption RapidfireGun = new TrainerOption(Keys.F3, RapidfireGun_HotkeyPressed, windowHandle); TrainerOption NoRecoil = new TrainerOption(Keys.F4, NoRecoil_HotkeyPressed, windowHandle); TrainerOption RapidfireNades = new TrainerOption(Keys.F5, RapidfireNades_HotkeyPressed, windowHandle); TrainerOption NoFog = new TrainerOption(Keys.F6, NoFog_HotkeyPressed, windowHandle); TrainerOption Speedhack = new TrainerOption(Keys.F7, SpeedHack_HotkeyPressed, windowHandle); TrainerOption Megajump = new TrainerOption(Keys.F8, MegaJump_HotkeyPressed, windowHandle); TrainerOption Multijump = new TrainerOption(Keys.F9, MultiJump_HotkeyPressed, windowHandle); TrainerOption EnableAll = new TrainerOption(Keys.F10, EnableAll_HotkeyPressed, windowHandle); TrainerOption ExtendRange = new TrainerOption(Keys.D1, ExtendRange_HotkeyPressed, windowHandle); TrainerOption RapidBuildDestroy = new TrainerOption(Keys.D2, RapidBuildDestroy_HotkeyPressed, windowHandle); TrainerOption SuperNadeRange = new TrainerOption(Keys.D5, SuperNadeRange_HotkeyPressed, windowHandle); TrainerOption NadeSpam = new TrainerOption(Keys.Z, NadeSpammer, windowHandle); Options.Add("GodMode", GodMode); Options.Add("InfAmmo", InfAmmo); Options.Add("RapidfireGun", RapidfireGun); Options.Add("NoRecoil", NoRecoil); Options.Add("RapidfireNades", RapidfireNades); Options.Add("NoFog", NoFog); Options.Add("Speedhack", Speedhack); Options.Add("Megajump", Megajump); Options.Add("Multijump", Multijump); Options.Add("SuperNadeRange", SuperNadeRange); Options.Add("EnableAll", EnableAll); Options.Add("NadeSpam", NadeSpam); Options.Add("ExtendRange", ExtendRange); Options.Add("RapidBuildDestroy", RapidBuildDestroy); }); }