Example #1
0
 public GameLogViewModel(GameLog model, Guid messageToken)
     : base(messageToken)
 {
     this.Model = model;
 }
Example #2
0
        public void Stop()
        {
            if (this.CurrentGameLog == null)
            {
                throw new InvalidOperationException("game does not started");
            }

            this.CurrentGameLog.GameEnd(this.GetNowDateTime());
            this.GameLogs.Insert(0, this.CurrentGameLog);

            while (this.GameLogs.Count > 3)
            {
                this.GameLogs.Remove(this.GameLogs.Last());
            }

            this.CurrentGameLog = null;
        }
Example #3
0
 public void TestFormatedTenSecSpan()
 {
     var model = new GameLog { TenSecSpan = TimeSpan.FromMilliseconds(1500) };
     var viewModel = new GameLogViewModel(model, Guid.Empty);
     viewModel.FormatedTenSecSpan.Is("誤差 1.500秒");
 }
Example #4
0
 public void Start()
 {
     this.CurrentGameLog = new GameLog { GameDateTime = this.GetNowDateTime() };
 }