예제 #1
0
        public RookBiddingView(RookVMData model)
        {
            NumberChooserWPF firstBid = new NumberChooserWPF();

            firstBid.Columns = 7;
            Text             = "Bid Info";
            var        rect  = ThisFrame.GetControlArea();
            StackPanel stack = new StackPanel();

            SetUpMarginsOnParentControl(stack, rect);
            firstBid.LoadLists(model.Bid1 !);
            stack.Children.Add(firstBid);
            StackPanel otherStack = new StackPanel();

            otherStack.Orientation = Orientation.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;
        }
예제 #2
0
        public void LoadLists(PickelCardGameVMData model)
        {
            NumberChooserWPF firstBid = new NumberChooserWPF();

            firstBid.Columns = 7;
            Text             = "Bid Info";
            EnumPickerWPF <DeckPieceCP, DeckPieceWPF, EnumSuitList> firstSuit = new EnumPickerWPF <DeckPieceCP, DeckPieceWPF, EnumSuitList>();
            var        thisRect  = ThisFrame.GetControlArea();
            StackPanel thisStack = new StackPanel();

            SetUpMarginsOnParentControl(thisStack, thisRect);
            firstBid.Margin  = new Thickness(3, 3, 3, 3);
            firstSuit.Margin = new Thickness(3, 3, 3, 3);
            firstSuit.LoadLists(model.Suit1 !);
            firstBid.LoadLists(model.Bid1 !);
            thisStack.Children.Add(firstBid);
            thisStack.Children.Add(firstSuit);
            StackPanel otherStack = new StackPanel();

            otherStack.Orientation = Orientation.Horizontal;
            GamePackageViewModelBinder.ManuelElements.Clear();
            Button button = GetGamingButton("Place Bid", nameof(PickelBidViewModel.ProcessBidAsync));

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

            thisGrid.Children.Add(ThisDraw);
            thisGrid.Children.Add(thisStack);
            Content = thisGrid;
        }
        public RageBiddingView(IEventAggregator aggregator, RageCardGameVMData model, RageCardGameGameContainer gameContainer)
        {
            _aggregator = aggregator;
            _aggregator.Subscribe(this);
            StackPanel       stack = new StackPanel();
            NumberChooserWPF bid   = new NumberChooserWPF();
            BaseHandWPF <RageCardGameCardInformation, RageCardGameGraphicsCP, CardGraphicsWPF> hand = new BaseHandWPF <RageCardGameCardInformation, RageCardGameGraphicsCP, CardGraphicsWPF>();
            ScoreBoardWPF score = new ScoreBoardWPF();

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

            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);
        }
        public ChooseNumberView()
        {
            StackPanel stack = new StackPanel();

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

            stack.Children.Add(button);
            Content = stack;
        }
        public FroggiesOpeningView()
        {
            _picker         = new NumberChooserWPF();
            _picker.Columns = 15; //we can increase (?)
            StackPanel stack = new StackPanel();
            TextBlock  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;
        }
예제 #6
0
        public void Init(PokerMainViewModel thisMod)
        {
            NumberChooserWPF thisNumber = new NumberChooserWPF();

            thisNumber.Columns = 3;
            thisNumber.Rows    = 1;
            thisNumber.LoadLists(thisMod.Bet1 !);
            Text = "Bet Information";
            var thisRect = ThisFrame.GetControlArea();

            SetUpMarginsOnParentControl(thisNumber, thisRect);
            Grid thisGrid = new Grid();

            thisGrid.Children.Add(ThisDraw);
            thisGrid.Children.Add(thisNumber);
            Content = thisGrid;
        }
예제 #7
0
        public SkuckBiddingView(SkuckCardGameVMData model)
        {
            Text = "Bid Info";
            Grid       grid      = new Grid();
            var        rect      = ThisFrame.GetControlArea();
            StackPanel thisStack = new StackPanel();

            SetUpMarginsOnParentControl(thisStack, rect);
            NumberChooserWPF bid = new NumberChooserWPF();

            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 SpadesBiddingView(Spades2PlayerVMData model)
        {
            NumberChooserWPF firstBid = new NumberChooserWPF();

            firstBid.Columns = 7;
            Text             = "Bid Info";
            var        rect  = ThisFrame.GetControlArea();
            StackPanel stack = new StackPanel();

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

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

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