Exemplo n.º 1
0
 public EventObserver(CameraServiceClient10 client)
 {
     this.client = client;
 }
Exemplo n.º 2
0
 private void SearchButton_Click(object sender, RoutedEventArgs e)
 {
     finder.SearchDevices(10,
         (info) =>
         {
             Debug.WriteLine("DeviceFound: " + info.UDN);
             if (info.Endpoints.Keys.Contains("camera"))
             {
                 client = new CameraServiceClient10(info.Endpoints["camera"]);
             }
             data.add("DeviceFound: " + info.UDN);
         },
         () =>
         {
             Debug.WriteLine("Search Timeout");
             data.add("SSDP timeout");
         });
 }
Exemplo n.º 3
0
        private void OnServerFound(DeviceInfo di, Action Found)
        {
            DeviceInfo = di;
            Debug.WriteLine("found device: " + DeviceInfo.ModelName);

            if (DeviceInfo.Endpoints.ContainsKey("camera"))
            {
                client = new CameraServiceClient10(di.Endpoints["camera"]);
                Debug.WriteLine(di.Endpoints["camera"]);
                GetMethodTypes(Found);
                cameraStatus.isAvailableConnecting = true;

                observer = new EventObserver(client);
            }
            // TODO be careful, device info is updated to the latest found device.

            NoticeUpdate();
        }