示例#1
0
 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); }));
     }
 }
示例#2
0
文件: Main.cs 项目: mamcer/soulstone
        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; }));
        }