public Train(int address, string name, TrainSpeed speed, TrainFunctions functions) { Address = address; Name = name; Speed = speed; Functions = functions; }
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!")); }
public void SetFunctions(TrainFunctions functions) { Functions = functions; PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Functions))); }