/// <summary> /// Constructor /// </summary> public LocationSummaryComponentControl(LocationSummaryComponent component) : base(component) { InitializeComponent(); _component = component; _locationTableView.ToolbarModel = _component.SummaryTableActionModel; _locationTableView.MenuModel = _component.SummaryTableActionModel; _locationTableView.Table = _component.SummaryTable; _locationTableView.DataBindings.Add("Selection", _component, "SummarySelection", true, DataSourceUpdateMode.OnPropertyChanged); _facilityComboBox.DataSource = _component.FacilityChoices; _facilityComboBox.DataBindings.Add("Value", _component, "Facility", true, DataSourceUpdateMode.OnPropertyChanged); _facilityComboBox.Format += delegate(object sender, ListControlConvertEventArgs e) { e.Value = _component.FormatFacilityListItem(e.ListItem); }; _name.DataBindings.Add("Value", _component, "Name", true, DataSourceUpdateMode.OnPropertyChanged); _okButton.DataBindings.Add("Visible", _component, "ShowAcceptCancelButtons"); _okButton.DataBindings.Add("Enabled", _component, "AcceptEnabled"); _cancelButton.DataBindings.Add("Visible", _component, "ShowAcceptCancelButtons"); }
/// <summary> /// Constructor /// </summary> public LocationSummaryComponentControl(LocationSummaryComponent component) : base(component) { InitializeComponent(); _component = component; _locationTableView.ToolbarModel = _component.SummaryTableActionModel; _locationTableView.MenuModel = _component.SummaryTableActionModel; _locationTableView.Table = _component.SummaryTable; _locationTableView.DataBindings.Add("Selection", _component, "SummarySelection", true, DataSourceUpdateMode.OnPropertyChanged); _facilityComboBox.DataSource = _component.FacilityChoices; _facilityComboBox.DataBindings.Add("Value", _component, "Facility", true, DataSourceUpdateMode.OnPropertyChanged); _facilityComboBox.Format += delegate(object sender, ListControlConvertEventArgs e) { e.Value = _component.FormatFacilityListItem(e.ListItem); }; _name.DataBindings.Add("Value", _component, "Name", true, DataSourceUpdateMode.OnPropertyChanged); _okButton.DataBindings.Add("Visible", _component, "ShowAcceptCancelButtons"); _okButton.DataBindings.Add("Enabled", _component, "AcceptEnabled"); _cancelButton.DataBindings.Add("Visible", _component, "ShowAcceptCancelButtons"); }
public void SetComponent(IApplicationComponent component) { _component = (LocationSummaryComponent)component; }
public void SetComponent(IApplicationComponent component) { _component = (LocationSummaryComponent)component; }