/// <summary>
        /// Constructor
        /// </summary>
        public DynamicTeComponentControl(DynamicTeComponent component)
            : base(component)
        {
            InitializeComponent();

            _component = component;

            _bindingSource            = new BindingSource();
            _bindingSource.DataSource = _component;

            _probabilityMapVisible.DataBindings.Clear();
            _probabilityMapVisible.DataBindings.Add("Enabled", _bindingSource, "ProbabilityMapEnabled", true,
                                                    DataSourceUpdateMode.OnPropertyChanged);
            _probabilityMapVisible.DataBindings.Add("Checked", _bindingSource, "ProbabilityMapVisible", true,
                                                    DataSourceUpdateMode.OnPropertyChanged);


            _opacityControl.TrackBarIncrements   = 100;
            _thresholdControl.TrackBarIncrements = 500;

            _opacityControl.DataBindings.Clear();
            _opacityControl.DataBindings.Add("Enabled", _bindingSource, "OpacityEnabled", true, DataSourceUpdateMode.OnPropertyChanged);
            _opacityControl.DataBindings.Add("Minimum", _bindingSource, "OpacityMinimum", true, DataSourceUpdateMode.OnPropertyChanged);
            _opacityControl.DataBindings.Add("Maximum", _bindingSource, "OpacityMaximum", true, DataSourceUpdateMode.OnPropertyChanged);
            _opacityControl.DataBindings.Add("Value", _bindingSource, "Opacity", true, DataSourceUpdateMode.OnPropertyChanged);

            _thresholdControl.DataBindings.Clear();
            _thresholdControl.DataBindings.Add("Enabled", _bindingSource, "ThresholdEnabled", true, DataSourceUpdateMode.OnPropertyChanged);
            _thresholdControl.DataBindings.Add("Minimum", _bindingSource, "ThresholdMinimum", true, DataSourceUpdateMode.OnPropertyChanged);
            _thresholdControl.DataBindings.Add("Maximum", _bindingSource, "ThresholdMaximum", true, DataSourceUpdateMode.OnPropertyChanged);
            _thresholdControl.DataBindings.Add("Value", _bindingSource, "Threshold", true, DataSourceUpdateMode.OnPropertyChanged);

            _createDynamicTeButton.DataBindings.Clear();
            _createDynamicTeButton.DataBindings.Add("Enabled", _bindingSource, "CreateDynamicTeSeriesEnabled", true,
                                                    DataSourceUpdateMode.OnPropertyChanged);
            _createDynamicTeButton.Click += delegate(object sender, EventArgs e)
            {
                _component.CreateDynamicTeSeries();
            };

            _component.AllPropertiesChanged += delegate(object sender, EventArgs e)
            {
                _bindingSource.ResetBindings(false);
            };
        }
        /// <summary>
        /// Constructor
        /// </summary>
        public DynamicTeComponentControl(DynamicTeComponent component)
            :base(component)
        {
            InitializeComponent();

            _component = component;

			_bindingSource = new BindingSource();
			_bindingSource.DataSource = _component;

			_probabilityMapVisible.DataBindings.Clear();
        	_probabilityMapVisible.DataBindings.Add("Enabled", _bindingSource, "ProbabilityMapEnabled", true,
        	                                        DataSourceUpdateMode.OnPropertyChanged);
			_probabilityMapVisible.DataBindings.Add("Checked", _bindingSource, "ProbabilityMapVisible", true,
													DataSourceUpdateMode.OnPropertyChanged);


			_opacityControl.TrackBarIncrements = 100;
			_thresholdControl.TrackBarIncrements = 500;

			_opacityControl.DataBindings.Clear();
			_opacityControl.DataBindings.Add("Enabled", _bindingSource, "OpacityEnabled", true, DataSourceUpdateMode.OnPropertyChanged);
			_opacityControl.DataBindings.Add("Minimum", _bindingSource, "OpacityMinimum", true, DataSourceUpdateMode.OnPropertyChanged);
			_opacityControl.DataBindings.Add("Maximum", _bindingSource, "OpacityMaximum", true, DataSourceUpdateMode.OnPropertyChanged);
			_opacityControl.DataBindings.Add("Value", _bindingSource, "Opacity", true, DataSourceUpdateMode.OnPropertyChanged);

			_thresholdControl.DataBindings.Clear();
			_thresholdControl.DataBindings.Add("Enabled", _bindingSource, "ThresholdEnabled", true, DataSourceUpdateMode.OnPropertyChanged);
			_thresholdControl.DataBindings.Add("Minimum", _bindingSource, "ThresholdMinimum", true, DataSourceUpdateMode.OnPropertyChanged);
			_thresholdControl.DataBindings.Add("Maximum", _bindingSource, "ThresholdMaximum", true, DataSourceUpdateMode.OnPropertyChanged);
			_thresholdControl.DataBindings.Add("Value", _bindingSource, "Threshold", true, DataSourceUpdateMode.OnPropertyChanged);

			_createDynamicTeButton.DataBindings.Clear();
        	_createDynamicTeButton.DataBindings.Add("Enabled", _bindingSource, "CreateDynamicTeSeriesEnabled", true,
        	                                        DataSourceUpdateMode.OnPropertyChanged);
			_createDynamicTeButton.Click += delegate(object sender, EventArgs e)
										{
											_component.CreateDynamicTeSeries();
										};

			_component.AllPropertiesChanged += delegate(object sender, EventArgs e)
			                             	{
			                             		_bindingSource.ResetBindings(false);
			                             	};
		}
Beispiel #3
0
		public void Show()
		{
			// check if a layout component is already displayed
			if (_cadComponent == null)
			{
				// create and initialize the layout component
				_cadComponent = new DynamicTeComponent(this.Context.DesktopWindow);

				// launch the layout component in a shelf
				// note that the component is thrown away when the shelf is closed by the user
				ApplicationComponent.LaunchAsShelf(
					this.Context.DesktopWindow,
					_cadComponent,
					"TE",
					ShelfDisplayHint.DockLeft,
					delegate(IApplicationComponent component) { _cadComponent = null; });
			}
		}
 public void SetComponent(IApplicationComponent component)
 {
     _component = (DynamicTeComponent)component;
 }
 public void SetComponent(IApplicationComponent component)
 {
     _component = (DynamicTeComponent)component;
 }