private void btnLoad_Click(object sender, EventArgs e) { if (lbPatches.SelectedItems.Count != 2) { MessageBox.Show("Please select exactly two patches"); return; } var selected = lbPatches.SelectedItems; patch1 = new TerrainPatch(); patch1.Load(Path.Combine(patch_dir, (selected[0] as string) + ".bin")); patch2 = new TerrainPatch(); patch2.Load(Path.Combine(patch_dir, (selected[1] as string) + ".bin")); }