Esempio n. 1
0
 public void Start()
 {
     if (_video != null)
     {
         _video.StartVideo();
     }
 }
        private void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            FoscamCameraType cameraType =
        #if USE_FOSCAM_HD_CAMERA
                FoscamCameraType.FoscamHD;
        #else
                FoscamCameraType.FoscamMJPEG;
        #endif

            _video  = FoscamVideo.CreateFoscamVideoController(cameraType, CAMERA_URL, USERNAME, PASSWORD);
            _motion = FoscamMotion.CreateFoscamMotionController(cameraType, CAMERA_URL, USERNAME, PASSWORD);
            _zoom   = FoscamZoom.CreateFoscamZoomController(cameraType, CAMERA_URL, USERNAME, PASSWORD);

            if (_video != null)
            {
                UIElement player = _video.VideoDisplay;
                player.SetValue(Grid.RowProperty, 0);
                //player.SetValue(Canvas.ZIndexProperty, -1);
                LayoutRoot.Children.Add(player);
                _video.StartVideo();
            }
        }