public void setICommand() { AddStation = new AddStationCommand(this); IncreaseTemp = new IncreaseTemperatureCommand(this); DecreaseTemp = new DecreaseTemperatureCommand(this); RemoveStation = new RemoveCommand(this); DecreaseMaxTemp = new DecreaseMaxTemp(this); IncreaseMaxTemp = new IncreaseMaxTemp(this); NextStation = new NextStationCommand(this); PreviousStation = new PreviousStationCommand(this); }
public StationInputViewModel(Station newStation, IStationService stationService, ITrackService trackService, IPlaceService placeService, ILogging logger, Window window) { NewStation = newStation; StationService = stationService; TrackService = trackService; PlaceService = placeService; Logger = logger; Window = window; if (NewStation.IsValid()) { SaveStationCommand = new UpdateStationCommand(this); } else { SaveStationCommand = new AddStationCommand(this); } AttachTrackToStationCommand = new AttachTrackToStationCommand(this); RemoveAttachedTrackCommand = new RemoveAttachedTrackCommand(this); InitLists(); }