protected void OnDeviceFound(SatIpDeviceFoundArgs args) { if (DeviceFound != null) { DeviceFound(this, args); } }
private void DeviceFound(object sender, SatIpDeviceFoundArgs args) { if (InvokeRequired) { this.BeginInvoke((MethodInvoker) delegate { DeviceFound(sender, args); }); return; } var newnode = treeView1.Nodes[0].Nodes.Add(args.Device.UniqueDeviceName, args.Device.FriendlyName); newnode.ToolTipText = args.Device.DeviceDescription; if (treeView1.Nodes[0].IsExpanded != true) { treeView1.Nodes[0].Expand(); } }