/// <summary>
        /// Constructor.
        /// </summary>
        public StreamingAnalysisComponentControl(StreamingAnalysisComponent component)
            :base(component)
        {
			_component = component;
            InitializeComponent();

        	_addSelectedStudies.DataBindings.Add("Enabled", component, "CanAddSelectedStudies", true,
        	                                     DataSourceUpdateMode.OnPropertyChanged);

			_decompressActive.DataBindings.Add("Checked", component, "DecompressActive", true,
										 DataSourceUpdateMode.OnPropertyChanged);

        	_decompressActive.Click += delegate { _component.DecompressActive = !_component.DecompressActive; };
			
			_retrieveActive.DataBindings.Add("Checked", component, "RetrieveActive", true,
										 DataSourceUpdateMode.OnPropertyChanged);

			_retrieveActive.Click += delegate { _component.RetrieveActive = !_component.RetrieveActive; };
			
			_retrieveItems.DataBindings.Add("Value", component, "NumberOfRetrieveItems", true,
        	                                DataSourceUpdateMode.OnPropertyChanged);

			_retrieveConcurrency.DataBindings.Add("Value", component, "RetrieveConcurrency", true,
										 DataSourceUpdateMode.OnPropertyChanged);

			_decompressConcurrency.DataBindings.Add("Value", component, "DecompressConcurrency", true,
								 DataSourceUpdateMode.OnPropertyChanged);

			_decompressItems.DataBindings.Add("Value", component, "NumberOfDecompressItems", true,
									DataSourceUpdateMode.OnPropertyChanged);

			_retrievePriority.DataSource = GetThreadPriorities();
			//_retrievePriority.DataBindings.Add("SelectedValue", component, "RetrieveThreadPriority", true,
			//                                   DataSourceUpdateMode.OnPropertyChanged);

        	_retrievePriority.SelectedValueChanged +=
        		delegate { _component.RetrieveThreadPriority = (ThreadPriority)_retrievePriority.SelectedValue; };
			_retrievePriority.SelectedItem = _component.RetrieveThreadPriority;

			_decompressPriority.DataSource = GetThreadPriorities();
			//_decompressPriority.DataBindings.Add("SelectedValue", component, "DecompressThreadPriority", true,
			//                       DataSourceUpdateMode.OnPropertyChanged);

			_decompressPriority.SelectedValueChanged +=
				delegate { _component.DecompressThreadPriority = (ThreadPriority)_decompressPriority.SelectedValue; };

			_decompressPriority.SelectedItem = _component.DecompressThreadPriority;
        	

        	//_plotAverage.ValueChanged += delegate { RefreshRetrievePlot(); };

			_timer = new Timer();
        	_timer.Interval = 5000;
			_timer.Tick += new EventHandler(OnTimer);
        	_timer.Enabled = true;
		}
示例#2
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public StreamingAnalysisComponentControl(StreamingAnalysisComponent component)
            : base(component)
        {
            _component = component;
            InitializeComponent();

            _addSelectedStudies.DataBindings.Add("Enabled", component, "CanAddSelectedStudies", true,
                                                 DataSourceUpdateMode.OnPropertyChanged);

            _decompressActive.DataBindings.Add("Checked", component, "DecompressActive", true,
                                               DataSourceUpdateMode.OnPropertyChanged);

            _decompressActive.Click += delegate { _component.DecompressActive = !_component.DecompressActive; };

            _retrieveActive.DataBindings.Add("Checked", component, "RetrieveActive", true,
                                             DataSourceUpdateMode.OnPropertyChanged);

            _retrieveActive.Click += delegate { _component.RetrieveActive = !_component.RetrieveActive; };

            _retrieveItems.DataBindings.Add("Value", component, "NumberOfRetrieveItems", true,
                                            DataSourceUpdateMode.OnPropertyChanged);

            _retrieveConcurrency.DataBindings.Add("Value", component, "RetrieveConcurrency", true,
                                                  DataSourceUpdateMode.OnPropertyChanged);

            _decompressConcurrency.DataBindings.Add("Value", component, "DecompressConcurrency", true,
                                                    DataSourceUpdateMode.OnPropertyChanged);

            _decompressItems.DataBindings.Add("Value", component, "NumberOfDecompressItems", true,
                                              DataSourceUpdateMode.OnPropertyChanged);

            _retrievePriority.DataSource = GetThreadPriorities();
            //_retrievePriority.DataBindings.Add("SelectedValue", component, "RetrieveThreadPriority", true,
            //                                   DataSourceUpdateMode.OnPropertyChanged);

            _retrievePriority.SelectedValueChanged +=
                delegate { _component.RetrieveThreadPriority = (ThreadPriority)_retrievePriority.SelectedValue; };
            _retrievePriority.SelectedItem = _component.RetrieveThreadPriority;

            _decompressPriority.DataSource = GetThreadPriorities();
            //_decompressPriority.DataBindings.Add("SelectedValue", component, "DecompressThreadPriority", true,
            //                       DataSourceUpdateMode.OnPropertyChanged);

            _decompressPriority.SelectedValueChanged +=
                delegate { _component.DecompressThreadPriority = (ThreadPriority)_decompressPriority.SelectedValue; };

            _decompressPriority.SelectedItem = _component.DecompressThreadPriority;


            //_plotAverage.ValueChanged += delegate { RefreshRetrievePlot(); };

            _timer          = new Timer();
            _timer.Interval = 5000;
            _timer.Tick    += new EventHandler(OnTimer);
            _timer.Enabled  = true;
        }
		public void OpenAnalysisTool()
		{
			if (_shelf != null)
			{
				_shelf.Activate();
			}
			else
			{
				StreamingAnalysisComponent component = new StreamingAnalysisComponent(base.Context);
				_shelf = ApplicationComponent.LaunchAsShelf(base.Context.DesktopWindow, component, 
					"Streaming Analysis", ShelfDisplayHint.DockFloat | ShelfDisplayHint.ShowNearMouse);

				_shelf.Closed += delegate { _shelf = null; };
			}
		}
 /// <summary>
 /// Called by the host to assign this view to a component.
 /// </summary>
 public void SetComponent(IApplicationComponent component)
 {
     _component = (StreamingAnalysisComponent)component;
 }
 /// <summary>
 /// Called by the host to assign this view to a component.
 /// </summary>
 public void SetComponent(IApplicationComponent component)
 {
     _component = (StreamingAnalysisComponent)component;
 }