public CardsPage(Deck deck = null)
        {
            InitializeComponent();

            _deckToShow = deck;

            if (App.RuntimePlatform == App.Device.Android &&
                int.Parse(CrossDeviceInfo.Current.Version.Substring(0, 1)) < 5)
            {
                SlideMenu = new CardTypeFilterLegacy();
            }
            else
            {
                SlideMenu = new CardTypeFilter();
            }

            this.SlideMenu.BindingContext = Vm;

            //Android uses toast messages instead of the label
            MessageLabel.IsVisible = App.RuntimePlatform != App.Device.Android;
        }
Пример #2
0
    public void SelectTab(CardTypeFilter tab, bool instant)
    {
        int newIndex = Tabs.IndexOf(tab);

        if (newIndex == currentIndex)
        {
            return;
        }

        currentIndex = newIndex;
        //we have selected a new tab
        foreach (CardTypeFilter t in Tabs)
        {
            if (t != tab)
            {
                t.Deselect(instant);
            }
        }

        tab.Select(instant);
        CCScreen.Instance.CollectionBrowserScript.Asset           = tab.asset;
        CCScreen.Instance.CollectionBrowserScript.IncludeAllCards = tab.showAllCards;
    }