/// <summary> /// Constructor. /// </summary> public ProcedureTypeEditorComponentControl(ProcedureTypeEditorComponent component) :base(component) { _component = component; InitializeComponent(); _name.DataBindings.Add("Value", _component, "Name", true, DataSourceUpdateMode.OnPropertyChanged); _id.DataBindings.Add("Value", _component, "ID", true, DataSourceUpdateMode.OnPropertyChanged); _defaultDuration.DataBindings.Add("Value", _component, "DefaultDuration", true, DataSourceUpdateMode.OnPropertyChanged); _acceptButton.DataBindings.Add("Enabled", _component, "AcceptEnabled", true, DataSourceUpdateMode.OnPropertyChanged); _defaultModality.DataSource = _component.DefaultModalityChoices; _defaultModality.DataBindings.Add("Value", _component, "DefaultModality", true, DataSourceUpdateMode.OnPropertyChanged); _defaultModality.Format += delegate(object sender, ListControlConvertEventArgs e) { e.Value = _component.FormatModalityItem(e.ListItem); }; }
/// <summary> /// Constructor. /// </summary> public ProcedureTypeEditorComponentControl(ProcedureTypeEditorComponent component) : base(component) { _component = component; InitializeComponent(); _name.DataBindings.Add("Value", _component, "Name", true, DataSourceUpdateMode.OnPropertyChanged); _id.DataBindings.Add("Value", _component, "ID", true, DataSourceUpdateMode.OnPropertyChanged); _defaultDuration.DataBindings.Add("Value", _component, "DefaultDuration", true, DataSourceUpdateMode.OnPropertyChanged); _acceptButton.DataBindings.Add("Enabled", _component, "AcceptEnabled", true, DataSourceUpdateMode.OnPropertyChanged); _defaultModality.DataSource = _component.DefaultModalityChoices; _defaultModality.DataBindings.Add("Value", _component, "DefaultModality", true, DataSourceUpdateMode.OnPropertyChanged); _defaultModality.Format += delegate(object sender, ListControlConvertEventArgs e) { e.Value = _component.FormatModalityItem(e.ListItem); }; }
/// <summary> /// Called by the host to assign this view to a component. /// </summary> public void SetComponent(IApplicationComponent component) { _component = (ProcedureTypeEditorComponent)component; }
/// <summary> /// Called by the host to assign this view to a component. /// </summary> public void SetComponent(IApplicationComponent component) { _component = (ProcedureTypeEditorComponent)component; }