Ejemplo n.º 1
0
        private void checkedComboBoxEdit1_Properties_Popup(object sender, EventArgs e)
        {
            PopupContainerForm popupForm = ((IPopupControl)sender).PopupWindow as PopupContainerForm;

            popupForm.KeyPreview = true;
            popupForm.KeyUp     += new KeyEventHandler(popupForm_KeyUp);
        }
        private void checkedComboBoxEdit1_CloseUp(object sender, DevExpress.XtraEditors.Controls.CloseUpEventArgs e)
        {
            PopupContainerForm form = (sender as IPopupControl).PopupWindow as PopupContainerForm;

            (form.Controls[3].Controls[0] as CheckedListBoxControl).SelectedIndexChanged -= new EventHandler(Dropdown_SelectedIndexChanged);

            if (checkedComboBoxEdit1.Enabled)
            {
                List <VehicleBrandInfo> models = new List <VehicleBrandInfo>();

                if (checkedComboBoxEdit1.Properties.GetCheckedItems().ToString().Split(checkedComboBoxEdit1.Properties.SeparatorChar).Length ==
                    checkedComboBoxEdit1.Properties.Items.Count)
                {
                    m_ViewModel.SelectAllVehicleModels = true;
                }
                else
                {
                    m_ViewModel.SelectAllVehicleModels = false;
                    foreach (CheckedListBoxItem item in checkedComboBoxEdit1.Properties.Items)
                    {
                        if (item.CheckState == CheckState.Checked)
                        {
                            models.Add((item.Value as VehicleModelInfo).Model);
                        }
                    }
                }
                m_ViewModel.CheckedVehicleModels = models.ToArray();
            }
            if (Close != null)
            {
                Close(this, EventArgs.Empty);
            }
        }
        private void checkedComboBoxEdit1_Popup(object sender, EventArgs e)
        {
            PopupContainerForm form = (sender as IPopupControl).PopupWindow as PopupContainerForm;

            (form.Controls[3].Controls[0] as CheckedListBoxControl).SelectedIndexChanged += new EventHandler(Dropdown_SelectedIndexChanged);

            if (m_listBoxVehicleModel == null)
            {
                m_listBoxVehicleModel = ((this.checkedComboBoxEdit1 as IPopupControl).PopupWindow as PopupContainerForm).Controls[3].Controls[0] as CheckedListBoxControl;
            }
        }
Ejemplo n.º 4
0
 private void InputCheckedComboBox_Popup(object sender, EventArgs e)
 {
     try
     {
         if (Popup_ItemChecking != null)
         {
             PopupContainerForm form = (sender as IPopupControl).PopupWindow as PopupContainerForm;
             (form.Controls[3].Controls[0] as CheckedListBoxControl).ItemChecking += Popup_ItemChecking;
         }
     }
     catch (Exception ex)
     {
         LogError.WriteLogError("InputCheckedComboBox_Popup: ", ex);
     }
 }
        private void InputCheckedComboBox_Popup(object sender, EventArgs e)
        {
            //try
            //{
            //    if (RowCount != null && RowCount > 0)
            //    {
            //        if (Properties.Items.Count > RowCount)
            //            Properties.DropDownRows = RowCount;
            //        else
            //        {
            //            Properties.DropDownRows = Properties.Items.Count - 1;
            //        }
            //    }
            //}catch(Exception ex)
            //{
            //}

            if (Popup_ItemChecking != null)
            {
                PopupContainerForm form = (sender as IPopupControl).PopupWindow as PopupContainerForm;

                (form.Controls[2].Controls[0] as CheckedListBoxControl).ItemChecking += new DevExpress.XtraEditors.Controls.ItemCheckingEventHandler(Popup_ItemChecking);
            }
        }