示例#1
0
        private void InitializeVideoBrush()
        {
            var cr = _videoBrush.RelativeTransform as CompositeTransform;

            if (cr != null)
            {
                cr.Rotation = _photoCamera.Orientation;
            }

            try
            {
                _luminanceSource = new PhotoCameraLuminanceSource(
                    Convert.ToInt32(_photoCamera.PreviewResolution.Width),
                    Convert.ToInt32(_photoCamera.PreviewResolution.Height));
                _initialized = true;
                StartScanning();
            }
            catch (Exception ex)
            {
                OnError(ex);
            }
        }
示例#2
0
        private void InitializeVideoBrush()
        {
            var cr = _videoBrush.RelativeTransform as CompositeTransform;
            if (cr != null)
            {
                cr.Rotation = _photoCamera.Orientation;
            }

            try
            {
                _luminanceSource = new PhotoCameraLuminanceSource(
                    Convert.ToInt32(_photoCamera.PreviewResolution.Width),
                    Convert.ToInt32(_photoCamera.PreviewResolution.Height));
                _initialized = true;
                StartScanning();
            }
            catch (Exception ex)
            {
                OnError(ex);
            }
        }