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);
        }
Пример #2
0
        public void LoadLists(PickelCardGameVMData thisMod)
        {
            GamePackageViewModelBinder.ManuelElements.Clear();
            NumberChooserXF firstBid = new NumberChooserXF();

            Text = "Bid Info";
            EnumPickerXF <DeckPieceCP, DeckPieceXF, EnumSuitList> firstSuit = new EnumPickerXF <DeckPieceCP, DeckPieceXF, EnumSuitList>();
            StackLayout thisStack = new StackLayout();

            SetUpMarginsOnParentControl(thisStack);
            firstBid.Margin    = new Thickness(3, 3, 3, 3);
            firstBid.TotalRows = 1;
            firstSuit.Margin   = new Thickness(3, 3, 3, 3);
            firstSuit.Spacing  = 0;
            firstSuit.LoadLists(thisMod.Suit1 !);
            firstBid.LoadLists(thisMod.Bid1 !);
            thisStack.Children.Add(firstBid);
            thisStack.Children.Add(firstSuit);
            StackLayout otherStack = new StackLayout();

            otherStack.Orientation = StackOrientation.Horizontal;
            Button thisBut = GetGamingButton("Place Bid", nameof(PickelBidViewModel.ProcessBidAsync));

            GamePackageViewModelBinder.ManuelElements.Add(thisBut);
            otherStack.Children.Add(thisBut);
            thisBut = GetGamingButton("Pass", nameof(PickelBidViewModel.PassAsync));
            GamePackageViewModelBinder.ManuelElements.Add(thisBut);
            otherStack.Children.Add(thisBut);
            thisStack.Children.Add(otherStack);
            Grid thisGrid = new Grid();

            thisGrid.Children.Add(ThisDraw);
            thisGrid.Children.Add(thisStack);
            Content = thisGrid;
        }
Пример #3
0
        public RookBiddingView(RookVMData model)
        {
            NumberChooserXF firstBid = new NumberChooserXF();

            firstBid.Columns = 7;
            Text             = "Bid Info";
            StackLayout stack = new StackLayout();

            SetUpMarginsOnParentControl(stack);
            stack.Children.Add(firstBid);
            StackLayout otherStack = new StackLayout();

            otherStack.Orientation = StackOrientation.Horizontal;
            stack.Children.Add(otherStack);
            Button button = GetGamingButton("Place Bid", nameof(RookBiddingViewModel.BidAsync));

            otherStack.Children.Add(button);
            button = GetGamingButton("Pass", nameof(RookBiddingViewModel.PassAsync));
            otherStack.Children.Add(button);
            Grid grid = new Grid();

            grid.Children.Add(ThisDraw);
            grid.Children.Add(stack);
            Content   = grid;
            _firstBid = firstBid;
            _model    = model;
        }
Пример #4
0
        public ChooseNumberView()
        {
            StackLayout stack = new StackLayout();

            _numberui           = new NumberChooserXF();
            _numberui.TotalRows = 1;
            stack.Children.Add(_numberui);
            Button button = GetGamingButton("Choose Number", nameof(ChooseNumberViewModel.ChooseNumberAsync));

            stack.Children.Add(button);
            Content = stack;
        }
Пример #5
0
        public void Init(PokerMainViewModel thisMod)
        {
            NumberChooserXF thisNumber = new NumberChooserXF();

            thisNumber.Columns   = 3;
            thisNumber.Rows      = 1;
            thisNumber.TotalRows = 1;
            thisNumber.LoadLists(thisMod.Bet1 !);
            Text = "Bet Information";
            SetUpMarginsOnParentControl(thisNumber);
            Grid thisGrid = new Grid();

            thisGrid.Children.Add(ThisDraw);
            thisGrid.Children.Add(thisNumber);
            Content = thisGrid;
        }
        public FroggiesOpeningView()
        {
            //TestControl test = new TestControl();
            //Content = test;
            //FroggiesShellViewModel.EmulateCloseOpen =  () => IsVisible = false;
            _picker         = new NumberChooserXF();
            _picker.Columns = 13; //we can increase (?)
            StackLayout stack = new StackLayout();
            Label       label = GetDefaultLabel();

            //label.FontSize = 50;
            label.Text   = "Choose How Many Frogs:";
            label.Margin = new Thickness(0, 10, 0, 10);
            stack.Children.Add(label);
            _picker.Margin = new Thickness(5);
            stack.Children.Add(_picker);
            Content = stack;
        }
Пример #7
0
        public SkuckBiddingView(SkuckCardGameVMData model)
        {
            Text = "Bid Info";
            Grid        grid      = new Grid();
            StackLayout thisStack = new StackLayout();

            SetUpMarginsOnParentControl(thisStack);
            NumberChooserXF bid = new NumberChooserXF();

            bid.Columns = 9;
            bid.LoadLists(model.Bid1 !);
            thisStack.Children.Add(bid);
            Button button = GetGamingButton("Place Bid", nameof(SkuckBiddingViewModel.BidAsync));

            thisStack.Children.Add(button);
            grid.Children.Add(ThisDraw);
            grid.Children.Add(thisStack);
            Content = grid;
        }
Пример #8
0
        public XactikaBidView(XactikaVMData model, IEventAggregator aggregator)
        {
            NumberChooserXF firstBid = new NumberChooserXF();

            firstBid.Rows    = 2;
            firstBid.Columns = 5;
            Text             = "Bid Info";
            StackLayout stack = new StackLayout();

            SetUpMarginsOnParentControl(stack);
            firstBid.Margin = new Thickness(3, 3, 3, 3);
            firstBid.LoadLists(model.Bid1 !);
            stack.Children.Add(firstBid);
            Button button = GetGamingButton("Place Bid", nameof(XactikaBidViewModel.BidAsync));

            stack.Children.Add(button);
            Grid grid = new Grid();

            grid.Children.Add(ThisDraw);
            grid.Children.Add(stack);
            Content     = grid;
            _aggregator = aggregator;
        }
        public SpadesBiddingView(Spades2PlayerVMData model, IEventAggregator aggregator)
        {
            NumberChooserXF firstBid = new NumberChooserXF();

            firstBid.Columns = 7;
            //firstBid.Rows = 2;
            Text = "Bid Info";
            StackLayout stack = new StackLayout();

            SetUpMarginsOnParentControl(stack);
            firstBid.Margin = new Thickness(3, 3, 3, 3);
            firstBid.LoadLists(model.Bid1 !);
            stack.Children.Add(firstBid);
            Button button = GetSmallerButton("Place Bid", nameof(SpadesBiddingViewModel.BidAsync));

            button.Margin = new Thickness(3, -60, 3, 3);
            stack.Children.Add(button);
            Grid grid = new Grid();

            grid.Children.Add(ThisDraw);
            grid.Children.Add(stack);
            Content     = grid;
            _aggregator = aggregator;
        }