public RageBiddingView(IEventAggregator aggregator, RageCardGameVMData model, RageCardGameGameContainer gameContainer)
        {
            _aggregator = aggregator;
            _aggregator.Subscribe(this);
            StackLayout     stack = new StackLayout();
            NumberChooserXF bid   = new NumberChooserXF();
            BaseHandXF <RageCardGameCardInformation, RageCardGameGraphicsCP, CardGraphicsXF> hand = new BaseHandXF <RageCardGameCardInformation, RageCardGameGraphicsCP, CardGraphicsXF>();
            ScoreBoardXF score = new ScoreBoardXF();

            RageCardGameMainView.PopulateScores(score);
            Button            button  = GetGamingButton("Submit", nameof(RageBiddingViewModel.BidAsync));
            SimpleLabelGridXF bidInfo = new SimpleLabelGridXF();

            bidInfo.AddRow("Trump", nameof(RageBiddingViewModel.TrumpSuit));
            bidInfo.AddRow("Turn", nameof(RageBiddingViewModel.NormalTurn));
            stack.Children.Add(bid);
            stack.Children.Add(button);
            stack.Children.Add(hand);
            stack.Children.Add(bidInfo.GetContent);
            stack.Children.Add(score);
            Content = stack;
            score !.LoadLists(gameContainer.SaveRoot.PlayerList);
            hand !.LoadList(model.PlayerHand1 !, "");
            bid !.LoadLists(model.Bid1);
        }
Ejemplo n.º 2
0
        public RageColorView(RageCardGameVMData model, RageCardGameGameContainer gameContainer)
        {
            StackLayout stack = new StackLayout();
            BaseHandXF <RageCardGameCardInformation, RageCardGameGraphicsCP, CardGraphicsXF> hand = new BaseHandXF <RageCardGameCardInformation, RageCardGameGraphicsCP, CardGraphicsXF>();
            ScoreBoardXF score = new ScoreBoardXF();

            RageCardGameMainView.PopulateScores(score);
            SimpleLabelGridXF details = new SimpleLabelGridXF();

            details.AddRow("Trump", nameof(RageColorViewModel.TrumpSuit));
            details.AddRow("Lead", nameof(RageColorViewModel.Lead));
            EnumPickerXF <CheckerChoiceCP <EnumColor>, CheckerChooserXF <EnumColor>, EnumColor> piece = new EnumPickerXF <CheckerChoiceCP <EnumColor>, CheckerChooserXF <EnumColor>, EnumColor>();

            stack.Children.Add(piece);
            stack.Children.Add(hand);
            stack.Children.Add(details.GetContent);
            stack.Children.Add(score);
            Content = stack;
            score !.LoadLists(gameContainer.SaveRoot.PlayerList);
            hand !.LoadList(model.PlayerHand1 !, "");
            piece.LoadLists(model.Color1);
        }