Пример #1
0
        /// <summary>
        ///   Initializes a new instance of the <see cref="CaptureWindow"/> class.
        /// </summary>
        /// 
        /// <param name="viewModel">The main view model.</param>
        /// 
        public CaptureWindow(RecorderViewModel viewModel)
            : this()
        {
            if (viewModel == null)
                throw new ArgumentNullException("viewModel");

            this.viewModel = viewModel;
            this.viewModel.ShowTargetWindow += viewModel_TargetWindowRequested;
        }
Пример #2
0
        /// <summary>
        ///   Initializes a new instance of the <see cref="NotifyViewModel"/> class.
        /// </summary>
        /// 
        public NotifyViewModel(RecorderViewModel recorder)
        {
            if (recorder == null)
                throw new ArgumentNullException("recorder");

            this.recorder = recorder;
            this.recorder.PropertyChanged += recorder_PropertyChanged;

            this.update();
        }
Пример #3
0
        /// <summary>
        ///   Initializes a new instance of the <see cref="CaptureRegion"/> class.
        /// </summary>
        /// 
        /// <param name="viewModel">The main view model in the application.</param>
        /// 
        public CaptureRegion(RecorderViewModel viewModel)
            : this()
        {
            this.viewModel = viewModel;

            // Call CreateControl, otherwise
            // binding to Visible won't work.

            this.ForceCreateControl();
        }
Пример #4
0
        /// <summary>
        ///   Initializes a new instance of the <see cref="NotifyViewModel"/> class.
        /// </summary>
        ///
        public NotifyViewModel(RecorderViewModel recorder)
        {
            if (recorder == null)
            {
                throw new ArgumentNullException("recorder");
            }

            this.recorder = recorder;
            this.recorder.PropertyChanged += recorder_PropertyChanged;

            this.update();
        }
Пример #5
0
        /// <summary>
        ///   Initializes a new instance of the <see cref="MainViewModel"/> class.
        /// </summary>
        ///
        public MainViewModel(VideoSourcePlayer2 player)
        {
            if (player == null)
            {
                throw new ArgumentNullException("player");
            }

            Recorder  = new RecorderViewModel(this, player);
            Notifier  = new NotifyViewModel(Recorder);
            Converter = new ConvertViewModel(this);

            IsPreviewVisible = true;
            CurrentDirectory = Settings.Default.DefaultFolder;
            StatusText       = Resources.Status_Ready;



            PropertyChanged           += MainViewModel_PropertyChanged;
            Recorder.PropertyChanged  += recorder_PropertyChanged;
            Converter.PropertyChanged += Convert_PropertyChanged;
        }
Пример #6
0
        /// <summary>
        ///   Initializes a new instance of the <see cref="MainViewModel"/> class.
        /// </summary>
        /// 
        public MainViewModel(VideoSourcePlayer player)
        {
            if (player == null) throw new ArgumentNullException("player");

            Recorder = new RecorderViewModel(this, player);
            Notifier = new NotifyViewModel(Recorder);
            Converter = new ConvertViewModel(this);

            IsPreviewVisible = true;
            CurrentDirectory = Settings.Default.DefaultFolder;
            StatusText = Resources.Status_Ready;



            PropertyChanged += MainViewModel_PropertyChanged;
            Recorder.PropertyChanged += recorder_PropertyChanged;
            Converter.PropertyChanged += Convert_PropertyChanged;
        }