From b360fc9f37b84b74e6aaad69c7069d412b8c05c2 Mon Sep 17 00:00:00 2001 From: Terry MacDonald Date: Fri, 23 Apr 2021 21:42:18 +1200 Subject: [PATCH] [WIP] Creating hotkey setting form This form will show when the user wants to set a hotkey for a display profile or for a shortcut. This will not be used for the setting the main window, or shortcut library hotkey...those will be set in the settings window. --- DisplayMagician/DisplayMagician.csproj | 9 ++ .../UIForms/HotkeyForm.Designer.cs | 67 ++++++++++ DisplayMagician/UIForms/HotkeyForm.cs | 20 +++ DisplayMagician/UIForms/HotkeyForm.resx | 120 ++++++++++++++++++ 4 files changed, 216 insertions(+) create mode 100644 DisplayMagician/UIForms/HotkeyForm.Designer.cs create mode 100644 DisplayMagician/UIForms/HotkeyForm.cs create mode 100644 DisplayMagician/UIForms/HotkeyForm.resx diff --git a/DisplayMagician/DisplayMagician.csproj b/DisplayMagician/DisplayMagician.csproj index 47580a6..68ba785 100644 --- a/DisplayMagician/DisplayMagician.csproj +++ b/DisplayMagician/DisplayMagician.csproj @@ -130,6 +130,12 @@ ApplyingProfileForm.cs + + Form + + + HotkeyForm.cs + Form @@ -192,6 +198,9 @@ ApplyingProfileForm.cs + + HotkeyForm.cs + MaskedForm.cs diff --git a/DisplayMagician/UIForms/HotkeyForm.Designer.cs b/DisplayMagician/UIForms/HotkeyForm.Designer.cs new file mode 100644 index 0000000..4dfe095 --- /dev/null +++ b/DisplayMagician/UIForms/HotkeyForm.Designer.cs @@ -0,0 +1,67 @@ + +namespace DisplayMagician.UIForms +{ + partial class HotkeyForm + { + /// + /// 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.lbl_hotkey = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // lbl_hotkey + // + this.lbl_hotkey.AutoSize = true; + this.lbl_hotkey.BackColor = System.Drawing.Color.Black; + this.lbl_hotkey.ForeColor = System.Drawing.Color.White; + this.lbl_hotkey.Location = new System.Drawing.Point(42, 32); + this.lbl_hotkey.Name = "lbl_hotkey"; + this.lbl_hotkey.Size = new System.Drawing.Size(525, 13); + this.lbl_hotkey.TabIndex = 0; + this.lbl_hotkey.Text = "You can set a Hotkey (a keyboard shortcut) so that you can apply this Display Pro" + + "file just using your keyboard."; + // + // HotkeyForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.Black; + this.ClientSize = new System.Drawing.Size(442, 221); + this.Controls.Add(this.lbl_hotkey); + this.Name = "HotkeyForm"; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.Text = "Select a Hotkey"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label lbl_hotkey; + } +} \ No newline at end of file diff --git a/DisplayMagician/UIForms/HotkeyForm.cs b/DisplayMagician/UIForms/HotkeyForm.cs new file mode 100644 index 0000000..05d4994 --- /dev/null +++ b/DisplayMagician/UIForms/HotkeyForm.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace DisplayMagician.UIForms +{ + public partial class HotkeyForm : Form + { + public HotkeyForm() + { + InitializeComponent(); + } + } +} diff --git a/DisplayMagician/UIForms/HotkeyForm.resx b/DisplayMagician/UIForms/HotkeyForm.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/DisplayMagician/UIForms/HotkeyForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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