/// <summary> /// Constructor /// </summary> public ReasonSelectionComponentControl(ReasonSelectionComponentBase component) : base(component) { InitializeComponent(); _component = component; _reason.DataSource = _component.ReasonChoices; _reason.DataBindings.Add("Value", _component, "SelectedReasonChoice", true, DataSourceUpdateMode.OnPropertyChanged); _otherReason.DataBindings.Add("Value", _component, "OtherReason", true, DataSourceUpdateMode.OnPropertyChanged); _cannedTextSupport = new CannedTextSupport(_otherReason, _component.CannedTextLookupHandler); _btnOK.DataBindings.Add("Enabled", _component, "AcceptEnabled", true, DataSourceUpdateMode.OnPropertyChanged); }
public void SetComponent(IApplicationComponent component) { _component = (ReasonSelectionComponentBase)component; }