/// <summary>
        /// Constructor
        /// </summary>
        public CineApplicationComponentControl(CineApplicationComponent component)
            :base(component)
        {
			_component = component;
			
			InitializeComponent();

			BindingSource source = new BindingSource();
        	source.DataSource = _component;
        	_startForwardButton.DataBindings.Add("Enabled", source, "Enabled", true, DataSourceUpdateMode.OnPropertyChanged);
			_startReverseButton.DataBindings.Add("Enabled", source, "Enabled", true, DataSourceUpdateMode.OnPropertyChanged);
        	_stopButton.DataBindings.Add("Enabled", source, "Running", true, DataSourceUpdateMode.OnPropertyChanged);
			_cineSpeed.DataBindings.Add("Minimum", source, "MinimumScale", true, DataSourceUpdateMode.OnPropertyChanged);
			_cineSpeed.DataBindings.Add("Maximum", source, "MaximumScale", true, DataSourceUpdateMode.OnPropertyChanged);
			_cineSpeed.DataBindings.Add("Value", source, "CurrentScaleValue", true, DataSourceUpdateMode.OnPropertyChanged);
		}
Esempio n. 2
0
        /// <summary>
        /// Constructor
        /// </summary>
        public CineApplicationComponentControl(CineApplicationComponent component)
            : base(component)
        {
            _component = component;

            InitializeComponent();

            BindingSource source = new BindingSource();

            source.DataSource = _component;
            _startForwardButton.DataBindings.Add("Enabled", source, "Enabled", true, DataSourceUpdateMode.OnPropertyChanged);
            _startReverseButton.DataBindings.Add("Enabled", source, "Enabled", true, DataSourceUpdateMode.OnPropertyChanged);
            _stopButton.DataBindings.Add("Enabled", source, "Running", true, DataSourceUpdateMode.OnPropertyChanged);
            _cineSpeed.DataBindings.Add("Minimum", source, "MinimumScale", true, DataSourceUpdateMode.OnPropertyChanged);
            _cineSpeed.DataBindings.Add("Maximum", source, "MaximumScale", true, DataSourceUpdateMode.OnPropertyChanged);
            _cineSpeed.DataBindings.Add("Value", source, "CurrentScaleValue", true, DataSourceUpdateMode.OnPropertyChanged);
        }
 public void SetComponent(IApplicationComponent component)
 {
     _component = (CineApplicationComponent)component;
 }
 public void SetComponent(IApplicationComponent component)
 {
     _component = (CineApplicationComponent)component;
 }