protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
      {
         base.OnNavigatedTo(e);

         // Delayed due to Camera init bug in WP71 SDK Beta 2
         // See http://forums.create.msdn.com/forums/p/85830/516843.aspx
         Dispatcher.BeginInvoke(() =>
                                {

                                   // Initialize the webcam
                                   photoCamera = new PhotoCamera();
                                   photoCamera.Initialized += PhotoCameraInitialized;
                                   CameraButtons.ShutterKeyHalfPressed += PhotoCameraButtonHalfPress;
                                   isInitialized = false;
                                   isDetecting = false;

                                   // Fill the Viewport Rectangle with the VideoBrush
                                   var vidBrush = new VideoBrush();
                                   vidBrush.SetSource(photoCamera);
                                   Viewport.Fill = vidBrush;

                                   // Start timer
                                   dispatcherTimer = new DispatcherTimer {Interval = TimeSpan.FromMilliseconds(50)};
                                   dispatcherTimer.Tick += (sender, e1) => Detect();
                                   dispatcherTimer.Start();
                                });
      }
Exemple #2
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/WindowsPhone8Demo;component/MainPage.xaml", System.UriKind.Relative));
     this.LayoutRoot         = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.Header             = ((System.Windows.Controls.TextBlock)(this.FindName("Header")));
     this.BarcodeImage       = ((System.Windows.Controls.Image)(this.FindName("BarcodeImage")));
     this.previewRect        = ((System.Windows.Controls.Grid)(this.FindName("previewRect")));
     this.previewVideo       = ((System.Windows.Media.VideoBrush)(this.FindName("previewVideo")));
     this.previewTransform   = ((System.Windows.Media.CompositeTransform)(this.FindName("previewTransform")));
     this.barCodeBorder      = ((System.Windows.Controls.Border)(this.FindName("barCodeBorder")));
     this.barcodeUITransform = ((System.Windows.Media.CompositeTransform)(this.FindName("barcodeUITransform")));
     this.LayoutButtons      = ((System.Windows.Controls.Grid)(this.FindName("LayoutButtons")));
     this.OpenImageButton    = ((System.Windows.Controls.Button)(this.FindName("OpenImageButton")));
     this.CameraButton       = ((System.Windows.Controls.Button)(this.FindName("CameraButton")));
     this.GenerateButton     = ((System.Windows.Controls.Button)(this.FindName("GenerateButton")));
     this.BarcodeTypeLabel   = ((System.Windows.Controls.TextBlock)(this.FindName("BarcodeTypeLabel")));
     this.BarcodeType        = ((System.Windows.Controls.ListBox)(this.FindName("BarcodeType")));
     this.BarcodeTypeContent = ((System.Windows.Controls.TextBlock)(this.FindName("BarcodeTypeContent")));
     this.BarcodeContent     = ((System.Windows.Controls.TextBox)(this.FindName("BarcodeContent")));
 }
        void Load()
        {
            if (CaptureDeviceConfiguration.AllowedDeviceAccess ||
                            CaptureDeviceConfiguration.RequestDeviceAccess())
            {
                var devices = CaptureDeviceConfiguration.GetAvailableVideoCaptureDevices();

                foreach (var device in devices)
                {
                    var videoItem = new VideoItem();
                    videoItem.Name = device.FriendlyName;

                    var source = new CaptureSource();
                    source.VideoCaptureDevice = device;
                    var videoBrush = new VideoBrush();
                    videoBrush.SetSource(source);
                    videoItem.Brush = videoBrush;
                    this.sources.Add(source);
                    this.sourceItems.Add(videoItem);
                }

                this.videoItems.ItemsSource = this.sourceItems;
                this.StartAll();
            }
        }
        public void stopScanner(string options)
        {
            if (canvas != null)
            {
                ScannerPage.isClosing = true;
                Deployment.Current.Dispatcher.BeginInvoke(delegate()
                {
                    if (scannerPage != null)
                    {
                        BarcodeScannerPage.ScannerPage.cameraDevice.Dispose();
                        if ((int)ScannerPage.param_OverlayMode == 1)
                        {
                            MWOverlay.removeOverlay();
                        }
                        else if ((int)ScannerPage.param_OverlayMode == 1)
                        {
                            canvas.Children.Remove(imgOverlay);
                        }

                        (currentPage.FindName("LayoutRoot") as Grid).Children.Remove(canvas);
                        if (flashButton != null)
                        {
                            (currentPage.FindName("LayoutRoot") as Grid).Children.Remove(flashButton);
                            flashButton = null;
                        }

                        scannerPage.stopCamera();
                        scannerPage = null;
                        canvas      = null;
                        videoBrush  = null;
                    }
                });
            }
        }
Exemple #5
0
        public VideoService(
            Rectangle viewFinder,
            MediaElement player
            )
        {
            // Initial State
            _State = PlayState.Paused;
            _CanRecord = false;

            _Record = new SwitchableCommand(OnRecord);
            _Play = new SwitchableCommand(OnPlay);
            _Stop = new SwitchableCommand(OnPause);

            _ViewFinder = viewFinder;

            _Player = player;
            _Player.MediaEnded += MediaEnded;

            _CaptureSource = new CaptureSource();
            _CaptureSource.CaptureFailed += CaptureFailed;

            _FileSink = new FileSink();
            _Brush = new VideoBrush();

            _HasRecording = new BehaviorSubject<bool>(false);
        }
        public void StartWebCam()
        {
            _captureSource = new CaptureSource();
            _captureSource.CaptureImageCompleted += new EventHandler<CaptureImageCompletedEventArgs>(_captureSource_CaptureImageCompleted);
            _captureSource.VideoCaptureDevice = CaptureDeviceConfiguration.GetDefaultVideoCaptureDevice();

            try
            {
                // Start capturing
                if (_captureSource.State != CaptureState.Started)
                {
                    // Create video brush and fill the WebcamVideo rectangle with it
                    var vidBrush = new VideoBrush();
                    vidBrush.Stretch = Stretch.Uniform;
                    vidBrush.SetSource(_captureSource);
                    WebcamVideo.Fill = vidBrush;

                    // Ask user for permission and start the capturing
                    if (CaptureDeviceConfiguration.RequestDeviceAccess())
                    {
                        _captureSource.Start();
                    }
                }
            }
            catch (InvalidOperationException)
            {
                InfoTextBox.Text = "Web Cam already started - if not, I can't find it...";
            }
            catch (Exception)
            {
                InfoTextBox.Text = "Could not start web cam, do you have one?";
            }
        }
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/EjemploCaptureSource;component/MainPage.xaml", System.UriKind.Relative));
     this.BrochaVideo = ((System.Windows.Media.VideoBrush)(this.FindName("BrochaVideo")));
 }
Exemple #8
0
		public void Destructive ()
		{
			VideoBrush vb = new VideoBrush ();
			// from this instance we can change all default values
			BrushTest.DestructiveRelativeTransform (vb);
			BrushTest.DestructiveTransform (vb);
			// but it's safe to execute since we revert the changes
		}
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Ejemplo%20Leer%20C%C3%B3digo%20Barras;component/MainPage.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.VideoBrushBackground = ((System.Windows.Media.VideoBrush)(this.FindName("VideoBrushBackground")));
 }
Exemple #10
0
        void MainPage_Loaded(object sender, RoutedEventArgs e)
        {
            
            captureSource = new CaptureSource
                                {
                                    VideoCaptureDevice = CaptureDeviceConfiguration.GetDefaultVideoCaptureDevice()
                                };

            var videoBrush = new VideoBrush();
            videoBrush.SetSource(captureSource);
            Viewport.Fill = videoBrush;

            markerDetector = new CaptureSourceMarkerDetector();
            var marker = Marker.LoadFromResource("Bola.pat", 64, 64, 80);
            markerDetector.Initialize(captureSource, 1d, 4000d, marker);

            markerDetector.MarkersDetected += (obj, args) =>
                                                  {
                                                      Dispatcher.BeginInvoke(() =>
                                                                                 {
                                                                                     var results = args.DetectionResults;
                                                                                     if (results.HasResults)
                                                                                     {
                                                                                         var centerAtOrigin =
                                                                                             Matrix3DFactory.
                                                                                                 CreateTranslation(
                                                                                                     -Imagem.ActualWidth*
                                                                                                     0.5,
                                                                                                     -Imagem.
                                                                                                          ActualHeight*
                                                                                                     0.5, 0);
                                                                                         var scale =
                                                                                             Matrix3DFactory.CreateScale
                                                                                                 (0.5, -0.5, 0.5);
                                                                                         var world = centerAtOrigin*
                                                                                                     scale*
                                                                                                     results[0].
                                                                                                         Transformation;
                                                                                         var vp =
                                                                                             Matrix3DFactory.
                                                                                                 CreateViewportTransformation
                                                                                                 (Viewport.ActualWidth,
                                                                                                  Viewport.ActualHeight);
                                                                                         var m =
                                                                                             Matrix3DFactory.
                                                                                                 CreateViewportProjection
                                                                                                 (world,
                                                                                                  Matrix3D.Identity,
                                                                                                  markerDetector.
                                                                                                      Projection, vp);
                                                                                         Imagem.Projection =
                                                                                             new Matrix3DProjection
                                                                                                 {ProjectionMatrix = m};
                                                                                     }
                                                                                 });
                                                  };
        }
 /// <summary>
 /// captures images at specified time intervals
 /// </summary>
 /// <param name="vb">a videobrush object for the camera</param>
 /// <param name="samplingFrequency">time between image captures(in minutes)</param>
 /// <param name="count">number of times images are to be captured</param>
 public void CaptureImage(VideoBrush vb,int samplingFrequency, int count)
 {
     this.count=count;
     source = new EventSource(samplingFrequency, 0);
     source.OnEvent += new EventSource.TickEventHandler(Source_OnEvent);
     source.Start();
     source.OffEvent += new EventSource.TickEventHandler(Source_OffEvent);
        InitializeCamera(vb);
 }
Exemple #12
0
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Tutorial16%20-%20Multiple%20Viewport%20-%20Phone;component/GamePage.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.viewfinderBrush = ((System.Windows.Media.VideoBrush)(this.FindName("viewfinderBrush")));
 }
Exemple #13
0
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/LocalD;component/Pages/CameraPage.xaml", System.UriKind.Relative));
     this.CameraViewbox = ((System.Windows.Controls.Viewbox)(this.FindName("CameraViewbox")));
     this.ViewfinderCanvas = ((System.Windows.Controls.Canvas)(this.FindName("ViewfinderCanvas")));
     this.ViewfinderBrush = ((System.Windows.Media.VideoBrush)(this.FindName("ViewfinderBrush")));
 }
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/TaskyWinPhone;component/PageCam.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.viewfinderCanvas = ((System.Windows.Controls.Canvas)(this.FindName("viewfinderCanvas")));
     this.viewfinderBrush = ((System.Windows.Media.VideoBrush)(this.FindName("viewfinderBrush")));
 }
Exemple #15
0
		public void NullSource ()
		{
			VideoBrush vb = new VideoBrush ();
			Assert.Throws<NullReferenceException> (delegate {
				vb.SetSource ((MediaElement) null);
			}, "MediaElement");
			Assert.Throws<NullReferenceException> (delegate {
				vb.SetSource ((CaptureSource) null);
			}, "CaptureSource");
		}
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/com.ninki.wallet;component/Plugins/com.phonegap.plugins.barcodescanner/BarcodeSc" +
                 "annerUI.xaml", System.UriKind.Relative));
     this.CameraCanvas = ((System.Windows.Controls.Canvas)(this.FindName("CameraCanvas")));
     this.CameraBrush = ((System.Windows.Media.VideoBrush)(this.FindName("CameraBrush")));
 }
Exemple #17
0
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Tutorial8%20-%20Optical%20Marker%20Tracking%20-%20Silverlight;component/GamePage" +
                 ".xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.viewfinderBrush = ((System.Windows.Media.VideoBrush)(this.FindName("viewfinderBrush")));
 }
 public void InitCamera(VideoBrush CurrentVideoBrush)
 {
    
     this.Camera = new PhotoCamera(CameraType.Primary);
   
     this.Camera.Initialized += Camera_Initialized;
     this.Camera.CaptureCompleted += Camera_CaptureCompleted;
     this.Camera.CaptureImageAvailable += Camera_CaptureImageAvailable;
     //Set the VideoBrush source to the camera.
     CurrentVideoBrush.SetSource(Camera);
 }
Exemple #19
0
        // Constructor
        public MainPage()
        {
            InitializeComponent();
            c = new CaptureSource();
            c.VideoCaptureDevice = CaptureDeviceConfiguration.GetAvailableVideoCaptureDevices().First();

            var vidBrush = new VideoBrush();
            vidBrush.SetSource(c);
            ViewPort.Fill = vidBrush;         
                        
        }
Exemple #20
0
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/SmartLib;component/ScanPage2.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this._previewRect = ((System.Windows.Shapes.Rectangle)(this.FindName("_previewRect")));
     this.previewVideo = ((System.Windows.Media.VideoBrush)(this.FindName("previewVideo")));
     this._previewTransform = ((System.Windows.Media.CompositeTransform)(this.FindName("_previewTransform")));
 }
      private void UserControl_Loaded(object sender, RoutedEventArgs e)
      {
         // Initialize the webcam
         captureSource = new CaptureSource();
         captureSource.VideoCaptureDevice = CaptureDeviceConfiguration.GetDefaultVideoCaptureDevice();

         // Fill the Viewport Rectangle with the VideoBrush
         var vidBrush = new VideoBrush();
         vidBrush.SetSource(captureSource);
         Viewport.Fill = vidBrush;
      }
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/SmartParking;component/BarcodeScanner.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.viewfinderBrush = ((System.Windows.Media.VideoBrush)(this.FindName("viewfinderBrush")));
     this.txtDebug = ((System.Windows.Controls.TextBlock)(this.FindName("txtDebug")));
     this.ShutterButton = ((System.Windows.Controls.Button)(this.FindName("ShutterButton")));
 }
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/no.jcp.congresso;component/Plugins/org.bloxlab.barcodescanner/CameraScan.xaml", System.UriKind.Relative));
     this.cnvCamera = ((System.Windows.Controls.Canvas)(this.FindName("cnvCamera")));
     this.vbCamera = ((System.Windows.Media.VideoBrush)(this.FindName("vbCamera")));
     this.bdrScanner = ((System.Windows.Controls.Border)(this.FindName("bdrScanner")));
     this.lnScanner = ((System.Windows.Shapes.Line)(this.FindName("lnScanner")));
 }
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Slime%20Volleyball;component/Game_Page.xaml", System.UriKind.Relative));
     this.LayoutRoot      = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.viewfinderBrush = ((System.Windows.Media.VideoBrush)(this.FindName("viewfinderBrush")));
 }
Exemple #25
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Mobile%20Security%20System;component/MainPage.xaml", System.UriKind.Relative));
     this.textBlock  = ((System.Windows.Controls.TextBlock)(this.FindName("textBlock")));
     this.videoBrush = ((System.Windows.Media.VideoBrush)(this.FindName("videoBrush")));
 }
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/RealtimeFilterDemo;component/MainPage.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.BackgroundVideoBrush = ((System.Windows.Media.VideoBrush)(this.FindName("BackgroundVideoBrush")));
     this.StatusTextBlock = ((System.Windows.Controls.TextBlock)(this.FindName("StatusTextBlock")));
     this.FrameRateTextBlock = ((System.Windows.Controls.TextBlock)(this.FindName("FrameRateTextBlock")));
 }
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/PDFReaderLauncher;component/Page1.xaml", System.UriKind.Relative));
     this.CameraCanvas = ((System.Windows.Controls.Canvas)(this.FindName("CameraCanvas")));
     this.CameraBrush  = ((System.Windows.Media.VideoBrush)(this.FindName("CameraBrush")));
 }
Exemple #28
0
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Lector%20Codigos;component/MainPage.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this._previewRect = ((System.Windows.Shapes.Rectangle)(this.FindName("_previewRect")));
     this._previewVideo = ((System.Windows.Media.VideoBrush)(this.FindName("_previewVideo")));
     this._previewTransform = ((System.Windows.Media.CompositeTransform)(this.FindName("_previewTransform")));
     this._matchesList = ((System.Windows.Controls.ListBox)(this.FindName("_matchesList")));
 }
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/LocalD;component/Pages/CameraPage.xaml", System.UriKind.Relative));
     this.CameraViewbox    = ((System.Windows.Controls.Viewbox)(this.FindName("CameraViewbox")));
     this.ViewfinderCanvas = ((System.Windows.Controls.Canvas)(this.FindName("ViewfinderCanvas")));
     this.ViewfinderBrush  = ((System.Windows.Media.VideoBrush)(this.FindName("ViewfinderBrush")));
 }
        /// <summary>
        /// Creates a video capture using Mango's phone camera.
        /// </summary>
        public PhoneCameraCapture(VideoBrush videoBrush)
        {
            this.videoBrush = videoBrush;
            cameraInitialized = false;
            cameraReady = false;

            videoDeviceID = -1;

            cameraWidth = 0;
            cameraHeight = 0;
            grayscale = false;
        }
Exemple #31
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/LegoBot.Phone;component/CameraPage.xaml", System.UriKind.Relative));
     this.LayoutRoot      = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.ContentPanel    = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.viewfinderBrush = ((System.Windows.Media.VideoBrush)(this.FindName("viewfinderBrush")));
 }
Exemple #32
0
        public Camera(VideoBrush video, int photocount)
        {
            if (PhotoCamera.IsCameraTypeSupported(CameraType.Primary) == true)
            {
                // There is a camera. Which I already know. But useful if I decide to use this in any other apps.

                cam = new Microsoft.Devices.PhotoCamera(CameraType.Primary);
                photoname = photocount;
                videobrush = video;

            }
        }
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/SpaceLabeler;component/MainPage.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.videoBrush = ((System.Windows.Media.VideoBrush)(this.FindName("videoBrush")));
     this.gobutton = ((System.Windows.Controls.Button)(this.FindName("gobutton")));
     this.searchbar = ((System.Windows.Controls.TextBox)(this.FindName("searchbar")));
     this.webBrowser1 = ((Microsoft.Phone.Controls.WebBrowser)(this.FindName("webBrowser1")));
 }
Exemple #34
0
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/ARSampleApp;component/MainPage.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.videoRectangle = ((System.Windows.Shapes.Rectangle)(this.FindName("videoRectangle")));
     this.viewfinderBrush = ((System.Windows.Media.VideoBrush)(this.FindName("viewfinderBrush")));
     this.videoBrushTransform = ((System.Windows.Media.CompositeTransform)(this.FindName("videoBrushTransform")));
     this.arPanel = ((SharpGIS.AR.Controls.ARPanel)(this.FindName("arPanel")));
 }
 public void UnloadCamera()
 {
     if (VideoBrush != null)
     {
         RunOnUIThread(() =>
         {
             Rectangle.Fill = null;
             Rectangle = null;
             VideoBrush = null;
         });
     }
 }
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Assignment1;component/Capture.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.cnvViewfinder = ((System.Windows.Controls.Canvas)(this.FindName("cnvViewfinder")));
     this.brushviewfinder = ((System.Windows.Media.VideoBrush)(this.FindName("brushviewfinder")));
     this.btnCapture = ((System.Windows.Controls.Button)(this.FindName("btnCapture")));
     this.ContentPanel = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
 }
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Information%20Home;component/Scenic_Sharing1.xaml", System.UriKind.Relative));
     this.LayoutRoot    = ((System.Windows.Controls.Canvas)(this.FindName("LayoutRoot")));
     this.Re_video      = ((System.Windows.Shapes.Rectangle)(this.FindName("Re_video")));
     this.TheVideoBrush = ((System.Windows.Media.VideoBrush)(this.FindName("TheVideoBrush")));
     this.imgCapture    = ((System.Windows.Controls.Image)(this.FindName("imgCapture")));
 }
 public void LoadCamera(ICameraCaptureDevice camera)
 {
     if (VideoBrush == null && camera != null)
     {
         RunOnUIThread(() =>
         {
             VideoBrush = new VideoBrush();
             VideoBrush.Stretch = Stretch.Uniform;
             VideoBrush.SetSource(camera);
             Rectangle.Fill = VideoBrush;
         });
     }
 }
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Azuli.Acess.Control;component/MainPage.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.snapshot = ((System.Windows.Controls.Image)(this.FindName("snapshot")));
     this.photoButton = ((System.Windows.Controls.Button)(this.FindName("photoButton")));
     this.cameraButton = ((System.Windows.Controls.Button)(this.FindName("cameraButton")));
     this.saveButton = ((System.Windows.Controls.Button)(this.FindName("saveButton")));
     this.cameraBrush = ((System.Windows.Media.VideoBrush)(this.FindName("cameraBrush")));
 }
Exemple #40
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/SpaceTrek;component/View/Camera.xaml", System.UriKind.Relative));
     this.LayoutRoot       = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.viewfinderCanvas = ((System.Windows.Controls.Canvas)(this.FindName("viewfinderCanvas")));
     this.viewfinderBrush  = ((System.Windows.Media.VideoBrush)(this.FindName("viewfinderBrush")));
     this.Loader           = ((System.Windows.Controls.Grid)(this.FindName("Loader")));
 }
Exemple #41
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/ServiciosRest;component/MainPage.xaml", System.UriKind.Relative));
     this.LayoutRoot        = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this._previewRect      = ((System.Windows.Shapes.Rectangle)(this.FindName("_previewRect")));
     this._previewVideo     = ((System.Windows.Media.VideoBrush)(this.FindName("_previewVideo")));
     this._previewTransform = ((System.Windows.Media.CompositeTransform)(this.FindName("_previewTransform")));
     this._matchesList      = ((System.Windows.Controls.ListBox)(this.FindName("_matchesList")));
 }
Exemple #42
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/SimpleScanner;component/Capture.xaml", System.UriKind.Relative));
     this.LayoutRoot          = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.viewfinderCanvas    = ((System.Windows.Controls.Canvas)(this.FindName("viewfinderCanvas")));
     this.viewfinderBrush     = ((System.Windows.Media.VideoBrush)(this.FindName("viewfinderBrush")));
     this.viewfinderTransform = ((System.Windows.Media.CompositeTransform)(this.FindName("viewfinderTransform")));
     this.focusBrackets       = ((System.Windows.Controls.TextBlock)(this.FindName("focusBrackets")));
 }
Exemple #43
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/BasicCamera;component/MainPage.xaml", System.UriKind.Relative));
     this.LayoutRoot       = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.viewfinderCanvas = ((System.Windows.Controls.Canvas)(this.FindName("viewfinderCanvas")));
     this.viewfinderBrush  = ((System.Windows.Media.VideoBrush)(this.FindName("viewfinderBrush")));
     this.ShutterButton    = ((System.Windows.Controls.Button)(this.FindName("ShutterButton")));
     this.txtDebug         = ((System.Windows.Controls.TextBlock)(this.FindName("txtDebug")));
 }
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/MotionSample;component/AugmentedReality.xaml", System.UriKind.Relative));
     this.LayoutRoot       = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.TitlePanel       = ((System.Windows.Controls.StackPanel)(this.FindName("TitlePanel")));
     this.ApplicationTitle = ((System.Windows.Controls.TextBlock)(this.FindName("ApplicationTitle")));
     this.PageTitle        = ((System.Windows.Controls.TextBlock)(this.FindName("PageTitle")));
     this.ContentPanel     = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.CameraSource     = ((System.Windows.Media.VideoBrush)(this.FindName("CameraSource")));
 }
Exemple #45
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/PhotoGEN;component/MainPage.xaml", System.UriKind.Relative));
     this.LayoutRoot       = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.brdMain          = ((System.Windows.Controls.Border)(this.FindName("brdMain")));
     this.viewfinderCanvas = ((System.Windows.Controls.Canvas)(this.FindName("viewfinderCanvas")));
     this.viewfinderBrush  = ((System.Windows.Media.VideoBrush)(this.FindName("viewfinderBrush")));
     this.imgExample       = ((System.Windows.Controls.Image)(this.FindName("imgExample")));
     this.txtDebug         = ((System.Windows.Controls.TextBlock)(this.FindName("txtDebug")));
 }
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Tesis;component/Escaner.xaml", System.UriKind.Relative));
     this.LayoutRoot         = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.ContentPanel       = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.videoBrush         = ((System.Windows.Media.VideoBrush)(this.FindName("videoBrush")));
     this.compositeTransform = ((System.Windows.Media.CompositeTransform)(this.FindName("compositeTransform")));
     this._matchetList       = ((System.Windows.Controls.ListBox)(this.FindName("_matchetList")));
     this.ContentPanel2      = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel2")));
 }
Exemple #47
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Azuli.Acess.Control;component/MainPage.xaml", System.UriKind.Relative));
     this.LayoutRoot   = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.snapshot     = ((System.Windows.Controls.Image)(this.FindName("snapshot")));
     this.photoButton  = ((System.Windows.Controls.Button)(this.FindName("photoButton")));
     this.cameraButton = ((System.Windows.Controls.Button)(this.FindName("cameraButton")));
     this.saveButton   = ((System.Windows.Controls.Button)(this.FindName("saveButton")));
     this.cameraBrush  = ((System.Windows.Media.VideoBrush)(this.FindName("cameraBrush")));
 }
Exemple #48
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/BarCamp;component/Pages/ScanQRPage.xaml", System.UriKind.Relative));
     this.LayoutRoot         = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.previewRect        = ((System.Windows.Controls.Grid)(this.FindName("previewRect")));
     this.previewVideo       = ((System.Windows.Media.VideoBrush)(this.FindName("previewVideo")));
     this.previewTransform   = ((System.Windows.Media.CompositeTransform)(this.FindName("previewTransform")));
     this.barCodeBorder      = ((System.Windows.Controls.Border)(this.FindName("barCodeBorder")));
     this.barcodeUITransform = ((System.Windows.Media.CompositeTransform)(this.FindName("barcodeUITransform")));
 }
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/PhoneApp1;component/TakePhotoPage.xaml", System.UriKind.Relative));
     this.LayoutRoot       = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.TitlePanel       = ((System.Windows.Controls.StackPanel)(this.FindName("TitlePanel")));
     this.ApplicationTitle = ((System.Windows.Controls.TextBlock)(this.FindName("ApplicationTitle")));
     this.ContentPanel     = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.viewfinderCanvas = ((System.Windows.Controls.Canvas)(this.FindName("viewfinderCanvas")));
     this.viewfinderBrush  = ((System.Windows.Media.VideoBrush)(this.FindName("viewfinderBrush")));
     this.progressBar1     = ((System.Windows.Controls.ProgressBar)(this.FindName("progressBar1")));
 }
Exemple #50
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/WINDOWSPHONE8;component/CameraPage.xaml", System.UriKind.Relative));
     this.LayoutRoot          = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.viewfinderCanvas    = ((System.Windows.Controls.Canvas)(this.FindName("viewfinderCanvas")));
     this.viewfinderBrush     = ((System.Windows.Media.VideoBrush)(this.FindName("viewfinderBrush")));
     this.viewfinderTransform = ((System.Windows.Media.CompositeTransform)(this.FindName("viewfinderTransform")));
     this.focusBrackets       = ((System.Windows.Controls.TextBlock)(this.FindName("focusBrackets")));
     this.txtMessage          = ((System.Windows.Controls.TextBlock)(this.FindName("txtMessage")));
     this.AFButton            = ((System.Windows.Controls.Button)(this.FindName("AFButton")));
 }
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Remote%20Control;component/SynchronizationPage.xaml", System.UriKind.Relative));
     this.LayoutRoot       = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.TitlePanel       = ((System.Windows.Controls.StackPanel)(this.FindName("TitlePanel")));
     this.title            = ((System.Windows.Controls.TextBlock)(this.FindName("title")));
     this.ContentPanel     = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.previewRect      = ((System.Windows.Shapes.Rectangle)(this.FindName("previewRect")));
     this.previewVideo     = ((System.Windows.Media.VideoBrush)(this.FindName("previewVideo")));
     this.previewTransform = ((System.Windows.Media.CompositeTransform)(this.FindName("previewTransform")));
 }
Exemple #52
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/OpenWARExample;component/MainPage.xaml", System.UriKind.Relative));
     this.LayoutRoot       = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.viewfinderCanvas = ((System.Windows.Controls.Canvas)(this.FindName("viewfinderCanvas")));
     this.viewfinderBrush  = ((System.Windows.Media.VideoBrush)(this.FindName("viewfinderBrush")));
     this.focusBrackets    = ((System.Windows.Controls.TextBlock)(this.FindName("focusBrackets")));
     this.DrawingSurface   = ((System.Windows.Controls.DrawingSurface)(this.FindName("DrawingSurface")));
     this.AFButton         = ((System.Windows.Controls.Button)(this.FindName("AFButton")));
     this.ResButton        = ((System.Windows.Controls.Button)(this.FindName("ResButton")));
     this.txtDebug         = ((System.Windows.Controls.TextBlock)(this.FindName("txtDebug")));
 }
Exemple #53
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/PhoneApp10;component/EVFmode.xaml", System.UriKind.Relative));
     this.LayoutRoot       = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.viewfinderCanvas = ((System.Windows.Controls.Canvas)(this.FindName("viewfinderCanvas")));
     this.viewfinderBrush  = ((System.Windows.Media.VideoBrush)(this.FindName("viewfinderBrush")));
     this.focusBrackets    = ((System.Windows.Controls.TextBlock)(this.FindName("focusBrackets")));
     this.txtDebug         = ((System.Windows.Controls.TextBlock)(this.FindName("txtDebug")));
     this.FlashButton      = ((System.Windows.Controls.Button)(this.FindName("FlashButton")));
     this.ShutterButton    = ((System.Windows.Controls.Button)(this.FindName("ShutterButton")));
     this.ResButton        = ((System.Windows.Controls.Button)(this.FindName("ResButton")));
 }
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/WP.TiTanCam;component/MainPage.xaml", System.UriKind.Relative));
     this.LayoutRoot       = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.ViewFinderCanvas = ((System.Windows.Controls.Canvas)(this.FindName("ViewFinderCanvas")));
     this.FocusIndicator   = ((System.Windows.Shapes.Rectangle)(this.FindName("FocusIndicator")));
     this.ViewFinderPanel  = ((System.Windows.Media.VideoBrush)(this.FindName("ViewFinderPanel")));
     this.ListButtonGrid   = ((System.Windows.Controls.Grid)(this.FindName("ListButtonGrid")));
     this.CameraRollButton = ((System.Windows.Controls.Button)(this.FindName("CameraRollButton")));
     this.CaptureButton    = ((System.Windows.Controls.Button)(this.FindName("CaptureButton")));
     this.FilterButton     = ((System.Windows.Controls.Button)(this.FindName("FilterButton")));
 }
Exemple #55
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/sdkBasicCameraCS;component/MainPage.xaml", System.UriKind.Relative));
     this.LayoutRoot         = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.viewfinderCanvas   = ((System.Windows.Controls.Canvas)(this.FindName("viewfinderCanvas")));
     this.viewfinderBrush    = ((System.Windows.Media.VideoBrush)(this.FindName("viewfinderBrush")));
     this.focusBrackets      = ((System.Windows.Controls.TextBlock)(this.FindName("focusBrackets")));
     this.resolutionsListBox = ((System.Windows.Controls.ListBox)(this.FindName("resolutionsListBox")));
     this.AFButton           = ((System.Windows.Controls.Button)(this.FindName("AFButton")));
     this.ResButton          = ((System.Windows.Controls.Button)(this.FindName("ResButton")));
     this.txtDebug           = ((System.Windows.Controls.TextBlock)(this.FindName("txtDebug")));
 }
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/MotionSample;component/RawCamera.xaml", System.UriKind.Relative));
     this.LayoutRoot       = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.TitlePanel       = ((System.Windows.Controls.StackPanel)(this.FindName("TitlePanel")));
     this.ApplicationTitle = ((System.Windows.Controls.TextBlock)(this.FindName("ApplicationTitle")));
     this.PageTitle        = ((System.Windows.Controls.TextBlock)(this.FindName("PageTitle")));
     this.ContentPanel     = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.CameraCapture    = ((System.Windows.Controls.Image)(this.FindName("CameraCapture")));
     this.VideoBox         = ((System.Windows.Shapes.Rectangle)(this.FindName("VideoBox")));
     this.CameraSource     = ((System.Windows.Media.VideoBrush)(this.FindName("CameraSource")));
     this.PhotoButton      = ((Microsoft.Phone.Shell.ApplicationBarIconButton)(this.FindName("PhotoButton")));
 }
Exemple #57
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/LeanCloud.LeanMeaasge.Demo;component/Media/VideoRecord.xaml", System.UriKind.Relative));
     this.LayoutRoot   = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.videoBrush   = ((System.Windows.Media.VideoBrush)(this.FindName("videoBrush")));
     this.rt           = ((System.Windows.Media.RotateTransform)(this.FindName("rt")));
     this.mediaElement = ((System.Windows.Controls.MediaElement)(this.FindName("mediaElement")));
     this.btnCapture   = ((System.Windows.Controls.Button)(this.FindName("btnCapture")));
     this.btnStop      = ((System.Windows.Controls.Button)(this.FindName("btnStop")));
     this.btnPlay      = ((System.Windows.Controls.Button)(this.FindName("btnPlay")));
     this.btn_send     = ((System.Windows.Controls.Button)(this.FindName("btn_send")));
     this.lblMsg       = ((System.Windows.Controls.TextBlock)(this.FindName("lblMsg")));
 }
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/BookMemory;component/BarcordScanPage.xaml", System.UriKind.Relative));
     this.LayoutRoot       = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.TitlePanel       = ((System.Windows.Controls.StackPanel)(this.FindName("TitlePanel")));
     this.ApplicationTitle = ((System.Windows.Controls.TextBlock)(this.FindName("ApplicationTitle")));
     this.PageTitle        = ((System.Windows.Controls.TextBlock)(this.FindName("PageTitle")));
     this.ContentPanel     = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.PreviewRectangle = ((System.Windows.Shapes.Rectangle)(this.FindName("PreviewRectangle")));
     this.PreviewBrush     = ((System.Windows.Media.VideoBrush)(this.FindName("PreviewBrush")));
     this.image1           = ((System.Windows.Controls.Image)(this.FindName("image1")));
     this.TextBlock_Result = ((System.Windows.Controls.TextBlock)(this.FindName("TextBlock_Result")));
     this.mediaElement1    = ((System.Windows.Controls.MediaElement)(this.FindName("mediaElement1")));
 }
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Pano%20de%20config;component/MainPage.xaml", System.UriKind.Relative));
     this.LayoutRoot       = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.m_map            = ((Microsoft.Phone.Maps.Controls.Map)(this.FindName("m_map")));
     this.TextBlock1       = ((System.Windows.Controls.TextBox)(this.FindName("TextBlock1")));
     this.Cam              = ((System.Windows.Controls.Grid)(this.FindName("Cam")));
     this.viewfinderCanvas = ((System.Windows.Controls.Canvas)(this.FindName("viewfinderCanvas")));
     this.viewfinderBrush  = ((System.Windows.Media.VideoBrush)(this.FindName("viewfinderBrush")));
     this.ShutterButton    = ((System.Windows.Controls.Button)(this.FindName("ShutterButton")));
     this.txtDebug         = ((System.Windows.Controls.TextBlock)(this.FindName("txtDebug")));
     this.grid2            = ((System.Windows.Controls.Grid)(this.FindName("grid2")));
     this.TextBlock2       = ((System.Windows.Controls.TextBox)(this.FindName("TextBlock2")));
     this.TextBlock3       = ((System.Windows.Controls.TextBox)(this.FindName("TextBlock3")));
     this.textBox          = ((System.Windows.Controls.TextBox)(this.FindName("textBox")));
 }
Exemple #60
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/PhoneApp10;component/MainPage.xaml", System.UriKind.Relative));
     this.LayoutRoot      = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.TitlePanel      = ((System.Windows.Controls.StackPanel)(this.FindName("TitlePanel")));
     this.ContentPanel    = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.viewfinderBrush = ((System.Windows.Media.VideoBrush)(this.FindName("viewfinderBrush")));
     this.txtDebug        = ((System.Windows.Controls.TextBlock)(this.FindName("txtDebug")));
     this.wb       = ((System.Windows.Controls.Button)(this.FindName("wb")));
     this.f        = ((System.Windows.Controls.Button)(this.FindName("f")));
     this.sh       = ((System.Windows.Controls.Button)(this.FindName("sh")));
     this.ev       = ((System.Windows.Controls.Button)(this.FindName("ev")));
     this.settings = ((System.Windows.Controls.Button)(this.FindName("settings")));
     this.iso      = ((System.Windows.Controls.Button)(this.FindName("iso")));
     this.ev_Copy  = ((System.Windows.Controls.Button)(this.FindName("ev_Copy")));
 }