public static StackLayout GEN(string cardType, Binary b, TapGestureRecognizer tap, FilterState state) { StackLayout card = null; if (cardType == "default") { card = new CardDefault(b); } else if (cardType == "admin") { card = new CardAdmin(b); } else if (cardType == "booked") { card = new CardBooked(b); } else if (cardType == "user") { card = new CardUser(b); } StackLayout st = new StackLayout { HorizontalOptions = LayoutOptions.FillAndExpand, VerticalOptions = LayoutOptions.FillAndExpand, Children = { card }, GestureRecognizers = { tap } }; return(st); }
// Use this for initialization public CardDefault GetCard(cardType cardType) { CardDefault NewCard = new CardDefault(); switch (cardType) { case cardType.Admiral: break; default: NewCard.FacedFront = false; break; } return(new CardDefault()); }