public void OnPlugged(int pHandle) { if (HIDDLLInterface.hidGetVendorID(pHandle) == 5638 & HIDDLLInterface.hidGetProductID(pHandle) == 6536) { AutobotConnected(); Bot.Instance.CONNECTED = true; } }
public void OnUnplugged(int pHandle) { if (HIDDLLInterface.hidGetVendorID(pHandle) == 5638 & HIDDLLInterface.hidGetProductID(pHandle) == 6536) { HIDDLLInterface.hidSetReadNotify(HIDDLLInterface.hidGetHandle(5638, 6536), false); AutobotDisconnected(); Bot.Instance.CONNECTED = false; tested = false; } }
private void Form1_Load(object sender, EventArgs e) { logView = new LogView(); logView.Dock = DockStyle.Fill; logPanel.Controls.Add(logView); logView.Log("Application running", LogView.LogType.Information); AutobotDisconnected(); Form form = this; HIDDLLInterface.ConnectToHID(ref form); clientDataMany = new ClientData[] { }; CreateDropDownButton(); CreateDropDownButtonCombinations(); trayToolStripMenuItem.Checked = Settings.Default.Settings_Tray; topToolStripMenuItem.Checked = Settings.Default.Settings_Top; lastToolStripMenuItem.Checked = Settings.Default.Settings_Last; showReceivedDataToolStripMenuItem.Checked = Settings.Default.Settings_Show_Keys; this.TopMost = Settings.Default.Settings_Top; tcp = new TCPThread(); tcp.OnChangeStatus += Tcp_OnChangeStatus; tcp.OnTriggerServerAction = ClientAction; logView.Log("IP : " + tcp.LocalAddress, LogView.LogType.Information); logView.Log("Port : " + tcp.Port, LogView.LogType.Information); logView.Last = Settings.Default.Settings_Last; Bot.Instance.OnPingTrigger += Instance_OnPingTrigger; tcp.Run(); botQueue = new BotQueue(); botQueue.OnErrorOccured += BotQueue_OnErrorOccured; }
public void OnChanged() { int num = HIDDLLInterface.hidGetHandle(5638, 6536); HIDDLLInterface.hidSetReadNotify(HIDDLLInterface.hidGetHandle(5638, 6536), true); }
private void Form1_FormClosed(object sender, FormClosedEventArgs e) { HIDDLLInterface.DisconnectFromHID(); tcp.StopServer(); botQueue.Stop(); }