private void CB_Version_OnSelectionChanged(object sender, SelectionChangedEventArgs e) { VM.Version = BindingUtil.GetValue(CB_Version.SelectedValue); // binding annoyances CB_Met_Location.SelectedItem = VM.MetLocations[VM.MetLocation = 0]; CB_Egg_Location.SelectedItem = VM.EggLocations[VM.EggLocation = 0]; }
private void CB_Version_OnSelectionChanged(object sender, SelectionChangedEventArgs e) { VM.Version = BindingUtil.GetValue(CB_Version.SelectedValue); // binding annoyances var met = VM.MetLocations.Any(z => z.Value == VM.MetLocation) ? VM.MetLocation : 0; var egg = VM.EggLocations.Any(z => z.Value == VM.EggLocation) ? VM.EggLocation : 0; CB_Met_Location.SelectedItem = VM.MetLocations[VM.MetLocation = met]; CB_Egg_Location.SelectedItem = VM.EggLocations[VM.EggLocation = egg]; }
private void CB_Species_OnSelectionChanged(object sender, SelectionChangedEventArgs e) { VM.Species = BindingUtil.GetValue(CB_Species.SelectedValue); ReloadFormAbility(); // binding annoyances }
private void CB_MetLocation_OnSelectionChanged(object sender, SelectionChangedEventArgs e) => VM.MetLocation = BindingUtil.GetValue(CB_Met_Location.SelectedValue);
private void CB_Ball_OnSelectionChanged(object sender, SelectionChangedEventArgs e) => VM.Ball = BindingUtil.GetValue(CB_Ball.SelectedValue);
private void CB_Move4_OnSelectionChanged(object sender, SelectionChangedEventArgs e) => VM.Move4 = BindingUtil.GetValue(CB_Move4.SelectedValue);
private void CB_Nature_OnSelectionChanged(object sender, SelectionChangedEventArgs e) => VM.Nature = BindingUtil.GetValue(CB_Nature.SelectedValue);
private void CB_HeldItem_OnSelectionChanged(object sender, SelectionChangedEventArgs e) => VM.Item = BindingUtil.GetValue(CB_HeldItem.SelectedValue);