private void bwDomains_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e) { cmbDomains.Invoke(new MethodInvoker(delegate() { cmbDomains.Items.Clear(); })); foreach (CompEnum.NetworkComputers nc in NSearcher.GetDomainNames()) { cmbDomains.Invoke(new MethodInvoker(delegate() { cmbDomains.Items.Add(nc.Name); })); } }
private void bwDomains_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e) { CompEnum ce = NSearcher.GetDomainNames(); cmbDomains.Invoke(new MethodInvoker(delegate() { cmbDomains.Items.Clear(); })); foreach (CompEnum.NetworkComputers nc in ce) { cmbDomains.Invoke(new MethodInvoker(delegate() { cmbDomains.Items.Add(nc.Name); })); } lnkConfiguration.Invoke(new MethodInvoker(delegate() { lnkConfiguration.Enabled = true; })); }