protected override void WndProc(ref Message m) { if (m.Msg == HotkeyManager.WM_HOTKEY_MSG_ID) { BridgeTCPUDP.OnHotkey(m.WParam.ToInt32()); } base.WndProc(ref m); }
private void buttonLogin_Click(object sender, EventArgs e) { buttonLogin.Enabled = false; buttonCreate.Enabled = false; linkLabelReset.Enabled = false; textBoxUsername.ReadOnly = true; textBoxEmail.ReadOnly = true; textBoxPassword.ReadOnly = true; BridgeTCPUDP.Login(textBoxUsername.Text, textBoxPassword.Text); }
private void OnKey(Keys key, bool isDown) { if (GetForegroundWindow() != CwRam.memory.process.MainWindowHandle) { return; } if (!keyboardState.ContainsKey(key)) { keyboardState.Add(key, !isDown); } if (keyboardState[key] == isDown) { return; } keyboardState[key] = isDown; if (!isDown) { return; //temp fix to prevent activation on release } switch (key) { case Keys.D4: BridgeTCPUDP.OnHotkey(Resources.HotkeyID.CtrlSpace); break; case Keys.D5: BridgeTCPUDP.OnHotkey(Resources.HotkeyID.SpecialMove2); break; case Keys.D0: BridgeTCPUDP.OnHotkey(Resources.HotkeyID.TeleportToTown); break; default: break; } }
private void buttonRegister_Click(object sender, EventArgs e) { buttonRegister.Enabled = false; BridgeTCPUDP.Register(textBoxUsername.Text, textBoxEmail.Text, textBoxPassword.Text); }
private void contextMenuStripUser_ItemClicked(object sender, ToolStripItemClickedEventArgs e) { BridgeTCPUDP.Logout(); OnLogout(); }
public void ButtonDisconnect_Click(object sender, EventArgs e) { BridgeTCPUDP.Close(); EnableButtons(); Log("disconnected\n", Color.Red); }