コード例 #1
0
 private void OnIsOptionCheckChanged(object sender, PropertyChangedEventArgs args)
 {
     if (args.PropertyName == nameof(OptionFilter.IsOptionChecked))
     {
         OptionFilter filter = sender as OptionFilter;
         if (filter != null)
         {
             SetActiveFilter(filter);
         }
     }
 }
コード例 #2
0
 private void SetActiveFilter(OptionFilter filter)
 {
     if (filter.IsOptionChecked)
     {
         m_ActiveFilter = filter;
         RemoveOtherRangeOptions(filter);
     }
     else if (filter == m_ActiveFilter)
     {
         m_ActiveFilter = null;
     }
 }
コード例 #3
0
        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;
        }
コード例 #4
0
 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;
     }
 }