private void TpwThread() { var tpwRpc = new TpwRpc(); tpwRpc.onMessage += (s, eventArgs) => { // Needs to be run on main WinForms thread statusLabel.Invoke(new SafeCallDelegate(() => { statusLabel.Text = eventArgs.Message; })); }; tpwRpc.Run(); }
static void Main(string[] args) { var tpwRpc = new TpwRpc(); tpwRpc.Run(); }