public void StopDiscovery() { if (browser != null) { browser.Stop(); } }
private void startStopButton_Click(object sender, EventArgs e) { if (!mBrowsing) { try { Debug.WriteLine(String.Format("Bonjour Version: {0}", NetService.DaemonVersion)); } catch (Exception ex) { String message = ex is DNSServiceException ? "Bonjour is not installed!" : ex.Message; MessageBox.Show(message, "Critical Error", MessageBoxButtons.OK, MessageBoxIcon.Information); Application.Exit(); } } if (!mBrowsing) { string service = serviceTextBox.Text; try { nsBrowser.SearchForService(service, ""); mBrowsing = true; } catch (Exception ex) { MessageBox.Show(ex.Message, "Critical Error"); } } else { nsBrowser.Stop(); if (resolvingService != null) { resolvingService.Stop(); resolvingService = null; } ClearTXTInfo(); ClearResolveInfo(); servicesList.BeginUpdate(); servicesList.Items.Clear(); servicesList.EndUpdate(); mBrowsing = false; } if (mBrowsing) { startStopButton.Text = "Stop"; } else { startStopButton.Text = "Start"; } }
public static void StopSearchingForPairingUtility() { if (_pairingUtilityBrowser == null) { return; } _log.Info("Stopping search for pairing utility..."); UnhookEvents(); _pairingUtilityBrowser.Stop(); ThreadUtility.RunOnUIThread(() => { DiscoveredPairingUtilities.Clear(); }); _pairingUtilityBrowser = null; }
public void Stop() { if (browser != null) { browser.Stop(); browser = null; lock (serverInfoLock) serverInfos = null; } }
private static void Stop() { if (!_serverBrowser.IsRunning) { return; } _serverBrowser.Stop(); lock (DiscoveredServers) DiscoveredServers.Clear(); }
private void startBrowsing() { if (!mBrowsing) { try { Debug.WriteLine(String.Format("Bonjour Version: {0}", NetService.DaemonVersion)); } catch (Exception ex) { String message = ex is DNSServiceException ? "Bonjour is not installed!" : ex.Message; MessageBox.Show(message, "Critical Error", MessageBoxButtons.OK, MessageBoxIcon.Information); Application.Exit(); } } if (!mBrowsing) { string service = "_airmagic._tcp"; try { nsBrowser.SearchForService(service, ""); mBrowsing = true; } catch (Exception ex) { MessageBox.Show(ex.Message, "Critical Error"); } } else { nsBrowser.Stop(); if (resolvingService != null) { resolvingService.Stop(); resolvingService = null; } mBrowsing = false; } if (mBrowsing) { } else { } }
private void StopServiceBrowser() { if (_browser == null) { return; } _browser.ServiceFound -= _browser_ServiceFound; _browser.ServiceRemoved -= _browser_ServiceRemoved; _browser.Stop(); _services.Clear(); browseStartButton.IsEnabled = true; browseStopButton.IsEnabled = false; }
private void StopServiceBrowser() { StopBrowseButton.IsEnabled = false; if (_browser != null) { _browser.ServiceFound -= _browser_ServiceFound; _browser.ServiceRemoved -= _browser_ServiceRemoved; _browser.Stop(); } _discoveredServices = null; PageViewSource["DiscoveredServices"] = null; StartBrowseButton.IsEnabled = true; }
/// <summary> /// /// </summary> /// <param name="disposing"></param> protected override void Dispose(bool disposing) { if (disposing) { if (components != null) { components.Dispose(); } if (nsBrowser != null) { nsBrowser.Stop(); } } base.Dispose(disposing); Environment.Exit(1); }
/// <summary> /// Close the PairingServer which stops the mDNS browser and clears the services. /// </summary> public void Stop() { Console.WriteLine("Shutting Down DACPPairingServer..."); nsBrowser.Stop(); services.Clear(); }
public void StopSearch() { browser.Stop(); }