/// <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"); }
/// <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"); }
/// <summary> /// Called by the host to assign this view to a component. /// </summary> public void SetComponent(IApplicationComponent component) { _component = (DepartmentEditorComponent)component; }
/// <summary> /// Called by the host to assign this view to a component. /// </summary> public void SetComponent(IApplicationComponent component) { _component = (DepartmentEditorComponent)component; }