public DeadDie96MainViewModel(CommandContainer commandContainer,
                               DeadDie96MainGameClass mainGame,
                               DeadDie96VMData viewModel,
                               BasicData basicData,
                               TestOptions test,
                               IGamePackageResolver resolver,
                               IStandardRollProcesses roller
                               )
     : base(commandContainer, mainGame, viewModel, basicData, test, resolver, roller)
 {
 }
Exemplo n.º 2
0
 public DeadDie96MainGameClass(IGamePackageResolver mainContainer,
                               IEventAggregator aggregator,
                               BasicData basicData,
                               TestOptions test,
                               DeadDie96VMData currentMod,
                               IMultiplayerSaveState state,
                               IAsyncDelayer delay,
                               CommandContainer command,
                               BasicGameContainer <DeadDie96PlayerItem, DeadDie96SaveInfo> gameContainer,
                               StandardRollProcesses <TenSidedDice, DeadDie96PlayerItem> roller) :
     base(mainContainer, aggregator, basicData, test, currentMod, state, delay, command, gameContainer, roller)
 {
     _model  = currentMod; //if not needed, take this out and the _model variable.
     _roller = roller;
 }
Exemplo n.º 3
0
        readonly DiceListControlWPF <TenSidedDice> _diceControl; //i think.

        public DeadDie96MainView(IEventAggregator aggregator,
                                 TestOptions test, DeadDie96VMData model
                                 )
        {
            _aggregator = aggregator;
            _model      = model;
            _aggregator.Subscribe(this);
            StackPanel mainStack = new StackPanel();

            ParentSingleUIContainer?restoreP = null;

            if (test.SaveOption == EnumTestSaveCategory.RestoreOnly)
            {
                restoreP = new ParentSingleUIContainer()
                {
                    Name = nameof(DeadDie96MainViewModel.RestoreScreen)
                };
            }

            var        thisRoll   = GetGamingButton("Roll Dice", nameof(DeadDie96MainViewModel.RollDiceAsync));
            StackPanel otherStack = new StackPanel();

            otherStack.Orientation = Orientation.Horizontal;
            _diceControl           = new DiceListControlWPF <TenSidedDice>();
            otherStack.Children.Add(_diceControl);
            otherStack.Children.Add(thisRoll);
            mainStack.Children.Add(otherStack);
            _score = new ScoreBoardWPF();
            _score.AddColumn("Current Score", true, nameof(DeadDie96PlayerItem.CurrentScore));
            _score.AddColumn("Total Score", true, nameof(DeadDie96PlayerItem.TotalScore));
            SimpleLabelGrid firstInfo = new SimpleLabelGrid();

            firstInfo.AddRow("Turn", nameof(DeadDie96MainViewModel.NormalTurn)); // there is no roll number needed for this game.
            firstInfo.AddRow("Status", nameof(DeadDie96MainViewModel.Status));


            mainStack.Children.Add(firstInfo.GetContent);
            mainStack.Children.Add(_score);



            if (restoreP != null)
            {
                mainStack.Children.Add(restoreP); //default add to grid but does not have to.
            }
            Content = mainStack;
        }