protected void ApplyFilterTo(string ignore, IAnalyzablePokerPlayersFilter adjustedFilter)
 {
     if (SelectedPlayer != null)
     {
         SelectedPlayer.Filter = adjustedFilter;
     }
 }
Beispiel #2
0
 public void ShowFilter(
     string playerName,
     IAnalyzablePokerPlayersFilter currentFilter,
     Action <string, IAnalyzablePokerPlayersFilter> applyTo)
 {
     ShowFilter(playerName, currentFilter, applyTo, null);
 }
        protected void ApplyFilterTo(string playerName, IAnalyzablePokerPlayersFilter adjustedFilter)
        {
            var playerToUpdate = Players.ToList().FirstOrDefault(p => p.PlayerName == playerName);

            if (playerToUpdate != null)
            {
                playerToUpdate.Filter = adjustedFilter;
            }
        }
Beispiel #4
0
        public void ShowFilter(
            string playerName,
            IAnalyzablePokerPlayersFilter currentFilter,
            Action <string, IAnalyzablePokerPlayersFilter> applyTo,
            Action <IAnalyzablePokerPlayersFilter> applyToAll)
        {
            Filter.InitializeWith(playerName, currentFilter, applyTo, applyToAll);

            Show = true;
        }
Beispiel #5
0
        public PlayerStatistics(IEventAggregator eventAggregator, IRepository repository)
        {
            eventAggregator
            .GetEvent <DatabaseInUseChangedEvent>()
            .Subscribe(dp => Reinitialize());

            _repository = repository;

            _allAnalyzablePlayers = new List <IAnalyzablePokerPlayer>();

            _filter = AnalyzablePokerPlayersFilter.InactiveFilter;
        }
Beispiel #6
0
        public IAnalyzablePokerPlayersFilterAdjustmentViewModel InitializeWith(
            string playerName,
            IAnalyzablePokerPlayersFilter currentFilter,
            Action <string, IAnalyzablePokerPlayersFilter> applyTo,
            Action <IAnalyzablePokerPlayersFilter> applyToAll)
        {
            PlayerName = playerName;

            // Need to create a new filter each time, to renew the binding and ensure that each player gets a separate one since the properties of the
            // filter itself don't raise property changed
            Filter = _filterViewModelMake.New.InitializeWith(currentFilter);

            _applyTo    = applyTo;
            _applyToAll = applyToAll;

            return(this);
        }
        public IAnalyzablePokerPlayersFilterViewModel InitializeWith(IAnalyzablePokerPlayersFilter filter)
        {
            TotalPlayersFilter = new RangeFilterForSelectorsViewModel <int>(filter.TotalPlayersFilter, 2.To(10), "Total Players");

            PlayersInFlopFilter = new RangeFilterForSelectorsViewModel <int>(filter.PlayersInFlopFilter, 2.To(10), "Players in Flop");

            StrategicPositionFilter =
                new RangeFilterForSelectorsViewModel <StrategicPositions>(
                    filter.StrategicPositionFilter, StrategicPositions.SB.To(StrategicPositions.BU), "Position");

            TimeRangeFilter =
                new RangeFilterForSelectorsViewModel <int>(
                    filter.TimeRangeFilter,
                    new[] { 0, -10, -20, -30, -45, -60, -90, -120, -240, -480, -720 },
                    "Time Range",
                    new TimeRangeValueToDisplayConverter().Convert);

            AnteFilter     = new RangeFilterForInputsViewModel <double>(filter.AnteFilter, "Ante");
            BigBlindFilter = new RangeFilterForInputsViewModel <double>(filter.BigBlindFilter, "Big Blind");
            MFilter        = new RangeFilterForInputsViewModel <int>(filter.MFilter, "M");
            return(this);
        }
 protected void ApplyFilterToAll(IAnalyzablePokerPlayersFilter adjustedFilter)
 {
     Players.ToList().ForEach(p => p.Filter = adjustedFilter);
 }
 public void ApplyFilterToInvoke(string playerName, IAnalyzablePokerPlayersFilter filter)
 {
     ApplyFilterTo(playerName, filter);
 }
 public void ApplyFilterToAllInvoke(IAnalyzablePokerPlayersFilter filter)
 {
     ApplyFilterToAll(filter);
 }