コード例 #1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public DepartmentEditorComponentControl(DepartmentEditorComponent component)
            : base(component)
        {
            _component = component;
            InitializeComponent();

            _id.DataBindings.Add("Value", _component, "Id", true, DataSourceUpdateMode.OnPropertyChanged);
            _name.DataBindings.Add("Value", _component, "Name", true, DataSourceUpdateMode.OnPropertyChanged);
            _description.DataBindings.Add("Value", _component, "Description", true, DataSourceUpdateMode.OnPropertyChanged);
            _facility.DataSource = _component.FacilityChoices;
            _facility.DataBindings.Add("Value", _component, "Facility", true, DataSourceUpdateMode.OnPropertyChanged);
            _facility.Format += ((sender, e) => e.Value = _component.FormatFacility(e.ListItem));

            _acceptButton.DataBindings.Add("Enabled", _component, "AcceptEnabled");
        }
コード例 #2
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public DepartmentEditorComponentControl(DepartmentEditorComponent component)
            :base(component)
        {
			_component = component;
            InitializeComponent();

        	_id.DataBindings.Add("Value", _component, "Id", true, DataSourceUpdateMode.OnPropertyChanged);
			_name.DataBindings.Add("Value", _component, "Name", true, DataSourceUpdateMode.OnPropertyChanged);
			_description.DataBindings.Add("Value", _component, "Description", true, DataSourceUpdateMode.OnPropertyChanged);
			_facility.DataSource = _component.FacilityChoices;
			_facility.DataBindings.Add("Value", _component, "Facility", true, DataSourceUpdateMode.OnPropertyChanged);
			_facility.Format += ((sender, e) => e.Value = _component.FormatFacility(e.ListItem));

        	_acceptButton.DataBindings.Add("Enabled", _component, "AcceptEnabled");

        }
コード例 #3
0
 /// <summary>
 /// Called by the host to assign this view to a component.
 /// </summary>
 public void SetComponent(IApplicationComponent component)
 {
     _component = (DepartmentEditorComponent)component;
 }
コード例 #4
0
 /// <summary>
 /// Called by the host to assign this view to a component.
 /// </summary>
 public void SetComponent(IApplicationComponent component)
 {
     _component = (DepartmentEditorComponent)component;
 }