/// <summary>
        /// Constructor
        /// </summary>
        public ContactPersonEditorComponentControl(ContactPersonEditorComponent component)
            : base(component)
        {
            InitializeComponent();

            _component = component;

            _type.DataSource = _component.TypeChoices;
            _type.DataBindings.Add("Value", _component, "Type", true, DataSourceUpdateMode.OnPropertyChanged);

            _relationship.DataSource = _component.RelationshipChoices;
            _relationship.DataBindings.Add("Value", _component, "Relationship", true, DataSourceUpdateMode.OnPropertyChanged);

            _name.DataBindings.Add("Value", _component, "Name", true, DataSourceUpdateMode.OnPropertyChanged);
            _address.DataBindings.Add("Value", _component, "Address", true, DataSourceUpdateMode.OnPropertyChanged);
            _homePhone.DataBindings.Add("Value", _component, "HomePhoneNumber", true, DataSourceUpdateMode.OnPropertyChanged);
            _businessPhone.DataBindings.Add("Value", _component, "BusinessPhoneNumber", true, DataSourceUpdateMode.OnPropertyChanged);
        }
        /// <summary>
        /// Constructor
        /// </summary>
        public ContactPersonEditorComponentControl(ContactPersonEditorComponent component)
            :base(component)
        {
            InitializeComponent();

            _component = component;

            _type.DataSource = _component.TypeChoices;
            _type.DataBindings.Add("Value", _component, "Type", true, DataSourceUpdateMode.OnPropertyChanged);

            _relationship.DataSource = _component.RelationshipChoices;
            _relationship.DataBindings.Add("Value", _component, "Relationship", true, DataSourceUpdateMode.OnPropertyChanged);

            _name.DataBindings.Add("Value", _component, "Name", true, DataSourceUpdateMode.OnPropertyChanged);
            _address.DataBindings.Add("Value", _component, "Address", true, DataSourceUpdateMode.OnPropertyChanged);
            _homePhone.DataBindings.Add("Value", _component, "HomePhoneNumber", true, DataSourceUpdateMode.OnPropertyChanged);
            _businessPhone.DataBindings.Add("Value", _component, "BusinessPhoneNumber", true, DataSourceUpdateMode.OnPropertyChanged);
        }
 public void SetComponent(IApplicationComponent component)
 {
     _component = (ContactPersonEditorComponent)component;
 }
Ejemplo n.º 4
0
 public void SetComponent(IApplicationComponent component)
 {
     _component = (ContactPersonEditorComponent)component;
 }