示例#1
0
        public override void InitializeFilterModel()
        {
            var player = StorageModel.PlayerSelectedItem;

            var gameTypes = player != null && FilterModelManager.FilterType == EnumFilterType.Cash ?
                            ServiceLocator.Current.GetInstance <IDataService>().GetPlayerGameTypes(player.PlayerIds) :
                            new List <Gametypes>();

            var tournaments = player != null && FilterModelManager.FilterType == EnumFilterType.Tournament ?
                              ServiceLocator.Current.GetInstance <IDataService>().GetPlayerTournaments(player.PlayerIds) :
                              new List <Tournaments>();

            FilterModel = (FilterStandardModel)FilterModelManager.FilterModelCollection.FirstOrDefault(x => x.GetType().Equals(typeof(FilterStandardModel)));

            FilterModel.UpdateFilterSectionStakeLevelCollection(gameTypes);
            FilterModel.UpdateFilterSectionBuyinCollection(tournaments);

            FilterModelClone = (FilterStandardModel)FilterModel.Clone();

            RaisePropertyChanged(nameof(IsStakeLevelVisible));
            RaisePropertyChanged(nameof(IsBuyinVisible));
        }