Пример #1
0
        public void Play()
        {
            Control.Play();
            MainWindowView view = MainWindowView.GetInstrance();

            view.CameraStartStopButtonText = "Freeze";
            view.CameraStartStopButtonIcon = "/GemScopeWPF;component/Media/Icons/freeze.png";
        }
Пример #2
0
        //private CaptureDirectShowV1 cap;

        public MainWindow()
        {
            InitializeComponent();

            MainWindowView view = MainWindowView.GetInstrance();

            DataContext = view;
        }
Пример #3
0
        public void Stop()
        {
            Control.Stop();
            MainWindowView view = MainWindowView.GetInstrance();

            view.CameraStartStopButtonText = "Start";
            view.CameraStartStopButtonIcon = "/GemScopeWPF;component/Media/Icons/start-camera.png";
        }
Пример #4
0
        public void Stop()
        {
            //Decouple this using events and observer pattern
            webcam.Stop();
            MainWindowView view = MainWindowView.GetInstrance();

            view.CameraStartStopButtonText = "Start";
            WebCamOpen = false;
        }
Пример #5
0
        public void Start()
        {
            webcam.TimeToCapture_milliseconds = FrameNumber;
            webcam.Start(0);
            MainWindowView view = MainWindowView.GetInstrance();

            view.CameraStartStopButtonText = "Stop";
            WebCamOpen = true;
        }
Пример #6
0
        public void SetCaptureDeviceWPFControl(VideoCaptureElement control)
        {
            this.Control = control;
            this.Control.VideoCaptureDevice = this.GetCaptureDevice();
            this.Control.Volume             = 0;

            MainWindowView view = MainWindowView.GetInstrance();

            view.CameraStartStopButtonText = "Freeze";
        }
Пример #7
0
        public void PauseCapturingVideoToFile()
        {
            Control.PauseCapture();

            IsCapturingVideo = false;
            //Control.Pause();

            MainWindowView view = MainWindowView.GetInstrance();
            //  view.CameraStartStoprVideoRecordingButtonText = "Continue Recording Video";
        }
Пример #8
0
        public void ResumeCapturingVideoToFile()
        {
            Control.ResumeCapture();

            IsCapturingVideo = true;
            //Control.Pause();

            MainWindowView view = MainWindowView.GetInstrance();
            // view.CameraStartStoprVideoRecordingButtonText = "Stop Recording Video";
        }
Пример #9
0
        public void StartCapturingVideoToFile(string filename)
        {
            Control.SetNextFileName(filename);
            Control.StartCapture();

            IsCapturingVideo = true;
            //Control.Pause();

            MainWindowView view = MainWindowView.GetInstrance();

            view.CameraStartStoprVideoRecordingButtonText = "Stop Recording Video";
        }