/// <summary>
 /// Removes event handlers previously assigned to the ComboBox
 /// </summary>
 /// <param name="mapper">The mapper for the lookup ComboBox</param>
 public void RemoveCurrentHandlers(ILookupComboBoxMapper mapper)
 {
     _mapper = mapper;
     _mapper = mapper;
     ComboBoxWin comboBoxWin = this.ComboBox(mapper);
     if (comboBoxWin != null)
     {
         comboBoxWin.SelectedIndexChanged -= _mapper.SelectedIndexChangedHandler;
     }
 }
 private ComboBoxWin ComboBox(ILookupComboBoxMapper mapper)
 {
     ComboBoxWin comboBoxWin = null;
     IControlHabanero control = mapper.Control;
     if (control is IComboBox)
     {
         comboBoxWin = (ComboBoxWin) control;
     }
     return comboBoxWin;
 }
 /// <summary>
 /// Removes event handlers previously assigned to the ComboBox
 /// </summary>
 /// <param name="mapper">The mapper for the lookup ComboBox</param>
 public void RemoveCurrentHandlers(ILookupComboBoxMapper mapper)
 {
     _mapper = mapper;
     IControlHabanero control = mapper.Control;
     if (control is IComboBox)
     {
         ComboBoxWin comboBoxWin = (ComboBoxWin)control;
         comboBoxWin.SelectedIndexChanged -= SelectIndexChangedHandler;
         _mapper.SelectedIndexChangedHandler = null;
     }
 }
 public void AddItemSelectedEventHandler(ILookupComboBoxMapper mapper)
 {
     _mapper = mapper;
     IControlHabanero control = mapper.Control;
     if (control is IComboBox)
     {
         ComboBoxWin comboBoxWin = (ComboBoxWin) control;
         comboBoxWin.SelectedIndexChanged += SelectIndexChangedHandler;
         _mapper.SelectedIndexChangedHandler = SelectIndexChangedHandler;
     }
 }
예제 #5
0
        private ComboBoxWin ComboBox(ILookupComboBoxMapper mapper)
        {
            ComboBoxWin      comboBoxWin = null;
            IControlHabanero control     = mapper.Control;

            if (control is IComboBox)
            {
                comboBoxWin = (ComboBoxWin)control;
            }
            return(comboBoxWin);
        }
예제 #6
0
        /// <summary>
        /// Removes event handlers previously assigned to the ComboBox
        /// </summary>
        /// <param name="mapper">The mapper for the lookup ComboBox</param>
        public void RemoveCurrentHandlers(ILookupComboBoxMapper mapper)
        {
            _mapper = mapper;
            _mapper = mapper;
            ComboBoxWin comboBoxWin = this.ComboBox(mapper);

            if (comboBoxWin != null)
            {
                comboBoxWin.SelectedIndexChanged -= _mapper.SelectedIndexChangedHandler;
            }
        }
예제 #7
0
        /// <summary>
        /// Removes event handlers previously assigned to the ComboBox
        /// </summary>
        /// <param name="mapper">The mapper for the lookup ComboBox</param>
        public void RemoveCurrentHandlers(ILookupComboBoxMapper mapper)
        {
            _mapper = mapper;
            IControlHabanero control = mapper.Control;

            if (control is IComboBox)
            {
                ComboBoxWin comboBoxWin = (ComboBoxWin)control;
                comboBoxWin.SelectedIndexChanged   -= SelectIndexChangedHandler;
                _mapper.SelectedIndexChangedHandler = null;
            }
        }
예제 #8
0
        public void AddItemSelectedEventHandler(ILookupComboBoxMapper mapper)
        {
            _mapper = mapper;
            IControlHabanero control = mapper.Control;

            if (control is IComboBox)
            {
                ComboBoxWin comboBoxWin = (ComboBoxWin)control;
                comboBoxWin.SelectedIndexChanged   += SelectIndexChangedHandler;
                _mapper.SelectedIndexChangedHandler = SelectIndexChangedHandler;
            }
        }
 /// <summary>
 /// Adds event handlers to the ComboBox that are suitable for the UI environment
 /// </summary>
 /// <param name="mapper">The mapper for the lookup ComboBox</param>
 public void AddHandlers(ILookupComboBoxMapper mapper)
 {
     ComboBoxWin comboBoxWin = this.ComboBox(mapper);
     if (comboBoxWin != null)
     {
         comboBoxWin.KeyPress += delegate(object sender, System.Windows.Forms.KeyPressEventArgs e)
         {
             if (e.KeyChar == 13)
             {
                 mapper.ApplyChangesToBusinessObject();
                 mapper.UpdateControlValueFromBusinessObject();
             }
         };
     }
 }
예제 #10
0
        /// <summary>
        /// Adds event handlers to the ComboBox that are suitable for the UI environment
        /// </summary>
        /// <param name="mapper">The mapper for the lookup ComboBox</param>
        public void AddHandlers(ILookupComboBoxMapper mapper)
        {
            ComboBoxWin comboBoxWin = this.ComboBox(mapper);

            if (comboBoxWin != null)
            {
                comboBoxWin.KeyPress += delegate(object sender, System.Windows.Forms.KeyPressEventArgs e)
                {
                    if (e.KeyChar == 13)
                    {
                        mapper.ApplyChangesToBusinessObject();
                        mapper.UpdateControlValueFromBusinessObject();
                    }
                };
            }
        }
예제 #11
0
 /// <summary>
 /// Adds event handlers to the ComboBox that are suitable for the UI environment
 /// </summary>
 /// <param name="mapper">The mapper for the lookup ComboBox</param>
 public void AddHandlers(ILookupComboBoxMapper mapper)
 {
     AddItemSelectedEventHandler(mapper);
 }
 /// <summary>
 /// Adds event handlers to the ComboBox that are suitable for the UI environment
 /// </summary>
 /// <param name="mapper">The mapper for the lookup ComboBox</param>
 public void AddHandlers(ILookupComboBoxMapper mapper)
 {
     AddItemSelectedEventHandler(mapper);
 }