Exemplo n.º 1
0
 public void OnPlugged(int pHandle)
 {
     if (HIDDLLInterface.hidGetVendorID(pHandle) == 5638 & HIDDLLInterface.hidGetProductID(pHandle) == 6536)
     {
         AutobotConnected();
         Bot.Instance.CONNECTED = true;
     }
 }
Exemplo n.º 2
0
 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;
     }
 }
Exemplo n.º 3
0
        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;
        }
Exemplo n.º 4
0
        public void OnChanged()
        {
            int num = HIDDLLInterface.hidGetHandle(5638, 6536);

            HIDDLLInterface.hidSetReadNotify(HIDDLLInterface.hidGetHandle(5638, 6536), true);
        }
Exemplo n.º 5
0
 private void Form1_FormClosed(object sender, FormClosedEventArgs e)
 {
     HIDDLLInterface.DisconnectFromHID();
     tcp.StopServer();
     botQueue.Stop();
 }