コード例 #1
0
        private void RunTest()
        {
            _foundProximalDevices = 0;
            _foundCloudDevices    = 0;

            PingPong.DiscoverDevices();

            //wait around for responses
            Task.Delay(20000).Wait();

            ShowToast("Roman Test Finished", String.Format("Proximal: {0} Cloud: {1}", _foundProximalDevices, _foundCloudDevices));
        }
コード例 #2
0
ファイル: MainPage.xaml.cs プロジェクト: cmknox/cdpPingPong
        private void RefreshDevices()
        {
            DetailContentPresenter.Visibility = Visibility.Collapsed;
            if (_registeredHandlers == false)
            {
                PingPong.OnAppServiceConnected += PingPong_OnAppServiceConnected;
                PingPong.OnRemoteDeviceAdded   += PingPong_OnRemoteDeviceAdded;
                PingPong.OnRemoteDeviceUpdated += PingPong_OnRemoteDeviceUpdated;
                PingPong.OnRemoteDeviceRemoved += PingPong_OnRemoteDeviceRemoved;
                PingPong.OnStatusUpdateMessage += PingPong_OnStatusUpdateMessage;
                PingPong.OnErrorMessage        += PingPong_OnErrorMessage;

                _registeredHandlers = true;
            }

            RemoteSystemInfoCollection.Clear();
            PingPong.DiscoverDevices();
        }