private void comboBox5_SelectedIndexChanged(object sender, EventArgs e) { CustomComboBoxItem Combomineng = (CustomComboBoxItem)this.comboBox5.SelectedItem; int code = Convert.ToInt32(Combomineng.tag.ToString()); Car1.min_engine = code; }
private void comboBox7_SelectedIndexChanged(object sender, EventArgs e) { CustomComboBoxItem CombominY = (CustomComboBoxItem)this.comboBox7.SelectedItem; int code = Convert.ToInt32(CombominY.tag); Car1.min_year = code; }
private void comboBox6_SelectedIndexChanged(object sender, EventArgs e) { CustomComboBoxItem Combomaxeng = (CustomComboBoxItem)this.comboBox6.SelectedItem; int code = Convert.ToInt32(Combomaxeng.tag); Car1.max_engine = code; }
private void comboBox1_SelectedValueChanged(object sender, EventArgs e) { this.comboBox2.Items.Clear(); CustomComboBoxItem ComboMaker = (CustomComboBoxItem)this.comboBox1.SelectedItem; Car1.maker = Convert.ToInt32(ComboMaker.tag.ToString()); localhost2.modelws modelz = new localhost2.modelws(); localhost2.Maker Maker1 = new localhost2.Maker(); int code = Convert.ToInt32(ComboMaker.tag.ToString()); Maker1.maker = code; localhost2.reply mm = new localhost2.reply(); try { mm = modelz.models(Maker1); MessageBox.Show(mm.reply0, "All Models From Selected Maker"); string mods = mm.reply0.ToString(); string[] modarray = mods.Split('&'); int mod_num = modarray.Length; int i = 0; for (i = 0; i < mod_num; i++) { string[] model_data = modarray[i].Split('_'); this.comboBox2.Items.Add(new CustomComboBoxItem(model_data[0], model_data[0])); } } catch { MessageBox.Show("Cannot Load Models, Check your internet connection", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1); //MessageBox.Show("Failed To Load Models From www.alekz.eu/carz \n Check You Internet Connection"), MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }
private void comboBox4_SelectedIndexChanged(object sender, EventArgs e) { CustomComboBoxItem Combomaxpr = (CustomComboBoxItem)this.comboBox4.SelectedItem; int code = Convert.ToInt32(Combomaxpr.tag.ToString()); Car1.max_price = code; }
private void comboBox13_SelectedIndexChanged(object sender, EventArgs e) { CustomComboBoxItem Combomaxkm = (CustomComboBoxItem)this.comboBox13.SelectedItem; int codexkm = Convert.ToInt32(Combomaxkm.tag); Car1.max_km = codexkm; }
private void view_ShowFilterPopup(object sender, FilterPopupEventArgs e) { combo = e.ComboBoxEdit; List <object> list = combo.ItemsSource as List <object>; CustomComboBoxItem customItem = new CustomComboBoxItem() { DisplayValue = "(Custom)", EditValue = new CustomComboBoxItem() }; List <object> data = new List <object>(); int index = 0; for (int i = 0; i < list.Count; i++) { data.Add(list[i]); if (list[i] is CustomComboBoxItem) { if ((list[i] as CustomComboBoxItem).DisplayValue.ToString() == "(Non blanks)") { index = i; break; } } } list.RemoveRange(0, index + 1); data.Add(customItem); data.AddRange(list); combo.ItemsSource = data; e.ComboBoxEdit.PopupOpened += ComboBoxEdit_PopupOpened; focusedColumn = (GridColumn)e.Column; e.Handled = true; }
private void comboBox8_SelectedIndexChanged(object sender, EventArgs e) { CustomComboBoxItem CombomaxP = (CustomComboBoxItem)this.comboBox8.SelectedItem; int code = Convert.ToInt32(CombomaxP.tag); Car1.max_power = code; }
private void OnPopupClosed(object sender, RoutedEventArgs e) { e.Handled = true; if (commandItem != null) { commandItem = null; FilterWindow wndFilter = new FilterWindow(); wndFilter.Owner = this; wndFilter.GridColumn = focusedColumn; if ((bool)wndFilter.ShowDialog()) { this.dxGrid.FilterString = wndFilter.FilterString; } } }
void plb_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e) { PopupListBox plb = sender as PopupListBox; this.commandItem = null; e.Handled = true; CustomComboBoxItem customItem = plb.SelectedItem as CustomComboBoxItem; if (customItem == null) { return; } if (customItem.DisplayValue == "(Custom)") { this.commandItem = customItem; } }
private void MainForm_Load(object sender, EventArgs e) { if (!isAuth) { Application.Exit(); } else { SearchDoctor(); foreach (var department in _context.Departments) { CustomComboBoxItem item = new CustomComboBoxItem { Id = department.Id, Name = department.Name }; cbDepatments.Items.Add(item); } cbCountShowOnePage.Items.AddRange( new List <CustomComboBoxItem> { new CustomComboBoxItem { Id = 1, Name = "10" }, new CustomComboBoxItem { Id = 2, Name = "20" }, new CustomComboBoxItem { Id = 3, Name = "30" }, new CustomComboBoxItem { Id = 4, Name = "50" } }.ToArray() ); cbCountShowOnePage.SelectedIndex = 0; } }
private void FormAdd_Load(object sender, EventArgs e) { foreach (var role in context.Roles) { CustomComboBoxItem item = new CustomComboBoxItem { Id = role.Id, Name = role.Name }; comboBox2.Items.Add(item); } foreach (var user in context.Users) { CustomComboBoxItem item = new CustomComboBoxItem { Id = user.Id, Name = user.Name }; comboBox1.Items.Add(item); } }
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { CustomComboBoxItem ComboMaker = (CustomComboBoxItem)this.comboBox1.SelectedItem; int code = Convert.ToInt32(ComboMaker.tag.ToString()); Car1.maker = code; this.comboBox2.Items.Clear(); localhost2.modelws modelz = new localhost2.modelws(); localhost2.Maker Maker1 = new localhost2.Maker(); code = Convert.ToInt32(ComboMaker.tag.ToString()); Maker1.maker = code; localhost2.reply mm = new localhost2.reply(); try { mm = modelz.models(Maker1); //MessageBox.Show(mm.reply0); string mod_row = mm.reply0; string[] models = mod_row.Split(new string[] { "&" }, StringSplitOptions.None); int mod_num = models.Length; int i = 0; for (i = 0; i < mod_num; i++) { string[] model_data = models[i].Split(new string[] { "_" }, StringSplitOptions.None); this.comboBox2.Items.Add(new CustomComboBoxItem(model_data[0], model_data[0])); } } catch { MessageBox.Show("Failed To Load Models From www.alekz.eu/carz \n Check You Internet Connection", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void comboBox9_SelectedIndexChanged(object sender, EventArgs e) { CustomComboBoxItem ComboColor = (CustomComboBoxItem)this.comboBox9.SelectedItem; Car1.color = ComboColor.tag.ToString(); }
void View_ShowFilterPopup(object sender, FilterPopupEventArgs e) { if (e.Column.FieldName == "AllocationRemainder") { CustomComboBoxItem item = new CustomComboBoxItem(); item.DisplayValue = "Products with Allocation Remainder > 0"; item.EditValue = CriteriaOperator.Parse("[AllocationRemainder] > 0"); List<object> itemssSource = e.ComboBoxEdit.ItemsSource.Cast<object>().ToList(); itemssSource.Add(item); e.ComboBoxEdit.ItemsSource = itemssSource; } }
private void comboBox2_SelectedIndexChanged(object sender, EventArgs e) { CustomComboBoxItem ComboModel = (CustomComboBoxItem)this.comboBox2.SelectedItem; Car1.model = ComboModel.tag.ToString(); }