Пример #1
0
        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);
        }
Пример #2
0
        protected override void WndProc(ref Message m)
        {
            base.WndProc(ref m);
            switch (m.Msg)
            {
            case WM_HOTKEY:
                switch (m.WParam.ToInt32())
                {
                case HKID:
                    APEngage = !APEngage;
                    break;

                default:
                    break;
                }
                break;

            case WM_DESTROY:
                AppHotKey.UnRegKey(Handle, HKID);
                break;

            default:
                break;
            }
        }
Пример #3
0
        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);
        }
Пример #4
0
 private void Main_FormClosed(object sender, FormClosedEventArgs e)
 {
     AppHotKey.UnRegKey(Handle, HKID);
     Environment.Exit(0);
 }