public ControllerConfigurationViewModel() { ConfigList = new DirectoryInfo(Directory.GetCurrentDirectory()).GetFiles("*.ControllerConfig"); DetectControllerCommand = new RelayCommand( () => { MainViewModel.ScanForControllers(); }, () => { if (MainViewModel.Robot == null) { return(false); } if (MainViewModel.Robot.Com == null) { return(false); } return(true); } ); MainViewModel.Robot.PropertyChanged += Robot_PropertyChanged; }
public ControllerConfigurationViewModel() { DetectControllerCommand = new RelayCommand( () => { MainViewModel.ScanForControllers(); }, () => { if (MainViewModel.Robot == null) { return(false); } if (MainViewModel.Robot.Com == null) { return(false); } return(true); } ); MainViewModel.Robot.PropertyChanged += Robot_PropertyChanged; }