public ObstacleSelectorViewModel() { GetObstacles(); SelectedObstacle = Blueprint.Instance.DefaultObstacle.ToObstacleViewModel(); SelectedObstacle.IsSelected = true; var obst = Obstacles.FirstOrDefault(o => o.Type == SelectedObstacle.Type); obst.IsSelected = true; ObstacleAttenuation = SelectedObstacle.ObstacleAttenuation; LeaveOnlySelectedObstacleCommand = new LeaveOnlySelectedObstacleCommand(this); }
public EditOrDeleteObstacleViewModel() { LeaveOnlySelectedObstacleCommand = new LeaveOnlySelectedObstacleCommand(this); AddProfileCommand = new AddProfileCommand(this); RemoveProfileCommand = new RemoveProfileCommand(this); EditObstacleCommand = new EditObstacleCommand(this); RemoveObstacleCommand = new RemoveObstacleCommand(this); GetObstacles(); var obst = Obstacles.First(); obst.IsSelected = true; SelectedObstacle = obst; }