Exemplo n.º 1
0
        protected override async Task <IEnumerable <NetworkItem> > GetItems()
        {
            var browser   = new NetworkBrowser();
            var computers = await Task.Run(() => browser.GetNetworkComputers());

            return(computers.Select(i => new NetworkItem(i)));
        }
Exemplo n.º 2
0
        private void Initialize()
        {
            this.Drives = new ObservableCollection <Drive>();
            foreach (DriveInfo driveInfo in System.IO.DriveInfo.GetDrives())
            {
                this.Drives.Add(new Drive(driveInfo.Name, driveInfo.IsReady));
            }

            this.Nets = new ObservableCollection <NetworkPcs>();

            NetworkBrowser nb = new NetworkBrowser();

            foreach (string pc in nb.GetNetworkComputers())
            {
                this.Nets.Add(new NetworkPcs(pc));
            }
        }
Exemplo n.º 3
0
 public Task <IList <string> > GetMachines()
 {
     return(Task.Run(() => NetworkBrowser.GetNetworkComputers()));
 }
Exemplo n.º 4
0
 public IList <string> GetMachines()
 {
     return(NetworkBrowser.GetNetworkComputers());
 }