- Program will once again no longer use invalid DLCs (Unnamed DLCs)
- Added a "Refresh AppInfo" option to the right-click context menu
This commit is contained in:
pointfeev 2022-02-20 21:28:18 -05:00
parent 3cd8c45959
commit cbf614c04d
3 changed files with 16 additions and 3 deletions

View file

@ -5,7 +5,7 @@
<UseWindowsForms>True</UseWindowsForms>
<ApplicationIcon>Resources\ini.ico</ApplicationIcon>
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
<Version>2.4.1.3</Version>
<Version>2.4.2.0</Version>
<PackageIcon>Resources\ini.ico</PackageIcon>
<PackageIconUrl />
<Description>Automatically generates and installs CreamAPI files for Steam games on the user's computer. It can also generate and install CreamAPI for the Paradox Launcher should the user select a Paradox Interactive game.</Description>

View file

@ -243,7 +243,7 @@ internal partial class SelectForm : CustomForm
dlcIconStaticId ??= dlcAppInfo.Value?.GetChild("common")?.GetChild("logo")?.ToString();
}
if (Program.Canceled) return;
if (string.IsNullOrWhiteSpace(dlcName)) dlcName = "Unnamed DLC";
if (!string.IsNullOrWhiteSpace(dlcName))
dlc[id] = (dlcName, dlcIconStaticId);
RemoveFromRemainingDLCs(id.ToString());
progress.Report(++CompleteTasks);
@ -488,6 +488,7 @@ internal partial class SelectForm : CustomForm
}
}
images["Notepad"] = Program.GetNotepadImage();
images["Command Prompt"] = Program.GetCommandPromptImage();
images["File Explorer"] = Program.GetFileExplorerImage();
images["SteamDB"] = await Program.GetImageFromUrl("https://steamdb.info/favicon.ico");
images["Steam Store"] = await Program.GetImageFromUrl("https://store.steampowered.com/favicon.ico");
@ -535,6 +536,16 @@ internal partial class SelectForm : CustomForm
nodeContextMenu.Items.Add(new ToolStripSeparator());
nodeContextMenu.Items.Add(new ToolStripMenuItem("Open AppInfo", Image("Notepad"),
new EventHandler((sender, e) => Program.OpenFileInNotepad(appInfo))));
nodeContextMenu.Items.Add(new ToolStripMenuItem("Refresh AppInfo", Image("Command Prompt"),
new EventHandler((sender, e) =>
{
try
{
File.Delete(appInfo);
}
catch { }
OnLoad();
})));
}
if (selection is not null)
{

View file

@ -124,6 +124,8 @@ internal static class Program
internal static Image GetNotepadImage() => GetFileIconImage(Environment.GetFolderPath(Environment.SpecialFolder.Windows) + @"\notepad.exe");
internal static Image GetCommandPromptImage() => GetFileIconImage(Environment.SystemDirectory + @"\cmd.exe");
internal static Image GetFileExplorerImage() => GetFileIconImage(Environment.GetFolderPath(Environment.SpecialFolder.Windows) + @"\explorer.exe");
internal static bool IsProgramRunningDialog(Form form, ProgramSelection selection)