Example #1
0
        /// <summary>
        /// Makes a discovery of nearby QTM Servers and updates the known locations accordingly
        /// During the discovery the list will be in a refresh state
        /// </summary>
        public Task <IEnumerable <QTMServer> > LoadQTMServersAsync()
        {
            return(Task.Run(() => {
                // BUG: The application will crash upon a second refresh
                // JNI ERROR (app bug): attempt to use stale local reference 0x100019 (should be 0x200019)
                List <QTMRealTimeSDK.DiscoveryResponse> DiscoveryResponse = connection.DiscoverQTMServers();


                return DiscoveryResponse.Select(server => new QTMServer(server.IpAddress,
                                                                        server.HostName,
                                                                        server.Port.ToString(),
                                                                        server.InfoText,
                                                                        server.CameraCount.ToString())
                                                );
            }));
        }
        /// <summary>
        /// Makes a discovery of nearby QTM Servers and updates the known locations accordingly
        /// During the discovery the list will be in a refresh state
        /// </summary>
        public void LoadQTMServers()
        {
            // EMAN HACK!
            OnConnectionStarted();
            return;

            // EMAN HACK!

            IsRefreshing = true;

            List <QTMRealTimeSDK.RTProtocol.DiscoveryResponse> DiscoveryResponse = networkConnection.DiscoverQTMServers();

            QTMServers = DiscoveryResponse.Select(server => new QTMServer(server.IpAddress,
                                                                          server.HostName,
                                                                          server.Port.ToString(),
                                                                          server.InfoText,
                                                                          server.CameraCount.ToString())
                                                  );

            IsRefreshing = false;
        }