private void ComboBoxDeckVersion_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (!_initialized || DeckPickerList.ChangedSelection)
            {
                return;
            }
            var deck = DeckPickerList.SelectedDecks.FirstOrDefault() ?? DeckList.Instance.ActiveDeck;

            if (deck == null)
            {
                return;
            }
            var version = ComboBoxDeckVersion.SelectedItem as SerializableVersion;

            if (version == null || deck.SelectedVersion == version)
            {
                return;
            }
            deck.SelectVersion(version);
            DeckList.Save();
            DeckPickerList.UpdateDecks(forceUpdate: new[] { deck });
            UpdateDeckList(deck);
            ManaCurveMyDecks.UpdateValues();
            OnPropertyChanged(nameof(HsReplayButtonVisibility));
            if (deck.Equals(DeckList.Instance.ActiveDeck))
            {
                UseDeck(deck);
            }
            DeckCharts.SetDeck(deck);
            HsReplayDeckInfo.SetDeck(deck);
        }
 public async void UseDeck(Deck selected)
 {
     if (selected != null)
     {
         DeckList.Instance.ActiveDeck = selected;
     }
     MainWindowMenu.SelectedDecks = selected != null ? new List <Deck> {
         selected
     } : new List <Deck>();
     DeckCharts.SetDeck(selected);
     HsReplayDeckInfo.SetDeck(selected);
     await Core.Reset();
 }
        public void DisplayFiltersUpdated()
        {
            foreach (var deck in DeckList.Instance.Decks)
            {
                deck.StatsUpdated();
            }
            DeckPickerList.UpdateDecks();
            Core.Overlay.Update(true);
            var selected = DeckPickerList.SelectedDecks.FirstOrDefault() ?? DeckList.Instance.ActiveDeck;

            DeckCharts.SetDeck(selected);
            HsReplayDeckInfo.SetDeck(selected);
            OnPropertyChanged(nameof(ActiveFiltersWarningVisibility));
        }
        private void DeckPickerList_OnSelectedDeckChanged(DeckPicker sender, List <Deck> decks)
        {
            var active = DeckList.Instance.ActiveDeck;

            MainWindowMenu.SelectedDecks = (!decks?.Any() ?? false) && active != null ? new List <Deck> {
                active
            } : decks;

            var deck = decks?.FirstOrDefault() ?? active;

            SelectDeck(deck, Config.Instance.AutoUseDeck);
            DeckCharts.SetDeck(deck);
            HsReplayDeckInfo.SetDeck(deck);
        }