private void Form1_Load(object sender, EventArgs e) { Debug.WriteLine("Form Loaded"); myHIDListener = new HIDListener(); Message checkMessage = myHIDListener.getMessage(); // Debug.WriteLine("Message collected : " + checkMessage.ToString()); }
public void ServiceMain() { //Called in ServiceThread, code here. owner.ServiceDebugConsole("ServiceMain Started"); hidListener = new HIDListener(owner); hidSender = new HIDSender(); while (true) { owner.ServiceDebugConsole("ServiceMain loop start"); if (runHIDListen) { hidListener.start(); // break; } System.Threading.Thread.Sleep(5000); } return; }