示例#1
0
        private void InitWindow()
        {
            switch (InputMode)
            {
            case InputMode.ByCard:
            {
                Cards.Clear();
                Cards.AddRange(_allCardSorted.Keys);

                Editions.Clear();
                EditionSelected  = null;
                CardSelectedName = null;
                break;
            }

            case InputMode.ByEdition:
            {
                Cards.Clear();

                IEdition save = EditionSelected;
                Editions.Clear();
                Editions.AddRange(_allEditions);

                CardSelectedName = null;
                EditionSelected  = save;
                break;
            }

            case InputMode.None:

                Cards.Clear();
                Editions.Clear();
                EditionSelected  = null;
                CardSelectedName = null;
                break;
            }

            Languages.Clear();
            CurrentCollectionDetail = null;
            LanguageSelected        = null;
            Count    = _defaultQuantity;
            IsFoil   = false;
            IsAltArt = false;
            ResetFocus();
        }
        async Task ExecuteLoadEditionsCommand()
        {
            try
            {
                Editions.Clear();
                var editions = await dataStore.GetEditionsAsync(true);

                Editions.AddRange(editions);
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex);
                analytics.TrackError(ex);
            }
            finally
            {
                IsBusy = false;
            }
        }