From 58f810a0e1d8adf1aa6e3209d54dc1acb452498e Mon Sep 17 00:00:00 2001 From: James Groom Date: Thu, 4 Apr 2024 23:56:43 +0000 Subject: [PATCH] Merge `ScreenshotForm` into one file and fix doc comment --- .../BizHawk.Client.EmuHawk.csproj | 2 - .../tools/TAStudio/ScreenshotForm.Designer.cs | 51 -------- .../tools/TAStudio/ScreenshotForm.cs | 27 +++- .../tools/TAStudio/ScreenshotForm.resx | 120 ------------------ 4 files changed, 20 insertions(+), 180 deletions(-) delete mode 100644 src/BizHawk.Client.EmuHawk/tools/TAStudio/ScreenshotForm.Designer.cs delete mode 100644 src/BizHawk.Client.EmuHawk/tools/TAStudio/ScreenshotForm.resx diff --git a/src/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj b/src/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj index 664aa002e6..3adc3bb6c1 100755 --- a/src/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj +++ b/src/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj @@ -457,8 +457,6 @@ - - diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/ScreenshotForm.Designer.cs b/src/BizHawk.Client.EmuHawk/tools/TAStudio/ScreenshotForm.Designer.cs deleted file mode 100644 index 7529026437..0000000000 --- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/ScreenshotForm.Designer.cs +++ /dev/null @@ -1,51 +0,0 @@ -namespace BizHawk.Client.EmuHawk -{ - partial class ScreenshotForm - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.SuspendLayout(); - // - // ScreenshotForm - // - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; - this.ClientSize = new System.Drawing.Size(314, 234); - this.ControlBox = false; - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "ScreenshotForm"; - this.ShowIcon = false; - this.ShowInTaskbar = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; - this.ResumeLayout(false); - - } - - #endregion - } -} \ No newline at end of file diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/ScreenshotForm.cs b/src/BizHawk.Client.EmuHawk/tools/TAStudio/ScreenshotForm.cs index fe7821fba6..e89ecd8dc7 100644 --- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/ScreenshotForm.cs +++ b/src/BizHawk.Client.EmuHawk/tools/TAStudio/ScreenshotForm.cs @@ -4,13 +4,15 @@ using System.Windows.Forms; using BizHawk.Bizware.BizwareGL; -// We pretend it's a tooltip kind of thing, so show only the actual contents -// and avoid stealing focus, while still being topmost -// http://stackoverflow.com/a/25219399/2792852 -// This is not an actual tooltip, because they can't reliably fade in and out with transparency namespace BizHawk.Client.EmuHawk { - public partial class ScreenshotForm : Form + /// + /// This is not an actual tooltip, because they can't reliably fade in and out with transparency.
+ /// We pretend it's a tooltip kind of thing, + /// so show only the actual contents and avoid stealing focus, while still being topmost: + /// + ///
+ public class ScreenshotForm : Form { private const int WS_EX_TOPMOST = 0x00000008; @@ -30,8 +32,19 @@ namespace BizHawk.Client.EmuHawk public ScreenshotForm() { - InitializeComponent(); - + SuspendLayout(); + AutoScaleMode = AutoScaleMode.None; + ClientSize = new(314, 234); + ControlBox = false; + FormBorderStyle = FormBorderStyle.None; + MaximizeBox = false; + MinimizeBox = false; + Name = nameof(ScreenshotForm); + ShowIcon = false; + ShowInTaskbar = false; + StartPosition = FormStartPosition.Manual; + ResumeLayout(performLayout: false); + var fontSize = 10; var fontStyle = FontStyle.Regular; Font = new Font(FontFamily.GenericMonospace, fontSize, fontStyle); diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/ScreenshotForm.resx b/src/BizHawk.Client.EmuHawk/tools/TAStudio/ScreenshotForm.resx deleted file mode 100644 index 1af7de150c..0000000000 --- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/ScreenshotForm.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file