protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            if (flashInitialized == false)
            {
                // Check to see if the camera is available on the device.
                if (PhotoCamera.IsCameraTypeSupported(CameraType.Primary))
                {
                    // Use standard camera on back of device.
                    _videoCamera = new VideoCamera();

                    // Event is fired when the video camera object has been initialized.
                    _videoCamera.Initialized += VideoCamera_Initialized;

                    // Add the photo camera to the video source
                    _videoCameraVisualizer = new VideoCameraVisualizer();
                    _videoCameraVisualizer.SetSource(_videoCamera);
                }
                flashInitialized = true;
            }

            if (settings.Contains("myInfo"))
            {
                iceText.Text = settings["myInfo"].ToString();
            }
            else
            {
                settings.Add("myInfo", "IMPORTANT IN CASE OF EMERGENCY INFORMATION: PLEASE CHANGE");
            }
        }
        protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            if (flashInitialized == false)
            {
                // Check to see if the camera is available on the device.
                if (PhotoCamera.IsCameraTypeSupported(CameraType.Primary))
                {
                    // Use standard camera on back of device.
                    _videoCamera = new VideoCamera();

                    // Event is fired when the video camera object has been initialized.
                    _videoCamera.Initialized += VideoCamera_Initialized;

                    // Add the photo camera to the video source
                    _videoCameraVisualizer = new VideoCameraVisualizer();
                    _videoCameraVisualizer.SetSource(_videoCamera);
                }
                flashInitialized = true;
            }

            if (settings.Contains("myInfo"))
            {
                iceText.Text = settings["myInfo"].ToString();
            }
            else
            {
                settings.Add("myInfo", "IMPORTANT IN CASE OF EMERGENCY INFORMATION: PLEASE CHANGE");
            }
        }
 public void SetSource(VideoCamera camera)
 {
     // Invoke the set source method on the camera visualizer object.
     _cameraVisualizerSetSourceMethod.Invoke(_cameraVisualizer, new object[] { camera.InnerCameraObject });
 }
 public void SetSource(VideoCamera camera)
 {
     // Invoke the set source method on the camera visualizer object.
     _cameraVisualizerSetSourceMethod.Invoke(_cameraVisualizer, new object[] { camera.InnerCameraObject });
 }