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 RageColorView(RageCardGameVMData model, RageCardGameGameContainer gameContainer) { StackPanel stack = new StackPanel(); BaseHandWPF <RageCardGameCardInformation, RageCardGameGraphicsCP, CardGraphicsWPF> hand = new BaseHandWPF <RageCardGameCardInformation, RageCardGameGraphicsCP, CardGraphicsWPF>(); ScoreBoardWPF score = new ScoreBoardWPF(); RageCardGameMainView.PopulateScores(score); SimpleLabelGrid details = new SimpleLabelGrid(); details.AddRow("Trump", nameof(RageColorViewModel.TrumpSuit)); details.AddRow("Lead", nameof(RageColorViewModel.Lead)); EnumPickerWPF <CheckerChoiceCP <EnumColor>, CheckerChooserWPF <EnumColor>, EnumColor> piece = new EnumPickerWPF <CheckerChoiceCP <EnumColor>, CheckerChooserWPF <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); }