private void OnEraseHistory(object sender, EventArgs e) { string message = "Do you want to clear the history?"; string title = "History Clear"; if (String.IsNullOrEmpty(_history)) { _messageBoxDisplayService.Show("The history is already empty!"); } else { bool clearHistory = _messageBoxDisplayService.PromptUser(message, title); if (clearHistory) { _history = ""; _calculatorView.SetHistoryBoxText(_history); } } }