private static void HandleStartRoutine(PacketHeader header, Connection connection, InitRoutineData startData) { Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, new ThreadStart(delegate { ClientWindow.TeamName = startData.PlayersNames; ClientWindow.RoutineLengthMinutes = startData.RoutineLengthMinutes; ClientWindow.StartRoutine(); })); }