public DeviceData(DeviceDel deiv, bool power, string name, int channel) { UserDevice = deiv; Power = power; Name = name; Channel = channel; }
private void OnFixLost(object sender, DeviceEventArgs e) { if (fixLabel.InvokeRequired) { // this is worker thread DeviceDel del = new DeviceDel(this.OnFixLost); fixLabel.Invoke(del, new object[] { sender, e }); } else { fixLabel.Text = "No Fix"; TryEnableAvl(); } }
private void EndAsync(IAsyncResult ar) { DeviceDel d = null; try { System.Runtime.Remoting.Messaging.AsyncResult asres = (System.Runtime.Remoting.Messaging.AsyncResult)ar; d = ((DeviceDel)asres.AsyncDelegate); d.EndInvoke(ar); } catch { DeviceList.Remove(MyDeviceDel); } }
private void OnGPSConnect(object sender, DeviceEventArgs e) { if (gpsLabel.InvokeRequired) { // this is worker thread DeviceDel del = new DeviceDel(this.OnGPSConnect); gpsLabel.Invoke(del, new object[] { sender, e }); } else { gpsLabel.Text = "GPS: " + gpsManager.GPSName; statusLabel.Text = "Waiting for GPS Fix"; TryEnableAvl(); } }