private void BoardsDeleteName_Click(object sender, RoutedEventArgs e) { this.menuItem = (MenuItem)e.OriginalSource; if (this.menuItem.Header != null) { string selectedBoard = this.menuItem.Header.ToString(); InfoObject info = SystemInterface.removeBoard(this.userName, selectedBoard); if (!info.getIsSucceeded()) { MessageBox.Show(info.getMessage()); } else { show((Board)this.boardsCollection[this.currBoard]); this.menuItem = null; } } }