private void removeSelectedButton_Click(object sender, EventArgs e) { if (GeneralUtil.AskYesNo("Are you sure you want to remove this item?", "Removing recent item")) { recentItems.RemoveItemAt(listBox1.SelectedIndex); recentItems.Save(); RefreshRecentItems(); } }
private void deleteVDFToolStripMenuItem_Click(object sender, EventArgs e) { if (GeneralUtil.AskYesNo("Are you sure you want to delete the current VDF? This cannot be undone." + " The editor will close after this operation.", "Deleting VDF")) { File.Delete(savePath); recentItems.RemoveItem(savePath); recentItems.Save(); menuForm.Show(); Close(); } }