public string OnButtonPressed(ICommandBase onCommand) { this.onCommand = onCommand; onCommand.Execute(); undoCommand = onCommand; return(Convert.ToString(undoCommand)); }
private void ExecuteCommand(ICommandBase command) { try { command.Execute(); } catch (Exception ex) { // TODO: LOG EXCEPTION Console.WriteLine(ex.Message); MessageBox.Show($"Unhandled error while executing command '{command.Name}'.\r\n\r\n{ex.Message}", "WinCommand Palette", MessageBoxButton.OK, MessageBoxImage.Error); } }