Пример #1
0
 protected virtual void InvokeInterfaceRemovedEvent(InterfaceNotificationEventsArgs e)
 {
     if (InterfaceRemovedEvent != null)
     {
         InterfaceRemovedEvent(this, e);
     }
 }
Пример #2
0
 private void WlanClient_InterfaceRemovedEvent(object sender, InterfaceNotificationEventsArgs e)
 {
     OnInterfaceRemoved(e.ItsGuid);
 }
Пример #3
0
 private void WlanClient_InterfaceArrivedEvent(object sender, InterfaceNotificationEventsArgs e)
 {
     OnInterfaceAdded(e.MyGuid);
 }
 private void WlanClient_InterfaceRemoveEvent(object sender, InterfaceNotificationEventsArgs e)
 {
     if (e.ItsGuid == new Guid(_scanner.Interface.Id))
     {
         //If we were using the interface that got removed, stop scanning!
         if (InvokeRequired)
             Invoke(new DelInterfaceChange(WlanClient_InterfaceRemoveEvent), new[] { sender, e });
         else
         {
             StopScan();
         }
     }
     UpdateInterfaceList();
 }
        private void WlanClient_InterfaceAddedEvent(object sender, InterfaceNotificationEventsArgs e)
        {
            UpdateInterfaceList();
            //If we are not scanning and a new interface is added, use it!
            if (!_scanner.NetworkScanner.IsScanning && _scanner.SetInterface(e.ItsGuid))
            {
                try
                {
                    //Reset cache data
                    _scanner.Cache.Clear();
                    Utilities.ResetColor();

                    //These will always need to be invoked
                    Invoke(new DelInvokeNoArg(UpdateSelection));
                    Invoke(new DelInvokeNoArg(StartScan));
                }
                catch (InvalidOperationException)
                {
                    // Exception thrown if UI isn't fully initialized yet.
                    // Ignoring this exception will force the user to manually click the "Start" button
                }
            }
        }
 private void WlanClient_InterfaceAddedEvent(object sender, InterfaceNotificationEventsArgs e)
 {
     UpdateInterfaceList();
     //If we are not scanning and a new interface is added, use it!
     if (!_scanner.NetworkScanner.IsScanning && _scanner.SetInterface(e.MyGuid))
     {
         //This will always need to be invoked
         Invoke(new DelInvokeNoArg(StartScan));
     }
 }