public ChooseSuitViewModel(CommandContainer commandContainer, CrazyEightsVMData model, ISuitProcesses processes) { CommandContainer = commandContainer; _model = model; _processes = processes; _model.SuitChooser.ItemClickedAsync += SuitChooser_ItemClickedAsync; }
public ChooseSuitView(CrazyEightsVMData model) { EnumPickerXF<DeckPieceCP, DeckPieceXF, EnumSuitList> picker = new EnumPickerXF<DeckPieceCP, DeckPieceXF, EnumSuitList>(); picker.GraphicsHeight = 200; picker.GraphicsWidth = 200; picker.LoadLists(model.SuitChooser); Content = picker; }
public CrazyEightsMainView(IEventAggregator aggregator, TestOptions test, CrazyEightsVMData model ) { _aggregator = aggregator; _model = model; _aggregator.Subscribe(this); _deckGPile = new BaseDeckXF <RegularSimpleCard, ts, DeckOfCardsXF <RegularSimpleCard> >(); _discardGPile = new BasePileXF <RegularSimpleCard, ts, DeckOfCardsXF <RegularSimpleCard> >(); _score = new ScoreBoardXF(); _playerHandWPF = new BaseHandXF <RegularSimpleCard, ts, DeckOfCardsXF <RegularSimpleCard> >(); StackLayout mainStack = new StackLayout(); ParentSingleUIContainer?restoreP = null; if (test.SaveOption == EnumTestSaveCategory.RestoreOnly) { restoreP = new ParentSingleUIContainer(nameof(CrazyEightsMainViewModel.RestoreScreen)); } StackLayout otherStack = new StackLayout(); otherStack.Orientation = StackOrientation.Horizontal; otherStack.Children.Add(_deckGPile); otherStack.Children.Add(_discardGPile); // can reposition or not even have as well. mainStack.Children.Add(otherStack); _score.AddColumn("Cards Left", false, nameof(CrazyEightsPlayerItem.ObjectCount)); //very common. SimpleLabelGridXF firstInfo = new SimpleLabelGridXF(); firstInfo.AddRow("Turn", nameof(CrazyEightsMainViewModel.NormalTurn)); firstInfo.AddRow("Status", nameof(CrazyEightsMainViewModel.Status)); mainStack.Children.Add(_playerHandWPF); mainStack.Children.Add(firstInfo.GetContent); otherStack = new StackLayout(); otherStack.Orientation = StackOrientation.Horizontal; mainStack.Children.Add(otherStack); otherStack.Children.Add(_score); ParentSingleUIContainer parent = new ParentSingleUIContainer(nameof(CrazyEightsMainViewModel.SuitScreen)); mainStack.Children.Add(parent); _deckGPile.Margin = new Thickness(5, 5, 5, 5); _discardGPile.Margin = new Thickness(5, 5, 5, 5); if (restoreP != null) { //todo: figure out where to place the restore ui if there is a restore option. mainStack.Children.Add(restoreP); //default add to grid but does not have to. } Content = mainStack; }
public CrazyEightsMainViewModel(CommandContainer commandContainer, CrazyEightsMainGameClass mainGame, CrazyEightsVMData viewModel, BasicData basicData, TestOptions test, IGamePackageResolver resolver ) : base(commandContainer, mainGame, viewModel, basicData, test, resolver) { _mainGame = mainGame; _resolver = resolver; _model = viewModel; viewModel.Deck1.NeverAutoDisable = true; }
public CrazyEightsMainGameClass(IGamePackageResolver mainContainer, IEventAggregator aggregator, BasicData basicData, TestOptions test, CrazyEightsVMData currentMod, IMultiplayerSaveState state, IAsyncDelayer delay, ICardInfo <RegularSimpleCard> cardInfo, CommandContainer command, CrazyEightsGameContainer gameContainer, ISuitProcesses processes ) : base(mainContainer, aggregator, basicData, test, currentMod, state, delay, cardInfo, command, gameContainer) { _model = currentMod; _command = command; _gameContainer = gameContainer; _processes = processes; }
public SuitProcesses(CrazyEightsGameContainer gameContainer, CrazyEightsVMData model) { _gameContainer = gameContainer; _model = model; }