From 362adbbf41562eb7683045f4479f2eb71bbca773 Mon Sep 17 00:00:00 2001 From: Terry MacDonald Date: Wed, 9 Dec 2020 22:30:58 +1300 Subject: [PATCH] Added helper messages for new installs Helper messages added to the MainForm and to the Shortcut library to try and help people understand what order to do things in so that the software works as intended. --- DisplayMagician/UIForms/MainForm.Designer.cs | 23 +++++ DisplayMagician/UIForms/MainForm.cs | 8 +- DisplayMagician/UIForms/MainForm.resx | 97 ++++++++++++++++--- .../UIForms/ShortcutLibraryForm.Designer.cs | 19 ++++ .../UIForms/ShortcutLibraryForm.cs | 17 ++++ 5 files changed, 152 insertions(+), 12 deletions(-) diff --git a/DisplayMagician/UIForms/MainForm.Designer.cs b/DisplayMagician/UIForms/MainForm.Designer.cs index 400b297..403cd5b 100644 --- a/DisplayMagician/UIForms/MainForm.Designer.cs +++ b/DisplayMagician/UIForms/MainForm.Designer.cs @@ -51,6 +51,8 @@ this.shortcutToolStripSeparator = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.lbl_create_profile = new System.Windows.Forms.Label(); + this.lbl_create_shortcut = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -68,11 +70,13 @@ // // splitContainer1.Panel1 // + this.splitContainer1.Panel1.Controls.Add(this.lbl_create_profile); this.splitContainer1.Panel1.Controls.Add(this.btn_setup_display_profiles); this.splitContainer1.Panel1.Controls.Add(this.pb_display_profile); // // splitContainer1.Panel2 // + this.splitContainer1.Panel2.Controls.Add(this.lbl_create_shortcut); this.splitContainer1.Panel2.Controls.Add(this.cb_minimise_notification_area); this.splitContainer1.Panel2.Controls.Add(this.lbl_version); this.splitContainer1.Panel2.Controls.Add(this.btn_setup_game_shortcuts); @@ -221,6 +225,22 @@ resources.ApplyResources(this.exitToolStripMenuItem, "exitToolStripMenuItem"); this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); // + // lbl_create_profile + // + resources.ApplyResources(this.lbl_create_profile, "lbl_create_profile"); + this.lbl_create_profile.BackColor = System.Drawing.Color.Brown; + this.lbl_create_profile.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.lbl_create_profile.ForeColor = System.Drawing.Color.White; + this.lbl_create_profile.Name = "lbl_create_profile"; + // + // lbl_create_shortcut + // + resources.ApplyResources(this.lbl_create_shortcut, "lbl_create_shortcut"); + this.lbl_create_shortcut.BackColor = System.Drawing.Color.Brown; + this.lbl_create_shortcut.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.lbl_create_shortcut.ForeColor = System.Drawing.Color.White; + this.lbl_create_shortcut.Name = "lbl_create_shortcut"; + // // MainForm // resources.ApplyResources(this, "$this"); @@ -233,6 +253,7 @@ this.Activated += new System.EventHandler(this.MainForm_Activated); this.Load += new System.EventHandler(this.MainForm_Load); this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel1.PerformLayout(); this.splitContainer1.Panel2.ResumeLayout(false); this.splitContainer1.Panel2.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); @@ -267,5 +288,7 @@ private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem; private System.Windows.Forms.CheckBox cb_minimise_notification_area; public System.Windows.Forms.NotifyIcon notifyIcon; + private System.Windows.Forms.Label lbl_create_profile; + private System.Windows.Forms.Label lbl_create_shortcut; } } \ No newline at end of file diff --git a/DisplayMagician/UIForms/MainForm.cs b/DisplayMagician/UIForms/MainForm.cs index d25484c..4458460 100644 --- a/DisplayMagician/UIForms/MainForm.cs +++ b/DisplayMagician/UIForms/MainForm.cs @@ -129,12 +129,18 @@ namespace DisplayMagician.UIForms { btn_setup_game_shortcuts.Visible = true; pb_game_shortcut.Enabled = true; + lbl_create_profile.Visible = false; + + if (ShortcutRepository.AllShortcuts.Count > 0) + lbl_create_shortcut.Visible = false; + else + lbl_create_shortcut.Visible = true; } else { btn_setup_game_shortcuts.Visible = false; pb_game_shortcut.Enabled = false; - + lbl_create_profile.Visible = true; } } diff --git a/DisplayMagician/UIForms/MainForm.resx b/DisplayMagician/UIForms/MainForm.resx index 6846706..aea8696 100644 --- a/DisplayMagician/UIForms/MainForm.resx +++ b/DisplayMagician/UIForms/MainForm.resx @@ -132,6 +132,39 @@ Horizontal + + None + + + True + + + Microsoft Sans Serif, 12pt + + + 211, 239 + + + 355, 22 + + + 6 + + + You need to save at least one display profile first! + + + lbl_create_profile + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + splitContainer1.Panel1 + + + 0 + None @@ -163,7 +196,7 @@ splitContainer1.Panel1 - 0 + 1 Fill @@ -10711,7 +10744,7 @@ splitContainer1.Panel1 - 1 + 2 splitContainer1.Panel1 @@ -10725,6 +10758,45 @@ 0 + + None + + + True + + + Microsoft Sans Serif, 12pt + + + NoControl + + + 220, 247 + + + 343, 22 + + + 7 + + + You now need to click here to create a shortcut + + + False + + + lbl_create_shortcut + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + splitContainer1.Panel2 + + + 0 + Bottom @@ -10738,7 +10810,7 @@ NoControl - 232, 357 + 232, 355 332, 20 @@ -10759,7 +10831,7 @@ splitContainer1.Panel2 - 0 + 1 Bottom, Left @@ -10771,7 +10843,7 @@ Microsoft Sans Serif, 9.75pt - 12, 358 + 12, 357 25, 16 @@ -10795,7 +10867,7 @@ splitContainer1.Panel2 - 1 + 2 None @@ -10807,7 +10879,7 @@ Microsoft Sans Serif, 21.75pt - 212, 180 + 212, 174 360, 50 @@ -10828,7 +10900,7 @@ splitContainer1.Panel2 - 2 + 3 Bottom, Right @@ -10840,7 +10912,7 @@ NoControl - 700, 354 + 700, 352 75, 23 @@ -10861,7 +10933,7 @@ splitContainer1.Panel2 - 3 + 4 Fill @@ -63146,7 +63218,7 @@ splitContainer1.Panel2 - 4 + 5 splitContainer1.Panel2 @@ -71106,6 +71178,9 @@ True + + 58 + 6, 13 diff --git a/DisplayMagician/UIForms/ShortcutLibraryForm.Designer.cs b/DisplayMagician/UIForms/ShortcutLibraryForm.Designer.cs index 4894e80..bcd3d85 100644 --- a/DisplayMagician/UIForms/ShortcutLibraryForm.Designer.cs +++ b/DisplayMagician/UIForms/ShortcutLibraryForm.Designer.cs @@ -40,6 +40,7 @@ this.dialog_save = new System.Windows.Forms.SaveFileDialog(); this.label1 = new System.Windows.Forms.Label(); this.tt_selected = new System.Windows.Forms.ToolTip(this.components); + this.lbl_create_shortcut = new System.Windows.Forms.Label(); this.SuspendLayout(); // // ilv_saved_shortcuts @@ -184,6 +185,21 @@ this.label1.TabIndex = 31; this.label1.Text = "Game Shortcut Library"; // + // lbl_create_shortcut + // + this.lbl_create_shortcut.Anchor = System.Windows.Forms.AnchorStyles.None; + this.lbl_create_shortcut.AutoSize = true; + this.lbl_create_shortcut.BackColor = System.Drawing.Color.Brown; + this.lbl_create_shortcut.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.lbl_create_shortcut.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); + this.lbl_create_shortcut.ForeColor = System.Drawing.Color.White; + this.lbl_create_shortcut.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.lbl_create_shortcut.Location = new System.Drawing.Point(413, 562); + this.lbl_create_shortcut.Name = "lbl_create_shortcut"; + this.lbl_create_shortcut.Size = new System.Drawing.Size(304, 22); + this.lbl_create_shortcut.TabIndex = 32; + this.lbl_create_shortcut.Text = "Click the \'New\' button to create a shortcut"; + // // ShortcutLibraryForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -191,6 +207,7 @@ this.BackColor = System.Drawing.Color.Black; this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage"))); this.ClientSize = new System.Drawing.Size(1134, 716); + this.Controls.Add(this.lbl_create_shortcut); this.Controls.Add(this.label1); this.Controls.Add(this.btn_save); this.Controls.Add(this.btn_new); @@ -207,6 +224,7 @@ this.ShowIcon = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "DisplayMagician - Setup Game Shortcuts"; + this.Activated += new System.EventHandler(this.ShortcutLibraryForm_Activated); this.Load += new System.EventHandler(this.ShortcutLibraryForm_Load); this.ResumeLayout(false); this.PerformLayout(); @@ -225,5 +243,6 @@ private System.Windows.Forms.SaveFileDialog dialog_save; private System.Windows.Forms.Label label1; private System.Windows.Forms.ToolTip tt_selected; + private System.Windows.Forms.Label lbl_create_shortcut; } } \ No newline at end of file diff --git a/DisplayMagician/UIForms/ShortcutLibraryForm.cs b/DisplayMagician/UIForms/ShortcutLibraryForm.cs index 951617c..7d0a04c 100644 --- a/DisplayMagician/UIForms/ShortcutLibraryForm.cs +++ b/DisplayMagician/UIForms/ShortcutLibraryForm.cs @@ -45,6 +45,8 @@ namespace DisplayMagician.UIForms { // Refresh the Shortcut Library UI RefreshShortcutLibraryUI(); + + RemoveWarningIfShortcuts(); } private void RefreshShortcutLibraryUI() @@ -147,6 +149,14 @@ namespace DisplayMagician.UIForms } } + private void RemoveWarningIfShortcuts() + { + if (ShortcutRepository.AllShortcuts.Count > 0) + lbl_create_shortcut.Visible = false; + else + lbl_create_shortcut.Visible = true; + } + private void ilv_saved_shortcuts_ItemClick(object sender, ItemClickEventArgs e) { _selectedShortcut = GetShortcutFromName(e.Item.Text); @@ -182,6 +192,7 @@ namespace DisplayMagician.UIForms _selectedShortcut = shortcutForm.Shortcut; RefreshShortcutLibraryUI(); } + RemoveWarningIfShortcuts(); } private void btn_edit_Click(object sender, EventArgs e) @@ -223,6 +234,7 @@ namespace DisplayMagician.UIForms _selectedShortcut = null; RefreshShortcutLibraryUI(); + RemoveWarningIfShortcuts(); } private void btn_run_Click(object sender, EventArgs e) @@ -262,5 +274,10 @@ namespace DisplayMagician.UIForms tt_selected.RemoveAll(); } } + + private void ShortcutLibraryForm_Activated(object sender, EventArgs e) + { + RemoveWarningIfShortcuts(); + } } }