Пример #1
0
        public void RunDiscovery()
        {
            managerlist.Items.Clear();

            var t = new Thread(() =>
                                   {
                                       var disc = new DiscoveryManager();
                                       disc.DiscoveryAddressAdded += disc_DiscoveryAddressAdded;
                                       disc.Find(Settings.Default.DISCOVERY_TYPE);
                                   });
            t.IsBackground = true;
            t.Start();
        }
Пример #2
0
 private void StartActivityManager()
 {
     _discovery = new DiscoveryManager();
     _discovery.DiscoveryAddressAdded += OnDiscoveryAddressAdded;
     _device = new Device
                     {
                         DeviceType = DeviceType.SmartPhone,
                         DevicePortability = DevicePortability.Mobile,
                         Name = Build.Device
                     };
     _discovery.Find();
 }
Пример #3
0
 private void RunDiscovery()
 {
     Task.Factory.StartNew(() =>
     {
         _disc = new DiscoveryManager();
         _disc.DiscoveryAddressAdded += DiscDiscoveryAddressAdded;
         _disc.DiscoveryFinished += DiscDiscoveryFinished;
         _disc.Find(DiscoveryType.WSDiscovery);
     });
 }
Пример #4
0
        /// <summary>
        /// Runs the discovery manager to find managers on the local network
        /// </summary>
        private  void RunDiscovery()
        {
            _serviceList.Clear();

         Task.Factory.StartNew(
                delegate 
                {
                        _disc = new DiscoveryManager();
                        _disc.DiscoveryAddressAdded += DiscDiscoveryAddressAdded;
                        _disc.Find(Settings.Default.DISCOVERY_TYPE);
                    });
        }
Пример #5
0
        private void RunDiscovery()
        {
            try
            {
                Task.Factory.StartNew(delegate {  
                    var disc = new DiscoveryManager();
                    disc.DiscoveryAddressAdded += new DiscoveryManager.DiscoveryAddressAddedHandler(DiscDiscoveryAddressAdded);
                    disc.Find();
                });
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());

            }

        }