コード例 #1
0
ファイル: DiceBoxVM.cs プロジェクト: stubhub9/YahtzeeWPF2
 // Constructor
 static DiceBoxVM()
 {
     VimDice = new VimDie [5];
     for (int i = 0; i < 5; i++)
     {
         VimDice [i] = new VimDie()
         {
         };
     }
 }
コード例 #2
0
ファイル: DiceBoxVM.cs プロジェクト: stubhub9/YahtzeeWPF2
        public static void UpdateDiceVisMod()
        {
            for (int _thisDie = 0; _thisDie < 5; _thisDie++)
            {
                var _gDie = GameDice.DieStructs [_thisDie];
                var _vDie = new VimDie()
                {
                    FaceValue = _gDie.FaceValue.ToString(),
                    Left      = (_thisDie * 130.0) + 60.0,
                    Top       = (_gDie.Held) ? 550.0 : 365.0,

                    LeftValue  = " ",
                    RightValue = " ",
                };
                VimDice [_thisDie] = _vDie;
            }
        }