private void Machine_StatusUpdated(LaserMachine sender, LaserMachine.MachineState state, bool invalidateCanDo) { ViewService.InvokeAsync(() => { updateStatus(state); if (invalidateCanDo) { _resetCommand.NotifyCanExecuteChanged(); _homeCommand.NotifyCanExecuteChanged(); _unlockCommand.NotifyCanExecuteChanged(); _startCommand.NotifyCanExecuteChanged(); _pauseCommand.NotifyCanExecuteChanged(); _resumeCommand.NotifyCanExecuteChanged(); _stopCommand.NotifyCanExecuteChanged(); } }); }
private void Document_Modified(object sender, EventArgs e) { _generateCommand.NotifyCanExecuteChanged(); }