mirror of
https://github.com/terrymacdonald/DisplayMagician.git
synced 2024-08-30 18:32:20 +00:00
Update the right-click icon menu more consistently
This should ensure that the shortcut and profile menus available from right click of the DisplayMagician system tray icon are updated more reliably. They should apply properly now.
This commit is contained in:
parent
1ef9e5b818
commit
b7a03c1a61
@ -223,13 +223,6 @@ namespace DisplayMagician.UIForms
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Also refresh the right-click menu (if we have a main form loaded)
|
|
||||||
if (Program.AppMainForm is Form)
|
|
||||||
{
|
|
||||||
Program.AppMainForm.RefreshNotifyIconMenus();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Restart updating the saved_profiles listview
|
// Restart updating the saved_profiles listview
|
||||||
ilv_saved_profiles.ResumeLayout();
|
ilv_saved_profiles.ResumeLayout();
|
||||||
}
|
}
|
||||||
@ -332,6 +325,12 @@ namespace DisplayMagician.UIForms
|
|||||||
// Refresh the image list view
|
// Refresh the image list view
|
||||||
//RefreshImageListView(profile);
|
//RefreshImageListView(profile);
|
||||||
|
|
||||||
|
// Also refresh the right-click menu (if we have a main form loaded)
|
||||||
|
if (Program.AppMainForm is Form)
|
||||||
|
{
|
||||||
|
Program.AppMainForm.RefreshNotifyIconMenus();
|
||||||
|
}
|
||||||
|
|
||||||
// And finally refresh the profile in the display view
|
// And finally refresh the profile in the display view
|
||||||
dv_profile.Profile = profile;
|
dv_profile.Profile = profile;
|
||||||
dv_profile.Refresh();
|
dv_profile.Refresh();
|
||||||
|
@ -407,6 +407,12 @@ namespace DisplayMagician.UIForms
|
|||||||
// Run the shortcut if it's still there
|
// Run the shortcut if it's still there
|
||||||
if (profileToRun != null)
|
if (profileToRun != null)
|
||||||
ProfileRepository.ApplyProfile(profileToRun);
|
ProfileRepository.ApplyProfile(profileToRun);
|
||||||
|
|
||||||
|
// Also refresh the right-click menu (if we have a main form loaded)
|
||||||
|
if (Program.AppMainForm is Form)
|
||||||
|
{
|
||||||
|
Program.AppMainForm.RefreshNotifyIconMenus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -428,6 +434,12 @@ namespace DisplayMagician.UIForms
|
|||||||
// Run the shortcut if it's still there
|
// Run the shortcut if it's still there
|
||||||
if (shortcutToRun != null)
|
if (shortcutToRun != null)
|
||||||
ShortcutRepository.RunShortcut(shortcutToRun, notifyIcon);
|
ShortcutRepository.RunShortcut(shortcutToRun, notifyIcon);
|
||||||
|
|
||||||
|
// Also refresh the right-click menu (if we have a main form loaded)
|
||||||
|
if (Program.AppMainForm is Form)
|
||||||
|
{
|
||||||
|
Program.AppMainForm.RefreshNotifyIconMenus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user