public ClockSolitaireMainView(IEventAggregator aggregator) { _aggregator = aggregator; _aggregator.Subscribe(this); _clock = new MainClockWPF(); Grid grid = new Grid(); SimpleLabelGrid label = new SimpleLabelGrid(); label.AddRow("Cards", nameof(ClockSolitaireMainViewModel.CardsLeft)); grid.Children.Add(label.GetContent); _clock.Margin = new Thickness(5, 10, 0, 0); grid.Children.Add(_clock); Content = grid; }
public GrandfathersClockMainView(IEventAggregator aggregator) { _aggregator = aggregator; _aggregator.Subscribe(this); StackPanel stack = new StackPanel(); StackPanel otherStack = new StackPanel(); otherStack.Orientation = Orientation.Horizontal; _main = new BasicMultiplePilesWPF <SolitaireCard, ts, DeckOfCardsWPF <SolitaireCard> >(); _main.Margin = new Thickness(10, 5, 5, 5); var autoBut = GetGamingButton("Auto Make Move", nameof(GrandfathersClockMainViewModel.AutoMoveAsync)); autoBut.HorizontalAlignment = HorizontalAlignment.Left; autoBut.VerticalAlignment = VerticalAlignment.Top; var scoresAlone = new SimpleLabelGrid(); scoresAlone.AddRow("Score", nameof(GrandfathersClockMainViewModel.Score)); var tempGrid = scoresAlone.GetContent; var thisWaste = new SolitairePilesWPF(); _piles = thisWaste; var thisClock = new MainClockWPF(); _clock = thisClock; Grid thisGrid = new Grid(); thisGrid.Width = 800; otherStack.Children.Add(thisGrid); otherStack.Children.Add(thisWaste); otherStack.Children.Add(tempGrid); stack.Children.Add(autoBut); thisGrid.Children.Add(stack); thisGrid.Children.Add(thisClock); Content = otherStack; }