void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 12 "..\..\MainWindow.xaml" ((MMazeBehavior.MainWindow)(target)).Closed += new System.EventHandler(this.Window_Closed); #line default #line hidden return; case 2: #line 91 "..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.StartButtonClick); #line default #line hidden return; case 3: this.CameraVideoSourcePlayer = ((Accord.Controls.VideoSourcePlayer)(target)); return; } this._contentLoaded = true; }
//private async Task LoadFaceDetectionProvider() { // this.SetStatus("Initializing face detection provider..."); // this.faceDetectionProvider = new FaceDetectionProvider(); // await this.faceDetectionProvider.InitializeAsync(); // await Task.Run(() => this.faceDetectionProvider.Source.Start()); // this.SetStatus("Face detection provider successfully initialized"); //} private void LoadVideoPlayer() { this.SetStatus("Creating video viewer..."); this.videoSourcePlayer = new VideoSourcePlayer() { Size = this.videoPlayerSize, VideoSource = ProviderManager.VideoProvider.DeviceVideoSource }; this.videoSourcePlayer.NewFrame += HandleNewVideoFrame; this.VideoSourcePlayerWindowsFormsHost.Child = this.videoSourcePlayer; this.SetStatus("Video player successfully created"); }