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(); } }