Updated right-click menu tp bold the active display

This should help remove confusion.
This commit is contained in:
Terry MacDonald 2021-10-31 10:24:27 +13:00
parent 1965ef714f
commit d6887e53e6
3 changed files with 16 additions and 4 deletions

View File

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

View File

@ -130,6 +130,9 @@ namespace DisplayMagician.UIForms
}
// As this may impact which game shortcuts are now usable, also force a refresh of the game shortcuts validity
ShortcutRepository.IsValidRefresh();
// Also refresh the right-click menu (if we have a main form loaded)
if (Program.AppMainForm is Form)
{

View File

@ -351,10 +351,19 @@ namespace DisplayMagician.UIForms
foreach (ProfileItem profile in ProfileRepository.AllProfiles)
{
ToolStripMenuItem profileMenuItem = new ToolStripMenuItem(profile.Name, profile.ProfileBitmap, runProfileToolStripMenuItem_Click);
if (profile.IsActive || !profile.IsPossible)
if (!profile.IsPossible)
{
profileMenuItem.Enabled = false;
else
}
else if (profile.IsActive)
{
profileMenuItem.Enabled = true;
profileMenuItem.Font = new Font(profileMenuItem.Font, FontStyle.Bold);
}
else
{
profileMenuItem.Enabled = true;
}
profileToolStripMenuItem.DropDownItems.Add(profileMenuItem);
}