public GameLogViewModel(GameLog model, Guid messageToken) : base(messageToken) { this.Model = model; }
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; }
public void TestFormatedTenSecSpan() { var model = new GameLog { TenSecSpan = TimeSpan.FromMilliseconds(1500) }; var viewModel = new GameLogViewModel(model, Guid.Empty); viewModel.FormatedTenSecSpan.Is("誤差 1.500秒"); }
public void Start() { this.CurrentGameLog = new GameLog { GameDateTime = this.GetNowDateTime() }; }