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