From 383f7a114fc9e16d73a8822b501f6f54c001856a Mon Sep 17 00:00:00 2001 From: Terry MacDonald Date: Sun, 11 Oct 2020 17:26:11 +1300 Subject: [PATCH] Shortcut save button works on load Had missed the shortcutsave button so it wold be disabled on load, even if the shortcut was a valid shortcut. This is now changed so that it works fine on load. Have also changed the shortcut library selection colours to match the rest of the application. --- HeliosPlus/UIForms/DisplayProfileForm.cs | 9 +++++++-- HeliosPlus/UIForms/ShortcutForm.cs | 5 ++++- HeliosPlus/UIForms/ShortcutLibraryForm.Designer.cs | 1 + HeliosPlus/UIForms/ShortcutLibraryForm.resx | 3 +++ 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/HeliosPlus/UIForms/DisplayProfileForm.cs b/HeliosPlus/UIForms/DisplayProfileForm.cs index 168af5b..aa754ea 100644 --- a/HeliosPlus/UIForms/DisplayProfileForm.cs +++ b/HeliosPlus/UIForms/DisplayProfileForm.cs @@ -189,11 +189,16 @@ namespace HeliosPlus.UIForms } else { - lbl_profile_shown_subtitle.Text = ""; if (ProfileRepository.IsActiveProfile(_selectedProfile)) + { btn_apply.Visible = false; + lbl_profile_shown_subtitle.Text = "This is the Display Profile currently in use."; + } else + { btn_apply.Visible = true; + lbl_profile_shown_subtitle.Text = ""; + } } } else @@ -201,7 +206,7 @@ namespace HeliosPlus.UIForms // we don't have the profile stored yet _saveOrRenameMode = "save"; btn_save_or_rename.Text = "Save As"; - lbl_profile_shown_subtitle.Text = "The current Display configuration hasn't been saved as a Display Profile yet"; + lbl_profile_shown_subtitle.Text = "The current Display configuration hasn't been saved as a Display Profile yet."; btn_apply.Visible = false; } diff --git a/HeliosPlus/UIForms/ShortcutForm.cs b/HeliosPlus/UIForms/ShortcutForm.cs index cd85612..01b12e0 100644 --- a/HeliosPlus/UIForms/ShortcutForm.cs +++ b/HeliosPlus/UIForms/ShortcutForm.cs @@ -793,6 +793,9 @@ namespace HeliosPlus.UIForms _loadedShortcut = true; + // Finally enable the save button if it's still valid + enableSaveButtonIfValid(); + } private void rb_wait_process_CheckedChanged(object sender, EventArgs e) @@ -904,7 +907,7 @@ namespace HeliosPlus.UIForms lbl_profile_shown.Text = _profileToUse.Name; if (_profileToUse.Equals(ProfileRepository.CurrentProfile)) - lbl_profile_shown_subtitle.Text = "(Current Display Profile in use)"; + lbl_profile_shown_subtitle.Text = "This is the Display Profile currently in use."; else lbl_profile_shown_subtitle.Text = ""; diff --git a/HeliosPlus/UIForms/ShortcutLibraryForm.Designer.cs b/HeliosPlus/UIForms/ShortcutLibraryForm.Designer.cs index 69c1bf1..328bbfc 100644 --- a/HeliosPlus/UIForms/ShortcutLibraryForm.Designer.cs +++ b/HeliosPlus/UIForms/ShortcutLibraryForm.Designer.cs @@ -50,6 +50,7 @@ this.ilv_saved_shortcuts.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); + this.ilv_saved_shortcuts.Colors = new Manina.Windows.Forms.ImageListViewColor(resources.GetString("ilv_saved_shortcuts.Colors")); this.ilv_saved_shortcuts.Location = new System.Drawing.Point(0, 98); this.ilv_saved_shortcuts.MultiSelect = false; this.ilv_saved_shortcuts.Name = "ilv_saved_shortcuts"; diff --git a/HeliosPlus/UIForms/ShortcutLibraryForm.resx b/HeliosPlus/UIForms/ShortcutLibraryForm.resx index 63a5452..e5d61b0 100644 --- a/HeliosPlus/UIForms/ShortcutLibraryForm.resx +++ b/HeliosPlus/UIForms/ShortcutLibraryForm.resx @@ -117,6 +117,9 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + BorderColor = 406d6d6d; UnFocusedColor1 = ffff8080; UnFocusedColor2 = LightCoral; UnFocusedBorderColor = Maroon; HoverColor1 = 80078d7; HoverColor2 = 400078d7; HoverBorderColor = 400078d7; SelectedColor1 = ffff8080; SelectedColor2 = LightCoral; SelectedBorderColor = Maroon; DisabledColor1 = 6d6d6d; DisabledColor2 = 206d6d6d; DisabledBorderColor = 206d6d6d; DisabledForeColor = ff808080; ColumnHeaderBackColor1 = 20f0f0f0; ColumnHeaderBackColor2 = c4f0f0f0; ColumnHeaderHoverColor1 = 100078d7; ColumnHeaderHoverColor2 = 400078d7; ColumnSelectColor = 106d6d6d; ColumnSeparatorColor = 206d6d6d; PaneBackColor = 106d6d6d; PaneSeparatorColor = 806d6d6d; SelectionRectangleColor1 = 800078d7; SelectionRectangleColor2 = 800078d7 + 17, 17