private void helpTypeCombobox_SelectionChanged(TypeOfUnit item, int index) { List <BE.HostingUnit> afterFilter = myBL.GroupByTypeOfUnits().AllElementsForKey(item); indexType = index; SelectType = TypeList[indexType]; Refresh(hostingUnits, afterFilter); }
private void TypeCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (TypeCombobox.SelectedItem == null) { indexType = -1; TypeClear.Visibility = Visibility.Hidden; return; } TypeOfUnit typeOf = (TypeOfUnit)TypeCombobox.SelectedItem; TypeClear.Visibility = Visibility.Visible; TypeCombobox.IsEnabled = false; helpTypeCombobox_SelectionChanged(typeOf, TypeCombobox.SelectedIndex); }
/// <summary> /// Returns the Hero's Type as a String. /// </summary> public string GetUnitType() { string temp = TypeOfUnit.ToString(); return(temp); }