Esempio n. 1
0
        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");
            }
        }
Esempio n. 2
0
        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");
            }
        }