コード例 #1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 6 "..\..\Window_camera.xaml"
                ((face201712.Window_camera)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.b = ((System.Windows.Controls.Border)(target));
                return;

            case 3:
                this.vce = ((WPFMediaKit.DirectShow.Controls.VideoCaptureElement)(target));
                return;

            case 4:
                this.btnCapture = ((System.Windows.Controls.Button)(target));

            #line 11 "..\..\Window_camera.xaml"
                this.btnCapture.Click += new System.Windows.RoutedEventHandler(this.btnCapture_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
コード例 #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 6 "..\..\..\Controls\CameraOpen.xaml"
                ((ClientLibrary.Controls.CameraOpen)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.cb = ((System.Windows.Controls.ComboBox)(target));

            #line 9 "..\..\..\Controls\CameraOpen.xaml"
                this.cb.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cb_SelectionChanged);

            #line default
            #line hidden
                return;

            case 3:
                this.vce = ((WPFMediaKit.DirectShow.Controls.VideoCaptureElement)(target));
                return;

            case 4:
                this.btnCapture_Button = ((System.Windows.Controls.Button)(target));

            #line 12 "..\..\..\Controls\CameraOpen.xaml"
                this.btnCapture_Button.Click += new System.Windows.RoutedEventHandler(this.btnCapture_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.btnanew_Button = ((System.Windows.Controls.Button)(target));

            #line 19 "..\..\..\Controls\CameraOpen.xaml"
                this.btnanew_Button.Click += new System.Windows.RoutedEventHandler(this.btnanew_Click);

            #line default
            #line hidden
                return;

            case 6:
                this.OK_Button = ((System.Windows.Controls.Button)(target));

            #line 20 "..\..\..\Controls\CameraOpen.xaml"
                this.OK_Button.Click += new System.Windows.RoutedEventHandler(this.OK_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.videoElement = ((WPFMediaKit.DirectShow.Controls.VideoCaptureElement)(target));
     return;
     }
     this._contentLoaded = true;
 }
コード例 #4
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
 {
     switch (connectionId)
     {
     case 1:
         this.videoElement = ((WPFMediaKit.DirectShow.Controls.VideoCaptureElement)(target));
         return;
     }
     this._contentLoaded = true;
 }
コード例 #5
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 9 "..\..\..\Vime\FrmStuPicture.xaml"
                ((StudentManage.Vime.FrmStuPicture)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.picture = ((WPFMediaKit.DirectShow.Controls.VideoCaptureElement)(target));
                return;

            case 3:
                this.pictrueYulan = ((System.Windows.Controls.Image)(target));
                return;

            case 4:
                this.btnRetakepicture = ((System.Windows.Controls.Button)(target));

            #line 29 "..\..\..\Vime\FrmStuPicture.xaml"
                this.btnRetakepicture.Click += new System.Windows.RoutedEventHandler(this.btnRetakepicture_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.btnTakephoto = ((System.Windows.Controls.Button)(target));

            #line 35 "..\..\..\Vime\FrmStuPicture.xaml"
                this.btnTakephoto.Click += new System.Windows.RoutedEventHandler(this.btnTakephoto_Click);

            #line default
            #line hidden
                return;

            case 6:
                this.btnSavephoto = ((System.Windows.Controls.Button)(target));

            #line 41 "..\..\..\Vime\FrmStuPicture.xaml"
                this.btnSavephoto.Click += new System.Windows.RoutedEventHandler(this.btnSavephoto_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
コード例 #6
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 9 "..\..\..\View\StudentPhoto.xaml"
                ((项目_SMDB_学生管理系统_知识点总结.View.StudentPhoto)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.picture = ((WPFMediaKit.DirectShow.Controls.VideoCaptureElement)(target));
                return;

            case 3:
                this.pictrueYulan = ((System.Windows.Controls.Image)(target));
                return;

            case 4:
                this.btnCancel = ((System.Windows.Controls.Button)(target));

            #line 33 "..\..\..\View\StudentPhoto.xaml"
                this.btnCancel.Click += new System.Windows.RoutedEventHandler(this.btnCancel_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.btnClickPhoto = ((System.Windows.Controls.Button)(target));

            #line 39 "..\..\..\View\StudentPhoto.xaml"
                this.btnClickPhoto.Click += new System.Windows.RoutedEventHandler(this.btnClickPhoto_Click);

            #line default
            #line hidden
                return;

            case 6:
                this.btnSavePic = ((System.Windows.Controls.Button)(target));

            #line 45 "..\..\..\View\StudentPhoto.xaml"
                this.btnSavePic.Click += new System.Windows.RoutedEventHandler(this.btnSavePic_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
コード例 #7
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 5 "..\..\..\CaptureWindow.xaml"
                ((HRMSys.UI.CaptureWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.cbCameras = ((System.Windows.Controls.ComboBox)(target));

            #line 8 "..\..\..\CaptureWindow.xaml"
                this.cbCameras.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cbCameras_SelectionChanged);

            #line default
            #line hidden
                return;

            case 3:
                this.captureElement = ((WPFMediaKit.DirectShow.Controls.VideoCaptureElement)(target));
                return;

            case 4:
                this.btnCapture = ((System.Windows.Controls.Button)(target));

            #line 11 "..\..\..\CaptureWindow.xaml"
                this.btnCapture.Click += new System.Windows.RoutedEventHandler(this.btnCapture_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.btnOK = ((System.Windows.Controls.Button)(target));
                return;
            }
            this._contentLoaded = true;
        }
コード例 #8
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.videoElement = ((WPFMediaKit.DirectShow.Controls.VideoCaptureElement)(target));
                return;

            case 2:
                this.txtBarcodeInput = ((System.Windows.Controls.TextBox)(target));

            #line 26 "..\..\..\Page\Main.xaml"
                this.txtBarcodeInput.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtBarcodeInput_TextChanged);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
コード例 #9
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.cb = ((System.Windows.Controls.ComboBox)(target));

            #line 14 "..\..\Window1.xaml"
                this.cb.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cb_SelectionChanged);

            #line default
            #line hidden
                return;

            case 2:
                this.btnCapture = ((System.Windows.Controls.Button)(target));

            #line 15 "..\..\Window1.xaml"
                this.btnCapture.Click += new System.Windows.RoutedEventHandler(this.btnCapture_Click);

            #line default
            #line hidden
                return;

            case 3:
                this.btnReStart = ((System.Windows.Controls.Button)(target));

            #line 16 "..\..\Window1.xaml"
                this.btnReStart.Click += new System.Windows.RoutedEventHandler(this.Restart_Click);

            #line default
            #line hidden
                return;

            case 4:
                this.vce = ((WPFMediaKit.DirectShow.Controls.VideoCaptureElement)(target));
                return;
            }
            this._contentLoaded = true;
        }
コード例 #10
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.videoElement = ((WPFMediaKit.DirectShow.Controls.VideoCaptureElement)(target));
                return;

            case 2:
                this.videoCapDevices = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 3:

            #line 34 "..\..\..\Page\ScreenSave.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click_1);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
コード例 #11
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.vce = ((WPFMediaKit.DirectShow.Controls.VideoCaptureElement)(target));
                return;

            case 2:
                this.b = ((System.Windows.Controls.Border)(target));
                return;

            case 3:

            #line 12 "..\..\UserControl1.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click_1);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
コード例 #12
0
ファイル: Capture.cs プロジェクト: ORRNY66/GS
        public void SetCaptureDeviceWPFControl(VideoCaptureElement control)
        {
            this.Control = control;
            this.Control.VideoCaptureDevice = this.GetCaptureDevice();
            this.Control.Volume = 0;

            MainWindowView view = MainWindowView.GetInstrance();
            view.CameraStartStopButtonText = "Freeze";
        }
コード例 #13
0
        private void initVideoElement()
        {
            PageControl.getGrid(Window.GetWindow(this)).Children.Remove(videoElement);
            videoElement = new VideoCaptureElement();
            videoElement.DesiredPixelWidth = 1920;
            videoElement.DesiredPixelHeight = 1080;
            videoElement.LoadedBehavior = WPFMediaKit.DirectShow.MediaPlayers.MediaState.Play;
            videoElement.FPS = 30;
            videoElement.RenderTransformOrigin = new Point(0.5, 0.5);
            videoElement.Margin = new Thickness(-423, 423, -423, 421);

            ScaleTransform videoElementScale = new ScaleTransform();
            videoElementScale.ScaleY = -1;
            RotateTransform videoElementRotate = new RotateTransform();
            videoElementRotate.Angle = 90;

            TransformGroup videoElementTransform = new TransformGroup();
            videoElementTransform.Children.Add(videoElementScale);
            videoElementTransform.Children.Add(videoElementRotate);

            PageControl.getGrid(Window.GetWindow(this)).Children.Add(videoElement);

            foreach (DsDevice div in DsDevice.GetDevicesOfCat(FilterCategory.VideoInputDevice))
            {
                if (div.Name == "Microsoft LifeCam Studio")
                {
                    DsDevice device = div;
                    videoElement.VideoCaptureDevice = device;
                    videoElement.VideoCaptureSource = device.Name;
                }
            }
        }
コード例 #14
0
ファイル: MainWindow.g.cs プロジェクト: shichunshan/BodyCount
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.textBox1 = ((System.Windows.Controls.TextBox)(target));
     return;
     case 2:
     this.listBox = ((System.Windows.Controls.ListBox)(target));
     return;
     case 3:
     this.colorImage = ((System.Windows.Controls.Image)(target));
     return;
     case 4:
     this.imageCanvas = ((System.Windows.Controls.Canvas)(target));
     return;
     case 5:
     this.videoElement = ((WPFMediaKit.DirectShow.Controls.VideoCaptureElement)(target));
     return;
     case 6:
     this.bodyContainer = ((System.Windows.Controls.Canvas)(target));
     return;
     }
     this._contentLoaded = true;
 }
コード例 #15
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.videoElement = ((WPFMediaKit.DirectShow.Controls.VideoCaptureElement)(target));
     return;
     case 2:
     this.videoCapDevices = ((System.Windows.Controls.ComboBox)(target));
     return;
     case 3:
     
     #line 34 "..\..\..\Page\ScreenSave.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click_1);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }
コード例 #16
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.videoElement = ((WPFMediaKit.DirectShow.Controls.VideoCaptureElement)(target));
     return;
     case 2:
     this.txtBarcodeInput = ((System.Windows.Controls.TextBox)(target));
     
     #line 26 "..\..\..\Page\Main.xaml"
     this.txtBarcodeInput.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtBarcodeInput_TextChanged);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }
コード例 #17
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.btnOpen = ((System.Windows.Controls.Button)(target));

            #line 29 "..\..\MainWindow.xaml"
                this.btnOpen.Click += new System.Windows.RoutedEventHandler(this.btnOpen_Click);

            #line default
            #line hidden
                return;

            case 2:
                this.cobVideoSource = ((System.Windows.Controls.ComboBox)(target));

            #line 31 "..\..\MainWindow.xaml"
                this.cobVideoSource.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cobVideoSource_SelectionChanged);

            #line default
            #line hidden
                return;

            case 3:
                this.txtBrightness = ((System.Windows.Controls.TextBox)(target));
                return;

            case 4:
                this.btnChangeParam = ((System.Windows.Controls.Button)(target));

            #line 34 "..\..\MainWindow.xaml"
                this.btnChangeParam.Click += new System.Windows.RoutedEventHandler(this.btnChangeParam_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.txtVue = ((System.Windows.Controls.TextBox)(target));
                return;

            case 6:
                this.txtContrast = ((System.Windows.Controls.TextBox)(target));
                return;

            case 7:

            #line 39 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click);

            #line default
            #line hidden
                return;

            case 8:
                this.chkDeeperColor = ((System.Windows.Controls.CheckBox)(target));
                return;

            case 9:
                this.errorText = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 10:
                this.mediaUriElement = ((WPFMediaKit.DirectShow.Controls.MediaUriElement)(target));
                return;

            case 11:
                this.cameraCaptureElement = ((WPFMediaKit.DirectShow.Controls.VideoCaptureElement)(target));
                return;

            case 12:
                this.slider = ((System.Windows.Controls.Slider)(target));

            #line 58 "..\..\MainWindow.xaml"
                this.slider.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.slider_ValueChanged);

            #line default
            #line hidden
                return;

            case 13:
                this.btnStop = ((System.Windows.Controls.Button)(target));

            #line 60 "..\..\MainWindow.xaml"
                this.btnStop.Click += new System.Windows.RoutedEventHandler(this.btnStop_Click);

            #line default
            #line hidden
                return;

            case 14:
                this.btnPause = ((System.Windows.Controls.Button)(target));

            #line 61 "..\..\MainWindow.xaml"
                this.btnPause.Click += new System.Windows.RoutedEventHandler(this.btnPause_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
コード例 #18
0
        private void OpenDevice(object o)
        {
            var deviceIndex = (int) o;
            try
            {
                var player = new VideoCaptureElement();
                player.BeginInit();
                player.VideoCaptureDevice = MultimediaUtil.VideoInputDevices[deviceIndex];
                player.VideoCaptureSource = MultimediaUtil.VideoInputDevices[deviceIndex].Name;
                //player.Width = 320;
                //player.DesiredPixelWidth = 320;
                //player.Height = 240;
                //player.DesiredPixelHeight = 240;
                //player.FPS = 30;
                player.EndInit();

                player.Play();
                IsPlaying = true;
                _player = player;
                HasChapters = false;
            }
            catch (Exception exc)
            {
                const string message = "Unable to load selected device.";
                Logger.Instance.Warn(message, exc);
                MessageBox.Show(message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
            }
            OnPropertyChanged("Media");
        }