예제 #1
0
        private async Task checkConnection(CancellationTokenSource cancel)
        {
            var adapters = await SsdpDiscovery.GetActiveAdaptersAsync();

            discovery.TargetNetworkAdapters = adapters;

            while (!cancel.IsCancellationRequested)
            {
                SearchCamera();
                SearchCds();
                await Task.Delay(5000).ConfigureAwait(false);
            }
        }
예제 #2
0
        private async Task checkConnection(CancellationTokenSource cancel)
        {
            var adapters = await SsdpDiscovery.GetActiveAdaptersAsync();

            discovery.TargetNetworkAdapters = adapters;

            while (!cancel.IsCancellationRequested)
            {
                if (ApplicationSettings.GetInstance().QuickConnectionEnabled)
                {
                    EstablishQuickConnectionToCamera();
                }

                SearchCamera();
                SearchCds();
                await Task.Delay(5000).ConfigureAwait(false);
            }
        }