Ejemplo n.º 1
0
 public GameLogViewModel(GameLog model, Guid messageToken)
     : base(messageToken)
 {
     this.Model = model;
 }
Ejemplo n.º 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;
        }
Ejemplo n.º 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秒");
 }
Ejemplo n.º 4
0
 public void Start()
 {
     this.CurrentGameLog = new GameLog { GameDateTime = this.GetNowDateTime() };
 }