private void btnDeletePatch_Click(object sender, EventArgs e)
{
GoogleAnalyticsApi.TrackEvent("PatchEditor.cs", "btnDeletePatch_Click", "");
DialogResult dialogResult = MessageBox.Show("Are you sure you want to remove the patch named \"" + listPatches.SelectedItems[0].ToString() + "\"", "Delete Patch?", MessageBoxButtons.YesNo);
if (dialogResult == DialogResult.Yes)
{
int index = listPatches.SelectedIndex;
patches.PatchList.RemoveAt(index);
listPatches.SelectedIndex = index - 1;
WritePatchesToDisk();
}
}