Add support for the steamcmd.net query to the right-click menu Open and Refresh Query functionalities
This commit is contained in:
parent
5e161e9e62
commit
4d066b703e
2 changed files with 10 additions and 3 deletions
|
@ -4,7 +4,7 @@
|
|||
<TargetFramework>net8.0-windows10.0.22621.0</TargetFramework>
|
||||
<UseWindowsForms>True</UseWindowsForms>
|
||||
<ApplicationIcon>Resources\program.ico</ApplicationIcon>
|
||||
<Version>5.0.0.0</Version>
|
||||
<Version>5.0.1.0</Version>
|
||||
<Copyright>2021, pointfeev (https://github.com/pointfeev)</Copyright>
|
||||
<Company>CreamInstaller</Company>
|
||||
<Product>Automatic DLC Unlocker Installer & Configuration Generator</Product>
|
||||
|
|
|
@ -801,11 +801,12 @@ internal sealed partial class SelectForm : CustomForm
|
|||
: new(node.Text, (id, dlc.Icon), (id, dlcParentSelection.Icon));
|
||||
_ = items.Add(header);
|
||||
string appInfoVDF = $@"{SteamCMD.AppInfoPath}\{id}.vdf";
|
||||
string appInfoCmdJSON = $@"{SteamCMD.AppInfoPath}\{id}.cmd.json";
|
||||
string appInfoJSON = $@"{SteamCMD.AppInfoPath}\{id}.json";
|
||||
string cooldown = $@"{ProgramData.CooldownPath}\{id}.txt";
|
||||
if (appInfoVDF.FileExists() || appInfoJSON.FileExists())
|
||||
if (appInfoVDF.FileExists() || appInfoCmdJSON.FileExists() || appInfoJSON.FileExists())
|
||||
{
|
||||
List<ContextMenuItem> queries = new();
|
||||
List<ContextMenuItem> queries = [];
|
||||
if (appInfoJSON.FileExists())
|
||||
{
|
||||
string platformString = selection is null || selection.Platform is Platform.Steam
|
||||
|
@ -817,9 +818,14 @@ internal sealed partial class SelectForm : CustomForm
|
|||
(_, _) => Diagnostics.OpenFileInNotepad(appInfoJSON)));
|
||||
}
|
||||
|
||||
if (appInfoCmdJSON.FileExists())
|
||||
queries.Add(new("Open SteamCMD.net Query", "Notepad",
|
||||
(_, _) => Diagnostics.OpenFileInNotepad(appInfoCmdJSON)));
|
||||
|
||||
if (appInfoVDF.FileExists())
|
||||
queries.Add(new("Open SteamCMD Query", "Notepad",
|
||||
(_, _) => Diagnostics.OpenFileInNotepad(appInfoVDF)));
|
||||
|
||||
if (queries.Count > 0)
|
||||
{
|
||||
_ = items.Add(new ToolStripSeparator());
|
||||
|
@ -828,6 +834,7 @@ internal sealed partial class SelectForm : CustomForm
|
|||
_ = items.Add(new ContextMenuItem("Refresh Queries", "Command Prompt", (_, _) =>
|
||||
{
|
||||
appInfoVDF.DeleteFile();
|
||||
appInfoCmdJSON.DeleteFile();
|
||||
appInfoJSON.DeleteFile();
|
||||
cooldown.DeleteFile();
|
||||
selection?.Remove();
|
||||
|
|
Loading…
Reference in a new issue