Added help buttons to all UI windows

I redeveloped the help wiki at the guthub site, and took the opportunity to add some guidance to the different UI windows that would be most helpful there. I also added a new 'Initial displaymagician setup' wiki page to help people just starting out.

Hopefully helps with #70
This commit is contained in:
Terry MacDonald 2021-12-28 10:28:02 +13:00
parent 810f1363f2
commit 67b6dec78b
5 changed files with 66 additions and 8 deletions

View File

@ -26,8 +26,8 @@ using System.Resources;
[assembly: Guid("e4ceaf5e-ad01-4695-b179-31168eb74c48")]
// Version information
[assembly: AssemblyVersion("2.1.5.5")]
[assembly: AssemblyFileVersion("2.1.5.5")]
[assembly: AssemblyVersion("2.1.5.7")]
[assembly: AssemblyFileVersion("2.1.5.7")]
[assembly: NeutralResourcesLanguageAttribute( "en" )]
[assembly: CLSCompliant(true)]

View File

@ -64,6 +64,7 @@ namespace DisplayMagician.UIForms
this.pbLogo = new System.Windows.Forms.PictureBox();
this.p_lower = new System.Windows.Forms.Panel();
this.p_fill = new System.Windows.Forms.Panel();
this.btn_help = new System.Windows.Forms.Button();
this.menu_profiles.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pb_down_arrow)).BeginInit();
this.p_upper.SuspendLayout();
@ -201,7 +202,7 @@ namespace DisplayMagician.UIForms
this.btn_save_or_rename.Name = "btn_save_or_rename";
this.btn_save_or_rename.Size = new System.Drawing.Size(151, 33);
this.btn_save_or_rename.TabIndex = 1;
this.btn_save_or_rename.Text = "&Save As";
this.btn_save_or_rename.Text = "&Save";
this.btn_save_or_rename.UseVisualStyleBackColor = false;
this.btn_save_or_rename.Click += new System.EventHandler(this.btn_save_as_Click);
//
@ -379,6 +380,7 @@ namespace DisplayMagician.UIForms
//
this.p_upper.BackColor = System.Drawing.Color.DimGray;
this.p_upper.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("p_upper.BackgroundImage")));
this.p_upper.Controls.Add(this.btn_help);
this.p_upper.Controls.Add(this.txt_profile_save_name);
this.p_upper.Controls.Add(this.lbl_save_profile);
this.p_upper.Controls.Add(this.btn_profile_settings);
@ -448,6 +450,23 @@ namespace DisplayMagician.UIForms
this.p_fill.Size = new System.Drawing.Size(934, 141);
this.p_fill.TabIndex = 39;
//
// btn_help
//
this.btn_help.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btn_help.BackColor = System.Drawing.Color.Black;
this.btn_help.FlatAppearance.MouseDownBackColor = System.Drawing.Color.IndianRed;
this.btn_help.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Brown;
this.btn_help.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btn_help.ForeColor = System.Drawing.Color.White;
this.btn_help.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.btn_help.Location = new System.Drawing.Point(847, 63);
this.btn_help.Name = "btn_help";
this.btn_help.Size = new System.Drawing.Size(75, 23);
this.btn_help.TabIndex = 39;
this.btn_help.Text = "&Help";
this.btn_help.UseVisualStyleBackColor = false;
this.btn_help.Click += new System.EventHandler(this.btn_help_Click);
//
// DisplayProfileForm
//
this.AcceptButton = this.btn_apply;
@ -513,6 +532,7 @@ namespace DisplayMagician.UIForms
private System.Windows.Forms.Button btn_profile_settings;
private System.Windows.Forms.Panel p_lower;
private System.Windows.Forms.Panel p_fill;
private System.Windows.Forms.Button btn_help;
}
}

View File

@ -329,7 +329,7 @@ namespace DisplayMagician.UIForms
{
// we don't have the profile stored yet
_saveOrRenameMode = "save";
btn_save_or_rename.Text = "Save As";
btn_save_or_rename.Text = "Save";
lbl_profile_shown_subtitle.Text = "The current Display configuration hasn't been saved as a Display Profile yet.";
btn_apply.Visible = false;
lbl_save_profile.Visible = true;
@ -356,12 +356,19 @@ namespace DisplayMagician.UIForms
private void btn_save_as_Click(object sender, EventArgs e)
{
// Check there is a name
if (String.IsNullOrWhiteSpace(txt_profile_save_name.Text))
{
logger.Warn($"DisplayProfileForm/btn_save_as_Click: You need to provide a name for this profile before it can be saved.");
MessageBox.Show("You need to provide a name for this profile before it can be saved.", "Your profile needs a name", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
// Check the name is valid
if (!Program.IsValidFilename(txt_profile_save_name.Text))
{
MessageBox.Show("The profile name cannot contain the following characters:" + Path.GetInvalidFileNameChars(), "Invalid characters in profile name", MessageBoxButtons.OK, MessageBoxIcon.Error);
logger.Warn($"DisplayProfileForm/btn_save_as_Click: The profile name cannot contain the following characters: {Path.GetInvalidFileNameChars()}. Unable to save this profile.");
MessageBox.Show($"The profile name cannot contain the following characters: [{Path.GetInvalidFileNameChars()}]. Please change the profile name.", "Invalid characters in profile name", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
@ -371,7 +378,8 @@ namespace DisplayMagician.UIForms
//if (String.Equals(txt_profile_save_name.Text, savedProfile.Name, StringComparison.InvariantCultureIgnoreCase))
if (savedProfile.Name.Equals(txt_profile_save_name.Text))
{
MessageBox.Show("Sorry, each saved display profile needs a unique name.", "Profile name already exists", MessageBoxButtons.OK, MessageBoxIcon.Error);
logger.Warn($"DisplayProfileForm/btn_save_as_Click: The profile name {txt_profile_save_name.Text} already exists. Each profile name must be unique. Unable to save this profile.");
MessageBox.Show("Sorry, each saved display profile needs a unique name. Please change the profile name.", "Profile name already exists", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
}
@ -383,7 +391,7 @@ namespace DisplayMagician.UIForms
// We're in 'save' mode!
// Check we're not already saving this profile
string previouslySavedProfileName = "";
string previouslySavedProfileName;
if (ProfileRepository.ContainsCurrentProfile(out previouslySavedProfileName))
{
MessageBox.Show($"Sorry, this display profile was already saved as '{previouslySavedProfileName}'.", "Profile already saved", MessageBoxButtons.OK, MessageBoxIcon.Error);
@ -606,5 +614,10 @@ namespace DisplayMagician.UIForms
}
}
private void btn_help_Click(object sender, EventArgs e)
{
string targetURL = @"https://github.com/terrymacdonald/DisplayMagician/wiki/Initial-DisplayMagician-Setup";
System.Diagnostics.Process.Start(targetURL);
}
}
}

View File

@ -140,6 +140,7 @@ namespace DisplayMagician.UIForms
this.cb_autosuggest = new System.Windows.Forms.CheckBox();
this.btn_hotkey = new System.Windows.Forms.Button();
this.lbl_hotkey_assigned = new System.Windows.Forms.Label();
this.btn_help = new System.Windows.Forms.Button();
this.tabc_shortcut.SuspendLayout();
this.tabp_display.SuspendLayout();
this.p_profiles.SuspendLayout();
@ -1616,6 +1617,22 @@ namespace DisplayMagician.UIForms
this.lbl_hotkey_assigned.Visible = false;
this.lbl_hotkey_assigned.Click += new System.EventHandler(this.lbl_hotkey_assigned_Click);
//
// btn_help
//
this.btn_help.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btn_help.FlatAppearance.MouseDownBackColor = System.Drawing.Color.IndianRed;
this.btn_help.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Brown;
this.btn_help.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btn_help.ForeColor = System.Drawing.Color.White;
this.btn_help.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.btn_help.Location = new System.Drawing.Point(997, 14);
this.btn_help.Name = "btn_help";
this.btn_help.Size = new System.Drawing.Size(75, 23);
this.btn_help.TabIndex = 38;
this.btn_help.Text = "&Help";
this.btn_help.UseVisualStyleBackColor = true;
this.btn_help.Click += new System.EventHandler(this.btn_help_Click);
//
// ShortcutForm
//
this.AcceptButton = this.btn_save;
@ -1624,6 +1641,7 @@ namespace DisplayMagician.UIForms
this.BackColor = System.Drawing.Color.Black;
this.CancelButton = this.btn_cancel;
this.ClientSize = new System.Drawing.Size(1084, 943);
this.Controls.Add(this.btn_help);
this.Controls.Add(this.lbl_hotkey_assigned);
this.Controls.Add(this.btn_hotkey);
this.Controls.Add(this.cb_autosuggest);
@ -1797,5 +1815,6 @@ namespace DisplayMagician.UIForms
private System.Windows.Forms.CheckBox cb_run_cmd_afterwards_dont_start;
private System.Windows.Forms.CheckBox cb_run_exe_as_administrator;
private System.Windows.Forms.CheckBox cb_run_cmd_afterwards_run_as_administrator;
private System.Windows.Forms.Button btn_help;
}
}

View File

@ -3246,6 +3246,12 @@ namespace DisplayMagician.UIForms
if (_loadedShortcut)
_isUnsaved = true;
}
private void btn_help_Click(object sender, EventArgs e)
{
string targetURL = @"https://github.com/terrymacdonald/DisplayMagician/wiki/Initial-DisplayMagician-Setup";
System.Diagnostics.Process.Start(targetURL);
}
}
// Class used to populate combo boxes