From a1de3266ea80559f0a827b016a28c13c755bb63d Mon Sep 17 00:00:00 2001 From: pointfeev Date: Mon, 7 Mar 2022 17:39:03 -0500 Subject: [PATCH] final --- CreamInstaller/SelectForm.cs | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/CreamInstaller/SelectForm.cs b/CreamInstaller/SelectForm.cs index 1576751..6c02b66 100644 --- a/CreamInstaller/SelectForm.cs +++ b/CreamInstaller/SelectForm.cs @@ -214,8 +214,8 @@ internal partial class SelectForm : CustomForm selection.DllDirectories = dllDirectories; selection.IsSteam = true; selection.ProductUrl = "https://store.steampowered.com/app/" + appId; - selection.IconUrl = IconGrabber.SteamAppImagesPath + @$"\{appId}\{appInfo?.Value?.GetChild("common")?.GetChild("clienticon")?.ToString()}.ico"; - selection.SubIconUrl = appData.header_image ?? IconGrabber.SteamAppImagesPath + @$"\{appId}\{appInfo?.Value?.GetChild("common")?.GetChild("icon")?.ToString()}.jpg"; + selection.IconUrl = IconGrabber.SteamAppImagesPath + @$"\{appId}\{appInfo?.Value?.GetChild("common")?.GetChild("icon")?.ToString()}.jpg"; + selection.SubIconUrl = appData.header_image ?? IconGrabber.SteamAppImagesPath + @$"\{appId}\{appInfo?.Value?.GetChild("common")?.GetChild("clienticon")?.ToString()}.ico"; selection.Publisher = appData.publishers[0] ?? appInfo?.Value?.GetChild("extended")?.GetChild("publisher")?.ToString(); if (Program.Canceled) return; @@ -654,18 +654,16 @@ internal partial class SelectForm : CustomForm selectionTreeView.NodeMouseClick += (sender, e) => { int cmi = ++contextMenuIndex; - TreeNode node = null; + TreeNode node = e.Node; + if (node is null || e.Button != MouseButtons.Right) + return; try { - node = e.Node; - if (node is null || !node.Bounds.Contains(e.Location) || e.Button != MouseButtons.Right) + if (!node.Bounds.Contains(e.Location)) return; - selectionTreeView.SelectedNode = node; - } - catch - { - return; } + catch { } + selectionTreeView.SelectedNode = node; string id = node.Name; ProgramSelection selection = ProgramSelection.FromId(id); (string gameAppId, (DlcType type, string name, string icon) app)? dlc = null;