public Main() { if (!mReader.FindProcess("ffxiv_dx11")) { MessageBox.Show("游戏未运行", "严重错误:上溢", MessageBoxButtons.OK); Environment.Exit(0); } InitializeComponent(); LoadCFG(); Process p = Process.GetProcessesByName("ffxiv_dx11").ToList().FirstOrDefault(); mReader.process = p; mReader.OpenProcess(); Thread F = new Thread(new ThreadStart(FindPtr)); F.Start(); hotbar = new HotbarCollection(); InitTTS(); BlackOutBL = LoadBlackOut(); BLAP.Uninstall(); AppHotKey.UnRegKey(Handle, HKID); uint Modifier = AppHotKey.ModifyKey(Settings.Default.AutoC, Settings.Default.AutoA, Settings.Default.AutoS); uint vK = Simulator.Transcoding(Settings.Default.AutovK); AppHotKey.RegKey(Handle, HKID, Modifier, vK); IntPtr gameptr = FindWindow(null, "最终幻想XIV"); BLAP.Install(gameptr, BLParam.Text, BLvK.Text); }
private void StartBtn_Click(object sender, EventArgs e) { SaveCFG(); AppHotKey.UnRegKey(Handle, HKID); BLAP.Uninstall(); uint Modifier = AppHotKey.ModifyKey(Settings.Default.AutoC, Settings.Default.AutoA, Settings.Default.AutoS); uint vK = Simulator.Transcoding(Settings.Default.AutovK); AppHotKey.RegKey(Handle, HKID, Modifier, vK); IntPtr gameptr = FindWindow(null, "最终幻想XIV"); BLAP.Install(gameptr, BLParam.Text, BLvK.Text); }