Esempio n. 1
0
        /// <summary>
        /// Handles the PhotoCaptured event of the CameraDevice control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="PhotoCapturedEventArgs"/> instance containing the event data.</param>
        void CameraDevice_PhotoCaptured(object sender, PhotoCapturedEventArgs e)
        {
            try
            {
                e.CameraDevice.IsBusy = true;
                e.Transfer(e.FileName);
                ImageLocation = e.FileName;
            }
            finally
            {
                e.CameraDevice.IsBusy = false;
            }

            if (Captured != null)
            {
                Captured(this, e);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Handles the PhotoCaptured event of the CameraDevice control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="PhotoCapturedEventArgs"/> instance containing the event data.</param>
        void CameraDevice_PhotoCaptured(object sender, PhotoCapturedEventArgs e)
        {
            try
            {
                e.CameraDevice.IsBusy = true;
                e.Transfer(e.FileName);
                ImageView.Source = new BitmapImage(new Uri(e.FileName));
            }
            finally
            {
                e.CameraDevice.IsBusy = false;
            }

            if (Captured != null)
            {
                Captured(this, e);
            }
        }