private void LoadInitialSampleData() { var accessor = new ScoreBoardAccessor(new ScoreBoardDisplay()); Score = accessor.EditHomeTeam("Nebraska One Flames"); Score = accessor.EditVisitorTeam("Omaha Spikes"); Score = accessor.AddHomeScore(); Score = accessor.AddVisitorScore(); }
private void dispatcherTimer_Tick(object sender, EventArgs e) { var accessor = new ScoreBoardAccessor(Score); if (random.Next(0, 10) % 2 == 0) { Score = accessor.AddHomeScore(); } else { Score = accessor.AddVisitorScore(); } if (Score.HomeScore > 5 || Score.VisitorScore > 5) { dispatcherTimer.Stop(); var adWindow = new AdWindow(); adWindow.Closed += new EventHandler(adWindow_Closed); adWindow.Show(); } }
public ScoreBoardAccessor(ScoreBoardDisplay score) { Score = score; }