private void ContextMenuStripListViewOnItemClicked(object sender, ToolStripItemClickedEventArgs e) { _slot.contextMenuStripListView.Hide(); if (e.ClickedItem == _slot.toolStripMenuItemRestore) { ButtonRestoreOnClick(sender, null); } if (e.ClickedItem == _slot.toolStripMenuItemDelete) { ButtonDeleteOnClick(sender, null); } if (e.ClickedItem == _slot.toolStripMenuItemEdit) { var gameDetails = GetSelectedGameDetails(); if (gameDetails != null) { var formNotes = new FormNotes { textBoxNotes = { Text = gameDetails.Notes } }; if (formNotes.ShowDialog(_slot) == DialogResult.OK) { gameDetails.Notes = formNotes.textBoxNotes.Text; var mapData = GetSelectedMap(); if (mapData != null) { RefreshListView(mapData); } } } } }
private void ListViewSavedGamesOnDoubleClick(object sender, EventArgs e) { var gameDetails = GetSelectedGameDetails(); if (gameDetails != null) { var formNotes = new FormNotes { textBoxNotes = { Text = gameDetails.Notes } }; if (formNotes.ShowDialog(_slot) == DialogResult.OK) { gameDetails.Notes = formNotes.textBoxNotes.Text; var mapData = GetSelectedMap(); if (mapData != null) { RefreshListView(mapData); } } } }