/// <summary>
        /// Constructor
        /// </summary>
        public ProcedureTypeGroupEditorComponentControl(ProcedureTypeGroupEditorComponent component)
            : base(component)
        {
            InitializeComponent();

            _component = component;

            _name.DataBindings.Add("Value", _component, "Name", true, DataSourceUpdateMode.OnPropertyChanged);
            _description.DataBindings.Add("Value", _component, "Description", true, DataSourceUpdateMode.OnPropertyChanged);

            _category.DataSource = _component.CategoryChoices;
            _category.DataBindings.Add("Value", _component, "Category", true, DataSourceUpdateMode.OnPropertyChanged);
            _category.DataBindings.Add("Enabled", _component, "CategoryEnabled");
            _includeDeactivatedItems.DataBindings.Add("Checked", _component, "IncludeDeactivatedProcedureTypes", true,
                                                      DataSourceUpdateMode.OnPropertyChanged);

            _procedureTypesSelector.AvailableItemsTable = _component.AvailableProcedureTypes;
            _procedureTypesSelector.SelectedItemsTable  = _component.SelectedProcedureTypes;

            _procedureTypesSelector.ItemAdded   += OnItemsAddedOrRemoved;
            _procedureTypesSelector.ItemRemoved += OnItemsAddedOrRemoved;

            _acceptButton.DataBindings.Add("Enabled", _component, "Modified", true, DataSourceUpdateMode.OnPropertyChanged);
        }
		/// <summary>
		/// Constructor
		/// </summary>
		public ProcedureTypeGroupEditorComponentControl(ProcedureTypeGroupEditorComponent component)
			: base(component)
		{
			InitializeComponent();

			_component = component;

			_name.DataBindings.Add("Value", _component, "Name", true, DataSourceUpdateMode.OnPropertyChanged);
			_description.DataBindings.Add("Value", _component, "Description", true, DataSourceUpdateMode.OnPropertyChanged);

			_category.DataSource = _component.CategoryChoices;
			_category.DataBindings.Add("Value", _component, "Category", true, DataSourceUpdateMode.OnPropertyChanged);
			_category.DataBindings.Add("Enabled", _component, "CategoryEnabled");
			_includeDeactivatedItems.DataBindings.Add("Checked", _component, "IncludeDeactivatedProcedureTypes", true,
													  DataSourceUpdateMode.OnPropertyChanged);

			_procedureTypesSelector.AvailableItemsTable = _component.AvailableProcedureTypes;
			_procedureTypesSelector.SelectedItemsTable = _component.SelectedProcedureTypes;

			_procedureTypesSelector.ItemAdded += OnItemsAddedOrRemoved;
			_procedureTypesSelector.ItemRemoved += OnItemsAddedOrRemoved;

			_acceptButton.DataBindings.Add("Enabled", _component, "Modified", true, DataSourceUpdateMode.OnPropertyChanged);
		}
 public void SetComponent(IApplicationComponent component)
 {
     _component = (ProcedureTypeGroupEditorComponent)component;
 }
示例#4
0
 public void SetComponent(IApplicationComponent component)
 {
     _component = (ProcedureTypeGroupEditorComponent)component;
 }