private void OnIsOptionCheckChanged(object sender, PropertyChangedEventArgs args) { if (args.PropertyName == nameof(OptionFilter.IsOptionChecked)) { OptionFilter filter = sender as OptionFilter; if (filter != null) { SetActiveFilter(filter); } } }
private void SetActiveFilter(OptionFilter filter) { if (filter.IsOptionChecked) { m_ActiveFilter = filter; RemoveOtherRangeOptions(filter); } else if (filter == m_ActiveFilter) { m_ActiveFilter = null; } }
public override void ResetFilter() { MeleeOnlyFilter.ResetFilter(); RangeOnlyFilter.ResetFilter(); DirectRangeFilter.ResetFilter(); SonicRangeFilter.ResetFilter(); PoisonRangeFilter.ResetFilter(); QuillRangeFilter.ResetFilter(); ArtilleryOnlyFilter.ResetFilter(); RockArtilleryFilter.ResetFilter(); WaterArtilleryFilter.ResetFilter(); ChemicalArtilleryFilter.ResetFilter(); m_ActiveFilter = null; }
private void RemoveOtherRangeOptions(OptionFilter filter) { if (!(filter is MeleeOnlyFilter)) { MeleeOnlyFilter.IsOptionChecked = false; } if (!(filter is RangeOnlyFilter)) { RangeOnlyFilter.IsOptionChecked = false; } if (!(filter is DirectRangeFilter)) { DirectRangeFilter.IsOptionChecked = false; } if (!(filter is SonicRangeFilter)) { SonicRangeFilter.IsOptionChecked = false; } if (!(filter is PoisonRangeFilter)) { PoisonRangeFilter.IsOptionChecked = false; } if (!(filter is QuillRangeFilter)) { QuillRangeFilter.IsOptionChecked = false; } if (!(filter is ArtilleryOnlyFilter)) { ArtilleryOnlyFilter.IsOptionChecked = false; } if (!(filter is RockArtilleryFilter)) { RockArtilleryFilter.IsOptionChecked = false; } if (!(filter is WaterArtilleryFilter)) { WaterArtilleryFilter.IsOptionChecked = false; } if (!(filter is ChemicalArtilleryFilter)) { ChemicalArtilleryFilter.IsOptionChecked = false; } }