/// <summary> /// Constructor /// </summary> public SummaryComponentBaseControl(SummaryComponentBase component) :base(component) { InitializeComponent(); _component = component; _summaryTableView.Table = _component.SummaryTable; _summaryTableView.MenuModel = _component.SummaryTableActionModel; _summaryTableView.ToolbarModel = _component.SummaryTableActionModel; _summaryTableView.DataBindings.Add("Selection", _component, "SummarySelection", true, DataSourceUpdateMode.OnPropertyChanged); _buttonsPanel.DataBindings.Add("Visible", _component, "ShowAcceptCancelButtons"); _okButton.DataBindings.Add("Visible", _component, "ShowAcceptCancelButtons"); _okButton.DataBindings.Add("Enabled", _component, "AcceptEnabled"); _cancelButton.DataBindings.Add("Visible", _component, "ShowAcceptCancelButtons"); }
/// <summary> /// Constructor /// </summary> public SummaryComponentBaseControl(SummaryComponentBase component) : base(component) { InitializeComponent(); _component = component; _summaryTableView.Table = _component.SummaryTable; _summaryTableView.MenuModel = _component.SummaryTableActionModel; _summaryTableView.ToolbarModel = _component.SummaryTableActionModel; _summaryTableView.DataBindings.Add("Selection", _component, "SummarySelection", true, DataSourceUpdateMode.OnPropertyChanged); _buttonsPanel.DataBindings.Add("Visible", _component, "ShowAcceptCancelButtons"); _okButton.DataBindings.Add("Visible", _component, "ShowAcceptCancelButtons"); _okButton.DataBindings.Add("Enabled", _component, "AcceptEnabled"); _cancelButton.DataBindings.Add("Visible", _component, "ShowAcceptCancelButtons"); }
public void SetComponent(IApplicationComponent component) { _component = (SummaryComponentBase)component; }