void TimeSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs <double> e) { if (StarMap == null) { return; } var time = TimeSpan.FromSeconds(TimeSlider.Value); var timeText = string.Format("{0:00}:{1:00}:{2:00}", (int)time.TotalHours, time.Minutes, time.Seconds); var turns = (int)(TimeSlider.Value / StarMap.Config.SecondsPerTurn); TimeWarpButton.Content = String.Format("+{0} ({1:0} turns) to turn {2:0})", timeText, turns, StarMap.GetGameTurn(TimeSlider.Value)); }