From 40ba6ab44899e1f12be1b88b95410a986d1f265c Mon Sep 17 00:00:00 2001 From: pointfeev Date: Tue, 18 Jan 2022 22:51:38 -0500 Subject: [PATCH] v2.2.0.0 - Improved the aesthetics of the "Block Protected Games" help button - Changed button, checkbox, and text FlatStyles to System for the better response effects - Improved the node right click appId gathering - Fixed a bug where right clicking to the right of a node's text would open the link twice - Added gray text to the right of games and their DLC that displays their steam AppID --- CreamInstaller/CreamInstaller.csproj | 2 +- .../Forms/Components/CustomTreeView.cs | 49 +++---- CreamInstaller/Forms/DialogForm.Designer.cs | 17 ++- CreamInstaller/Forms/InstallForm.Designer.cs | 5 + CreamInstaller/Forms/MainForm.Designer.cs | 3 + CreamInstaller/Forms/SelectForm.Designer.cs | 133 +++++++++--------- CreamInstaller/Forms/SelectForm.cs | 9 +- 7 files changed, 112 insertions(+), 106 deletions(-) diff --git a/CreamInstaller/CreamInstaller.csproj b/CreamInstaller/CreamInstaller.csproj index 6c27f1b..694fc38 100644 --- a/CreamInstaller/CreamInstaller.csproj +++ b/CreamInstaller/CreamInstaller.csproj @@ -5,7 +5,7 @@ true Resources\ini.ico true - 2.1.1.0 + 2.2.0.0 Resources\ini.ico 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. diff --git a/CreamInstaller/Forms/Components/CustomTreeView.cs b/CreamInstaller/Forms/Components/CustomTreeView.cs index 802661f..803b895 100644 --- a/CreamInstaller/Forms/Components/CustomTreeView.cs +++ b/CreamInstaller/Forms/Components/CustomTreeView.cs @@ -1,7 +1,6 @@ using System; using System.Drawing; using System.Windows.Forms; -using System.Windows.Forms.VisualStyles; namespace CreamInstaller { @@ -21,46 +20,38 @@ namespace CreamInstaller public CustomTreeView() : base() { - //DrawMode = TreeViewDrawMode.OwnerDrawAll; - //DrawNode += new DrawTreeNodeEventHandler(DrawTreeNode); - - closedGlyphRenderer = new(VisualStyleElement.TreeView.Glyph.Closed); - openedGlyphRenderer = new(VisualStyleElement.TreeView.Glyph.Opened); + DrawMode = TreeViewDrawMode.OwnerDrawAll; + DrawNode += new DrawTreeNodeEventHandler(DrawTreeNode); } - private readonly VisualStyleRenderer closedGlyphRenderer; - private readonly VisualStyleRenderer openedGlyphRenderer; - private void DrawTreeNode(object sender, DrawTreeNodeEventArgs e) { - if (!e.Node.IsVisible) + e.DrawDefault = true; + TreeNode node = e.Node; + if (!node.IsVisible) { return; } - e.Graphics.FillRectangle(new SolidBrush(BackColor), e.Bounds); + Graphics graphics = e.Graphics; + Color backColor = BackColor; + SolidBrush brush = new(backColor); + Font font = Font; + Font subFont = new(font.FontFamily, font.SizeInPoints, FontStyle.Regular, font.Unit, font.GdiCharSet, font.GdiVerticalFont); - int startX = e.Bounds.X + (e.Node.Parent is null ? 22 : 41); - int startY = e.Bounds.Y; - - if (e.Node.Parent is null && e.Node.Nodes.Count > 0) + string subText = node.Name; + if (subText is null || subText == "0") { - if (e.Node.IsExpanded) - { - openedGlyphRenderer.DrawBackground(e.Graphics, new(e.Bounds.X + startX / 2 - 8, startY, 16, 16)); - } - else - { - closedGlyphRenderer.DrawBackground(e.Graphics, new(e.Bounds.X + startX / 2 - 8, startY, 16, 16)); - } + return; } - CheckBoxState checkBoxState = e.Node.TreeView.Enabled - ? (e.Node.Checked ? CheckBoxState.CheckedNormal : CheckBoxState.UncheckedNormal) - : (e.Node.Checked ? CheckBoxState.CheckedDisabled : CheckBoxState.UncheckedDisabled); - CheckBoxRenderer.DrawCheckBox(e.Graphics, new(startX, startY + 1), checkBoxState); - - TextRenderer.DrawText(e.Graphics, e.Node.Text, e.Node.NodeFont, e.Node.Bounds.Location, Color.Black); + Size subSize = TextRenderer.MeasureText(graphics, subText, subFont); + Rectangle bounds = node.Bounds; + Rectangle subBounds = new(bounds.X + bounds.Width, bounds.Y, subSize.Width, bounds.Height); + graphics.FillRectangle(brush, subBounds); + Point location = subBounds.Location; + Point subLocation = new(location.X - 1, location.Y + 1); + TextRenderer.DrawText(graphics, subText, subFont, subLocation, Color.Gray); } } } \ No newline at end of file diff --git a/CreamInstaller/Forms/DialogForm.Designer.cs b/CreamInstaller/Forms/DialogForm.Designer.cs index 0e9f85b..c059ed8 100644 --- a/CreamInstaller/Forms/DialogForm.Designer.cs +++ b/CreamInstaller/Forms/DialogForm.Designer.cs @@ -46,10 +46,11 @@ namespace CreamInstaller this.cancelButton.AutoSize = true; this.cancelButton.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.cancelButton.Location = new System.Drawing.Point(40, 9); + this.cancelButton.FlatStyle = System.Windows.Forms.FlatStyle.System; + this.cancelButton.Location = new System.Drawing.Point(32, 9); this.cancelButton.Name = "cancelButton"; this.cancelButton.Padding = new System.Windows.Forms.Padding(12, 0, 12, 0); - this.cancelButton.Size = new System.Drawing.Size(111, 25); + this.cancelButton.Size = new System.Drawing.Size(115, 24); this.cancelButton.TabIndex = 1; this.cancelButton.Text = "cancelButton"; this.cancelButton.UseVisualStyleBackColor = true; @@ -60,10 +61,11 @@ namespace CreamInstaller this.acceptButton.AutoSize = true; this.acceptButton.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.acceptButton.DialogResult = System.Windows.Forms.DialogResult.OK; - this.acceptButton.Location = new System.Drawing.Point(157, 9); + this.acceptButton.FlatStyle = System.Windows.Forms.FlatStyle.System; + this.acceptButton.Location = new System.Drawing.Point(153, 9); this.acceptButton.Name = "acceptButton"; this.acceptButton.Padding = new System.Windows.Forms.Padding(12, 0, 12, 0); - this.acceptButton.Size = new System.Drawing.Size(112, 25); + this.acceptButton.Size = new System.Drawing.Size(116, 24); this.acceptButton.TabIndex = 0; this.acceptButton.Text = "acceptButton"; this.acceptButton.UseVisualStyleBackColor = true; @@ -71,6 +73,7 @@ namespace CreamInstaller // descriptionLabel // this.descriptionLabel.AutoSize = true; + this.descriptionLabel.FlatStyle = System.Windows.Forms.FlatStyle.System; this.descriptionLabel.Location = new System.Drawing.Point(69, 12); this.descriptionLabel.Name = "descriptionLabel"; this.descriptionLabel.Size = new System.Drawing.Size(94, 15); @@ -97,7 +100,7 @@ namespace CreamInstaller this.descriptionPanel.Margin = new System.Windows.Forms.Padding(0); this.descriptionPanel.Name = "descriptionPanel"; this.descriptionPanel.Padding = new System.Windows.Forms.Padding(12, 12, 12, 6); - this.descriptionPanel.Size = new System.Drawing.Size(284, 72); + this.descriptionPanel.Size = new System.Drawing.Size(284, 73); this.descriptionPanel.TabIndex = 5; // // buttonPanel @@ -108,10 +111,10 @@ namespace CreamInstaller this.buttonPanel.Controls.Add(this.cancelButton); this.buttonPanel.Dock = System.Windows.Forms.DockStyle.Bottom; this.buttonPanel.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft; - this.buttonPanel.Location = new System.Drawing.Point(0, 72); + this.buttonPanel.Location = new System.Drawing.Point(0, 73); this.buttonPanel.Name = "buttonPanel"; this.buttonPanel.Padding = new System.Windows.Forms.Padding(12, 6, 0, 12); - this.buttonPanel.Size = new System.Drawing.Size(284, 49); + this.buttonPanel.Size = new System.Drawing.Size(284, 48); this.buttonPanel.TabIndex = 6; // // DialogForm diff --git a/CreamInstaller/Forms/InstallForm.Designer.cs b/CreamInstaller/Forms/InstallForm.Designer.cs index 80db4ac..1385b56 100644 --- a/CreamInstaller/Forms/InstallForm.Designer.cs +++ b/CreamInstaller/Forms/InstallForm.Designer.cs @@ -51,6 +51,7 @@ namespace CreamInstaller // this.userInfoLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); + this.userInfoLabel.FlatStyle = System.Windows.Forms.FlatStyle.System; this.userInfoLabel.Location = new System.Drawing.Point(12, 9); this.userInfoLabel.Name = "userInfoLabel"; this.userInfoLabel.Size = new System.Drawing.Size(760, 15); @@ -61,6 +62,7 @@ namespace CreamInstaller // this.acceptButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.acceptButton.Enabled = false; + this.acceptButton.FlatStyle = System.Windows.Forms.FlatStyle.System; this.acceptButton.Location = new System.Drawing.Point(697, 526); this.acceptButton.Name = "acceptButton"; this.acceptButton.Size = new System.Drawing.Size(75, 23); @@ -73,6 +75,7 @@ namespace CreamInstaller // this.retryButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.retryButton.Enabled = false; + this.retryButton.FlatStyle = System.Windows.Forms.FlatStyle.System; this.retryButton.Location = new System.Drawing.Point(616, 526); this.retryButton.Name = "retryButton"; this.retryButton.Size = new System.Drawing.Size(75, 23); @@ -84,6 +87,7 @@ namespace CreamInstaller // cancelButton // this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.cancelButton.FlatStyle = System.Windows.Forms.FlatStyle.System; this.cancelButton.Location = new System.Drawing.Point(12, 526); this.cancelButton.Name = "cancelButton"; this.cancelButton.Size = new System.Drawing.Size(75, 23); @@ -110,6 +114,7 @@ namespace CreamInstaller // reselectButton // this.reselectButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.reselectButton.FlatStyle = System.Windows.Forms.FlatStyle.System; this.reselectButton.Location = new System.Drawing.Point(410, 526); this.reselectButton.Name = "reselectButton"; this.reselectButton.Size = new System.Drawing.Size(200, 23); diff --git a/CreamInstaller/Forms/MainForm.Designer.cs b/CreamInstaller/Forms/MainForm.Designer.cs index 1bc759d..a5cfd18 100644 --- a/CreamInstaller/Forms/MainForm.Designer.cs +++ b/CreamInstaller/Forms/MainForm.Designer.cs @@ -41,6 +41,7 @@ namespace CreamInstaller // // label1 // + this.label1.FlatStyle = System.Windows.Forms.FlatStyle.System; this.label1.Location = new System.Drawing.Point(12, 16); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(218, 15); @@ -51,6 +52,7 @@ namespace CreamInstaller // this.updateButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.updateButton.Enabled = false; + this.updateButton.FlatStyle = System.Windows.Forms.FlatStyle.System; this.updateButton.Location = new System.Drawing.Point(317, 12); this.updateButton.Name = "updateButton"; this.updateButton.Size = new System.Drawing.Size(75, 23); @@ -62,6 +64,7 @@ namespace CreamInstaller // this.ignoreButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.ignoreButton.Enabled = false; + this.ignoreButton.FlatStyle = System.Windows.Forms.FlatStyle.System; this.ignoreButton.Location = new System.Drawing.Point(236, 12); this.ignoreButton.Name = "ignoreButton"; this.ignoreButton.Size = new System.Drawing.Size(75, 23); diff --git a/CreamInstaller/Forms/SelectForm.Designer.cs b/CreamInstaller/Forms/SelectForm.Designer.cs index a3f30e9..635b238 100644 --- a/CreamInstaller/Forms/SelectForm.Designer.cs +++ b/CreamInstaller/Forms/SelectForm.Designer.cs @@ -36,15 +36,15 @@ namespace CreamInstaller this.label1 = new System.Windows.Forms.Label(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.noneFoundLabel = new System.Windows.Forms.Label(); - this.selectionTreeView = new CreamInstaller.CustomTreeView(); - this.blockProtectedHelpButton = new System.Windows.Forms.Button(); + this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); this.blockedGamesCheckBox = new System.Windows.Forms.CheckBox(); + this.blockProtectedHelpButton = new System.Windows.Forms.Button(); + this.selectionTreeView = new CreamInstaller.CustomTreeView(); + this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel(); this.allCheckBox = new System.Windows.Forms.CheckBox(); this.progressBar1 = new System.Windows.Forms.ProgressBar(); this.label2 = new System.Windows.Forms.Label(); this.scanButton = new System.Windows.Forms.Button(); - this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); - this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel(); this.uninstallButton = new System.Windows.Forms.Button(); this.groupBox1.SuspendLayout(); this.flowLayoutPanel1.SuspendLayout(); @@ -55,6 +55,7 @@ namespace CreamInstaller // this.installButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.installButton.Enabled = false; + this.installButton.FlatStyle = System.Windows.Forms.FlatStyle.System; this.installButton.Location = new System.Drawing.Point(422, 326); this.installButton.Name = "installButton"; this.installButton.Size = new System.Drawing.Size(150, 23); @@ -66,6 +67,7 @@ namespace CreamInstaller // cancelButton // this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.cancelButton.FlatStyle = System.Windows.Forms.FlatStyle.System; this.cancelButton.Location = new System.Drawing.Point(12, 326); this.cancelButton.Name = "cancelButton"; this.cancelButton.Size = new System.Drawing.Size(75, 23); @@ -87,7 +89,10 @@ namespace CreamInstaller | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.groupBox1.Controls.Add(this.noneFoundLabel); + this.groupBox1.Controls.Add(this.flowLayoutPanel1); this.groupBox1.Controls.Add(this.selectionTreeView); + this.groupBox1.Controls.Add(this.flowLayoutPanel2); + this.groupBox1.FlatStyle = System.Windows.Forms.FlatStyle.System; this.groupBox1.Location = new System.Drawing.Point(12, 12); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(560, 308); @@ -108,6 +113,49 @@ namespace CreamInstaller this.noneFoundLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.noneFoundLabel.Visible = false; // + // flowLayoutPanel1 + // + this.flowLayoutPanel1.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.flowLayoutPanel1.AutoSize = true; + this.flowLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.flowLayoutPanel1.Controls.Add(this.blockedGamesCheckBox); + this.flowLayoutPanel1.Controls.Add(this.blockProtectedHelpButton); + this.flowLayoutPanel1.Location = new System.Drawing.Point(224, -1); + this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(0); + this.flowLayoutPanel1.Name = "flowLayoutPanel1"; + this.flowLayoutPanel1.Size = new System.Drawing.Size(165, 19); + this.flowLayoutPanel1.TabIndex = 1005; + // + // blockedGamesCheckBox + // + this.blockedGamesCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.blockedGamesCheckBox.Checked = true; + this.blockedGamesCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; + this.blockedGamesCheckBox.Enabled = false; + this.blockedGamesCheckBox.FlatStyle = System.Windows.Forms.FlatStyle.System; + this.blockedGamesCheckBox.Location = new System.Drawing.Point(3, 0); + this.blockedGamesCheckBox.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); + this.blockedGamesCheckBox.Name = "blockedGamesCheckBox"; + this.blockedGamesCheckBox.Size = new System.Drawing.Size(140, 19); + this.blockedGamesCheckBox.TabIndex = 1003; + this.blockedGamesCheckBox.Text = "Block Protected Games"; + this.blockedGamesCheckBox.UseVisualStyleBackColor = true; + this.blockedGamesCheckBox.CheckedChanged += new System.EventHandler(this.OnBlockProtectedGamesCheckBoxChanged); + // + // blockProtectedHelpButton + // + this.blockProtectedHelpButton.Enabled = false; + this.blockProtectedHelpButton.FlatStyle = System.Windows.Forms.FlatStyle.System; + this.blockProtectedHelpButton.Font = new System.Drawing.Font("Segoe UI", 7F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.blockProtectedHelpButton.Location = new System.Drawing.Point(143, 0); + this.blockProtectedHelpButton.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0); + this.blockProtectedHelpButton.Name = "blockProtectedHelpButton"; + this.blockProtectedHelpButton.Size = new System.Drawing.Size(19, 19); + this.blockProtectedHelpButton.TabIndex = 1004; + this.blockProtectedHelpButton.Text = "?"; + this.blockProtectedHelpButton.UseVisualStyleBackColor = true; + this.blockProtectedHelpButton.Click += new System.EventHandler(this.OnBlockProtectedGamesHelpButtonClicked); + // // selectionTreeView // this.selectionTreeView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -124,47 +172,29 @@ namespace CreamInstaller this.selectionTreeView.Size = new System.Drawing.Size(548, 280); this.selectionTreeView.TabIndex = 1001; // - // blockProtectedHelpButton + // flowLayoutPanel2 // - this.blockProtectedHelpButton.Enabled = false; - this.blockProtectedHelpButton.Font = new System.Drawing.Font("Segoe UI", 7F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.blockProtectedHelpButton.Location = new System.Drawing.Point(151, 3); - this.blockProtectedHelpButton.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); - this.blockProtectedHelpButton.Name = "blockProtectedHelpButton"; - this.blockProtectedHelpButton.Size = new System.Drawing.Size(19, 19); - this.blockProtectedHelpButton.TabIndex = 1004; - this.blockProtectedHelpButton.Text = "?"; - this.blockProtectedHelpButton.UseVisualStyleBackColor = true; - this.blockProtectedHelpButton.Click += new System.EventHandler(this.OnBlockProtectedGamesHelpButtonClicked); - // - // blockedGamesCheckBox - // - this.blockedGamesCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.blockedGamesCheckBox.AutoSize = true; - this.blockedGamesCheckBox.Checked = true; - this.blockedGamesCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.blockedGamesCheckBox.Enabled = false; - this.blockedGamesCheckBox.Location = new System.Drawing.Point(3, 3); - this.blockedGamesCheckBox.Margin = new System.Windows.Forms.Padding(3, 3, 0, 3); - this.blockedGamesCheckBox.Name = "blockedGamesCheckBox"; - this.blockedGamesCheckBox.Size = new System.Drawing.Size(148, 19); - this.blockedGamesCheckBox.TabIndex = 1003; - this.blockedGamesCheckBox.Text = "Block Protected Games"; - this.blockedGamesCheckBox.UseVisualStyleBackColor = true; - this.blockedGamesCheckBox.CheckedChanged += new System.EventHandler(this.OnBlockProtectedGamesCheckBoxChanged); + this.flowLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.flowLayoutPanel2.AutoSize = true; + this.flowLayoutPanel2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.flowLayoutPanel2.Controls.Add(this.allCheckBox); + this.flowLayoutPanel2.Location = new System.Drawing.Point(517, -1); + this.flowLayoutPanel2.Margin = new System.Windows.Forms.Padding(0); + this.flowLayoutPanel2.Name = "flowLayoutPanel2"; + this.flowLayoutPanel2.Size = new System.Drawing.Size(37, 19); + this.flowLayoutPanel2.TabIndex = 1006; // // allCheckBox // this.allCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.allCheckBox.AutoSize = true; this.allCheckBox.Enabled = false; - this.allCheckBox.Location = new System.Drawing.Point(3, 3); - this.allCheckBox.Margin = new System.Windows.Forms.Padding(3, 3, 0, 3); + this.allCheckBox.FlatStyle = System.Windows.Forms.FlatStyle.System; + this.allCheckBox.Location = new System.Drawing.Point(3, 0); + this.allCheckBox.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); this.allCheckBox.Name = "allCheckBox"; - this.allCheckBox.Size = new System.Drawing.Size(40, 19); + this.allCheckBox.Size = new System.Drawing.Size(34, 19); this.allCheckBox.TabIndex = 1; this.allCheckBox.Text = "All"; - this.allCheckBox.UseVisualStyleBackColor = true; this.allCheckBox.CheckedChanged += new System.EventHandler(this.OnAllCheckBoxChanged); // // progressBar1 @@ -190,6 +220,7 @@ namespace CreamInstaller // this.scanButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.scanButton.Enabled = false; + this.scanButton.FlatStyle = System.Windows.Forms.FlatStyle.System; this.scanButton.Location = new System.Drawing.Point(140, 326); this.scanButton.Name = "scanButton"; this.scanButton.Size = new System.Drawing.Size(180, 23); @@ -198,33 +229,11 @@ namespace CreamInstaller this.scanButton.UseVisualStyleBackColor = true; this.scanButton.Click += new System.EventHandler(this.OnScan); // - // flowLayoutPanel1 - // - this.flowLayoutPanel1.Anchor = System.Windows.Forms.AnchorStyles.Top; - this.flowLayoutPanel1.AutoSize = true; - this.flowLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.flowLayoutPanel1.Controls.Add(this.blockedGamesCheckBox); - this.flowLayoutPanel1.Controls.Add(this.blockProtectedHelpButton); - this.flowLayoutPanel1.Location = new System.Drawing.Point(230, 9); - this.flowLayoutPanel1.Name = "flowLayoutPanel1"; - this.flowLayoutPanel1.Size = new System.Drawing.Size(173, 25); - this.flowLayoutPanel1.TabIndex = 1005; - // - // flowLayoutPanel2 - // - this.flowLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.flowLayoutPanel2.AutoSize = true; - this.flowLayoutPanel2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.flowLayoutPanel2.Controls.Add(this.allCheckBox); - this.flowLayoutPanel2.Location = new System.Drawing.Point(520, 9); - this.flowLayoutPanel2.Name = "flowLayoutPanel2"; - this.flowLayoutPanel2.Size = new System.Drawing.Size(43, 25); - this.flowLayoutPanel2.TabIndex = 1006; - // // uninstallButton // this.uninstallButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.uninstallButton.Enabled = false; + this.uninstallButton.FlatStyle = System.Windows.Forms.FlatStyle.System; this.uninstallButton.Location = new System.Drawing.Point(326, 326); this.uninstallButton.Name = "uninstallButton"; this.uninstallButton.Size = new System.Drawing.Size(90, 23); @@ -239,9 +248,7 @@ namespace CreamInstaller this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(584, 361); this.Controls.Add(this.uninstallButton); - this.Controls.Add(this.flowLayoutPanel1); this.Controls.Add(this.scanButton); - this.Controls.Add(this.flowLayoutPanel2); this.Controls.Add(this.groupBox1); this.Controls.Add(this.progressBar1); this.Controls.Add(this.label1); @@ -259,12 +266,10 @@ namespace CreamInstaller this.TopMost = true; this.Load += new System.EventHandler(this.OnLoad); this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); this.flowLayoutPanel1.ResumeLayout(false); - this.flowLayoutPanel1.PerformLayout(); this.flowLayoutPanel2.ResumeLayout(false); - this.flowLayoutPanel2.PerformLayout(); this.ResumeLayout(false); - this.PerformLayout(); } diff --git a/CreamInstaller/Forms/SelectForm.cs b/CreamInstaller/Forms/SelectForm.cs index b2cf21e..7713ba5 100644 --- a/CreamInstaller/Forms/SelectForm.cs +++ b/CreamInstaller/Forms/SelectForm.cs @@ -596,12 +596,11 @@ namespace CreamInstaller selectionTreeView.AfterCheck += OnTreeViewNodeCheckedChanged; selectionTreeView.NodeMouseClick += (sender, e) => { - if (e.Button == MouseButtons.Right) + TreeNode node = e.Node; + string appId = node.Name; + if (e.Button == MouseButtons.Right && node.Bounds.Contains(e.Location)) { - ProgramSelection selection = ProgramSelection.FromAppId(int.Parse(e.Node.Name)); - KeyValuePair? dlc = ProgramSelection.GetDlcFromAppId(int.Parse(e.Node.Name)); - int appId = selection?.SteamAppId ?? dlc?.Key ?? 0; - if (appId > 0) + if (appId != "0") { Process.Start(new ProcessStartInfo {