コード例 #1
0
        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();
                }
            });
        }
コード例 #2
0
 private void Document_Modified(object sender, EventArgs e)
 {
     _generateCommand.NotifyCanExecuteChanged();
 }