private void AddAuthor_Click(object sender, RoutedEventArgs e) { if (authorInputBox.Text.Equals("")) { Debug.WriteLine("Author name cannot be empty"); authorInputBox.Background = new SolidColorBrush(Color.FromArgb(180, 255, 0, 0)); } else if (authorController.isContaining(authorInputBox.Text)) { Debug.WriteLine("Author already exists"); authorInputBox.Background = new SolidColorBrush(Color.FromArgb(180, 255, 0, 0)); } else { authorController.addAuthor(authorInputBox.Text); authorInputBox.Text = ""; authorInputBox.Background = new SolidColorBrush(Color.FromArgb(255, 255, 255, 255)); updateAuthorCombobox(); } }