Example #1
0
 protected override void WndProc(ref Message m)
 {
     if (m.Msg == HotkeyManager.WM_HOTKEY_MSG_ID)
     {
         BridgeTCPUDP.OnHotkey(m.WParam.ToInt32());
     }
     base.WndProc(ref m);
 }
Example #2
0
 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);
 }
Example #3
0
        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;
            }
        }
Example #4
0
 private void buttonRegister_Click(object sender, EventArgs e)
 {
     buttonRegister.Enabled = false;
     BridgeTCPUDP.Register(textBoxUsername.Text, textBoxEmail.Text, textBoxPassword.Text);
 }
Example #5
0
 private void contextMenuStripUser_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
 {
     BridgeTCPUDP.Logout();
     OnLogout();
 }
Example #6
0
 public void ButtonDisconnect_Click(object sender, EventArgs e)
 {
     BridgeTCPUDP.Close();
     EnableButtons();
     Log("disconnected\n", Color.Red);
 }