Пример #1
0
        // Events

        /// <summary>
        /// Moves the die across the hold line when clicked  Y/ top; X/ left doesn't change.
        /// FUTURE: X will change for group sliding.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Die_Click(object sender, RoutedEventArgs e)
        {
            var   visDie   = ( Button )sender;
            var   name     = $"{visDie.Name [ 3 ]}";
            int   dieNum   = int.Parse(name);
            Point _topLeft = DiceBoxVM.DieWasClicked(dieNum);

            visDie.Margin = new Thickness(_topLeft.X, _topLeft.Y, 0, 0);
        }
Пример #2
0
        //NYI:  SEE VisDice.
        //Toggle die.Held
        public static void DieWasClicked(int OrdinalOfDieClicked)
        {
            DiceBoxVM.DieWasClicked(OrdinalOfDieClicked);

            //var _topLeft = new Point ();
            //GameDice.DieStruct _die = GameDice.DieStructs [ thisDie ];
            //_topLeft.X = 60.0 + ( thisDie * 130.0 );
            //_topLeft.Y = ( _die.Held ) ? 365.0 : 550.0;
            //GameDice.DieStructs [ thisDie ].Held = !_die.Held;
            //return _topLeft;
        }
Пример #3
0
 // New game OnInit or clicked.
 public static void NewGame()
 {
     GameModel1.NewGame();
     DiceBoxVM.UpdateDiceVisMod();
 }
Пример #4
0
 public static void CommitWasClicked()
 {
     GameModel1.CommitWasClicked();
     DiceBoxVM.UpdateDiceVisMod();
 }