private void Z21Client_LocomotiveInformationChanged(LocomotiveInformation e) { repos.TryGetValue(e.Address, out var train); if (train.IsCompletedSuccessfully) { train.Result.Update(e); } }
internal void Update(LocomotiveInformation locomotiveInformation) { if (Speed.Equals(locomotiveInformation.TrainSpeed) && Functions == locomotiveInformation.TrainFunctions) { return; } Speed = locomotiveInformation.TrainSpeed; Functions = locomotiveInformation.TrainFunctions; PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("All!")); }