private void Save(object obj) { IsSelectError = false; if ((_selectedCards.Count == 1) && (SelectorType.Equals(CardSelectorType.PlayerSelector))) { IsOneCard = true; return; } _notification.ReturnType = CardSelectorReturnType.Cards; switch (SelectorType) { case CardSelectorType.BoardSelector: _notification.CardsContainer = new BoardModel(_selectedCards.Select(x => new CardModel(x.Rank, x.Suit)).ToList()); break; case CardSelectorType.PlayerSelector: _notification.CardsContainer = new PlayerModel(_selectedCards.Select(x => new CardModel(x.Rank, x.Suit)).ToList()); break; } _notification.Confirmed = true; FinishInteraction(); }
//methods internal string GetValue(decimal payment) { return(descs[type.Equals(SelectorType.NONE) ? 0 : (type.Equals(SelectorType.COFFEE) ? coffeeSelect(payment, descs.Length - 1) : defSelect(payment, descs.Length - 1))]); }