Пример #1
0
        public MatchesBase(IInternalService internalService, IWebsiteService website, IMatchesTabService matchesTab, GameMode matchGameMode, MatchesTab currentTab)
            : base(internalService)
        {
            Website           = website;
            MatchesTabService = matchesTab;
            MatchGameMode     = matchGameMode;
            CurrentTab        = currentTab;

            ShowMatchSummaryButtonEnabled = true;

            SeasonList.Add("Lifetime");
            SeasonList.AddRange(HeroesHelpers.Seasons.GetSeasonList());
            SelectedSeasonOption = SeasonList[0];

            GameTimeList           = HeroesHelpers.GameDates.GameTimeList;
            SelectedGameTimeOption = GameTimeList[0];

            GameDateList           = HeroesHelpers.GameDates.GameDateList;
            SelectedGameDateOption = GameDateList[0];

            MapsList.Add("Any");
            MapsList.AddRange(HeroesIcons.MapBackgrounds().GetMapsList());
            SelectedMapOption = MapsList[0];

            ReplayBuildsList.Add("Any");
            ReplayBuildsList.AddRange(HeroesHelpers.Builds.GetBuildsList(HeroesIcons));
            SelectedBuildOption = ReplayBuildsList[0];

            HeroesList.Add("Any");
            HeroesList.AddRange(HeroesIcons.Heroes().GetListOfHeroes(HeroesIcons.GetLatestHeroesBuild()));
            SelectedCharacter = HeroesList[0];

            Messenger.Default.Register <MatchesDataMessage>(this, (message) => ReceivedMatchSearchData(message));
            Messenger.Default.Register <NotificationMessage>(this, async(message) => await ReceivedMessageAsync(message));
        }
 private void PlayerAndHeroSearch(MatchesTab matchTab)
 {
     MainTabs.SwitchToTab(MainPage.Matches);
     MatchesTab.SwitchToTab(matchTab);
     Messenger.Default.Send(new MatchesDataMessage {
         MatchTab = matchTab, SelectedBattleTagName = PlayerName, SelectedCharacter = CharacterName
     });
     MatchSummaryFlyout.CloseMatchSummaryFlyout();
 }
Пример #3
0
        private void Profile_Click(object sender, MouseButtonEventArgs e)
        {
            ProfileTab.Foreground = Brushes.White;
            RankingTab.SetValue(ForegroundProperty, DependencyProperty.UnsetValue);
            MatchesTab.SetValue(ForegroundProperty, DependencyProperty.UnsetValue);

            ProfilePane.Visibility = Visibility.Visible;
            RankingPane.Visibility = MatchesPane.Visibility = Visibility.Collapsed;
        }
Пример #4
0
        public MatchesBase(IInternalService internalService, IWebsiteService website, IMatchesTabService matchesTab, GameMode matchGameMode, MatchesTab currentTab)
            : base(internalService)
        {
            Website           = website;
            MatchesTabService = matchesTab;
            MatchGameMode     = matchGameMode;
            CurrentTab        = currentTab;

            ShowMatchSummaryButtonEnabled = true;

            SeasonList.AddRange(HeroesHelpers.Seasons.GetSeasonList());
            SelectedSeasonOption = SeasonList[0];

            GameTimeList           = HeroesHelpers.GameDateFilters.GameTimeList;
            SelectedGameTimeOption = FilterGameTimeOption.Any.GetFriendlyName();

            GameDateList           = HeroesHelpers.GameDateFilters.GameDateList;
            SelectedGameDateOption = FilterGameDateOption.Any.GetFriendlyName();

            MapsList.Add("Any");
            MapsList.AddRange(HeroesIcons.Battlegrounds().Battlegrounds(true).Select(x => x.Name).ToList());
            SelectedMapOption = MapsList[0];

            ReplayBuildsList.Add("Any");
            ReplayBuildsList.AddRange(HeroesIcons.HeroBuilds().Builds);
            SelectedBuildOption = ReplayBuildsList[0];

            HeroesList.Add("Any");
            HeroesList.AddRange(HeroesIcons.HeroesData().HeroNames().OrderBy(x => x).ToList());
            SelectedCharacter = HeroesList[0];

            PartyCountList.Add("Any");
            PartyCountList.AddRange(HeroesHelpers.Parties.GetPartyList());
            SelectedParty = PartyCountList[0];

            SelectedAccountLevel = 0;

            Messenger.Default.Register <MatchesDataMessage>(this, (message) => ReceivedMatchSearchData(message));
            Messenger.Default.Register <NotificationMessage>(this, async(message) => await ReceivedMessageAsync(message));
        }