- Fixed a harmless context menu index exception
This commit is contained in:
pointfeev 2022-03-11 20:41:44 -05:00
parent 62f9ba8ee9
commit 994d01a419
2 changed files with 5 additions and 4 deletions

View file

@ -5,7 +5,7 @@
<UseWindowsForms>True</UseWindowsForms>
<ApplicationIcon>Resources\ini.ico</ApplicationIcon>
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
<Version>3.2.3.0</Version>
<Version>3.2.3.1</Version>
<PackageIcon>Resources\ini.ico</PackageIcon>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<Copyright>2021, pointfeev (https://github.com/pointfeev)</Copyright>

View file

@ -612,10 +612,11 @@ internal partial class SelectForm : CustomForm
contextMenuStrip.Items.Add(new ToolStripSeparator());
contextMenuStrip.Items.Add(new ContextMenuItem("Open Root Directory", "File Explorer",
new EventHandler((sender, e) => Diagnostics.OpenDirectoryInFileExplorer(selection.RootDirectory))));
for (int i = 0; i < selection.DllDirectories.Count; i++)
List<string> directories = selection.DllDirectories.ToList();
for (int i = 0; i < directories.Count; i++)
{
string directory = selection.DllDirectories[i];
contextMenuStrip.Items.Add(new ContextMenuItem($"Open {(selection.IsSteam ? "Steamworks" : "Epic Online Services")} SDK Directory ({i + 1})", "File Explorer",
string directory = directories[i];
contextMenuStrip.Items.Add(new ContextMenuItem($"Open {(selection.IsSteam ? "Steamworks" : "Epic Online Services")} SDK Directory #{i + 1}", "File Explorer",
new EventHandler((sender, e) => Diagnostics.OpenDirectoryInFileExplorer(directory))));
}
}