public ProjectCarsLiveView(DataView dataView) { InitializeComponent(); _dataView = dataView; _challengeResultSender.ChallengeResultEvent += result => ChallengeResultEvent?.Invoke(result); StartProjectCarsGetterLoop(); }
private void InvokeChallengeResultEvent() { var challengeResult = new ChallengeResult(_lastStoredState); try { ChallengeResultEvent?.Invoke(challengeResult); } catch (Exception) { // ignored } }
private void SimulateResult_OnClick(object sender, RoutedEventArgs e) { try { string[] split = RaceNameSelector.Text.Split('/'); SimulatedChallengeResult.TrackLocationAndVariant = split[0].Trim(); SimulatedChallengeResult.CarName = split[1].Trim(); SimulatedChallengeResult.PlayerName = PlayerNameSelector.SelectedItem as string; ChallengeResultEvent?.Invoke(SimulatedChallengeResult); } catch (Exception) { // ignored } }