From f48cdf01ef33fddb82585d3284180e41b52f1c33 Mon Sep 17 00:00:00 2001 From: factubsio <65080026+factubsio@users.noreply.github.com> Date: Fri, 22 Apr 2022 12:53:27 +0100 Subject: [PATCH] updates for 1.3.0i and fix alt-tab behaviour of ctrl-p panel --- BlueprintExplorer/BlueprintDB.cs | 2 +- BlueprintExplorer/CtrlP.cs | 13 +++++++++++++ BlueprintExplorer/Form1.Designer.cs | 3 +++ BlueprintExplorer/Form1.cs | 10 ++++++++++ 4 files changed, 27 insertions(+), 1 deletion(-) diff --git a/BlueprintExplorer/BlueprintDB.cs b/BlueprintExplorer/BlueprintDB.cs index 58e9d71..4557fb7 100644 --- a/BlueprintExplorer/BlueprintDB.cs +++ b/BlueprintExplorer/BlueprintDB.cs @@ -123,7 +123,7 @@ public int CompareTo(GameVersion other) public List Available = new() { }; - private readonly GameVersion LastKnown = new(1, 2, 0, 'A', 2); + private readonly GameVersion LastKnown = new(1, 3, 0, 'i', 0); private readonly string filenameRoot = "blueprints_raw"; private readonly string extension = "binz"; diff --git a/BlueprintExplorer/CtrlP.cs b/BlueprintExplorer/CtrlP.cs index a7a7030..7739286 100644 --- a/BlueprintExplorer/CtrlP.cs +++ b/BlueprintExplorer/CtrlP.cs @@ -103,9 +103,21 @@ public CtrlP() rootHost.HostedControls.Add("none", noResults); rootHost.ShowControl("none"); + this.ShowInTaskbar = false; + DoubleBuffered = true; } + protected override CreateParams CreateParams + { + get + { + var defaultParams = base.CreateParams; + defaultParams.ExStyle |= 0x80; + return defaultParams; + } + } + private void Root_MouseClick(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Middle || e.Button == MouseButtons.Left) @@ -235,6 +247,7 @@ protected override void OnDeactivate(EventArgs e) protected override void OnActivated(EventArgs e) { + Owner = Daddy; UpdateSize(); if (savedVerticalScroll != -1) { diff --git a/BlueprintExplorer/Form1.Designer.cs b/BlueprintExplorer/Form1.Designer.cs index 91b1f07..2e42fbf 100644 --- a/BlueprintExplorer/Form1.Designer.cs +++ b/BlueprintExplorer/Form1.Designer.cs @@ -87,6 +87,7 @@ private void InitializeComponent() this.helpButton.Name = "helpButton"; this.helpButton.Size = new System.Drawing.Size(94, 32); this.helpButton.TabIndex = 4; + this.helpButton.TabStop = false; this.helpButton.Text = "Help"; this.helpButton.UseVisualStyleBackColor = true; this.helpButton.Click += new System.EventHandler(this.helpButton_Click); @@ -98,6 +99,7 @@ private void InitializeComponent() this.settingsButton.Name = "settingsButton"; this.settingsButton.Size = new System.Drawing.Size(94, 32); this.settingsButton.TabIndex = 2; + this.settingsButton.TabStop = false; this.settingsButton.Text = "Settings"; this.settingsButton.UseVisualStyleBackColor = true; // @@ -127,6 +129,7 @@ private void InitializeComponent() this.notifications.Name = "notifications"; this.notifications.Size = new System.Drawing.Size(58, 32); this.notifications.TabIndex = 5; + this.notifications.TabStop = false; this.notifications.Text = "1"; this.notifications.UseVisualStyleBackColor = true; // diff --git a/BlueprintExplorer/Form1.cs b/BlueprintExplorer/Form1.cs index dee3e15..859f3fd 100644 --- a/BlueprintExplorer/Form1.cs +++ b/BlueprintExplorer/Form1.cs @@ -575,6 +575,8 @@ public void HandleGlobalKeys(object sender, KeyEventArgs e) if (e.KeyCode == Keys.Escape) { input.FindForm().ActiveControl = null; + e.SuppressKeyPress = true; + e.Handled = true; } return; } @@ -582,10 +584,18 @@ public void HandleGlobalKeys(object sender, KeyEventArgs e) if (ActiveViewer?.Searching == true) { if (e.KeyCode == Keys.Escape) + { ActiveViewer.StopSearching(false); + e.SuppressKeyPress = true; + e.Handled = true; + } if (e.KeyCode == Keys.Enter || e.KeyCode == Keys.Return) + { ActiveViewer.StopSearching(true); + e.SuppressKeyPress = true; + e.Handled = true; + } return; }