mirror of
https://github.com/terrymacdonald/DisplayMagician.git
synced 2024-08-30 18:32:20 +00:00
Added additional places to refresh notification icons
This should hopefully cover all the instances of when we need to update the notification icons to refresh the correct profiles and game shortcuts.
This commit is contained in:
parent
b7a03c1a61
commit
340e1a6db0
@ -69,6 +69,12 @@ namespace DisplayMagician.UIForms
|
||||
{
|
||||
logger.Warn($"DisplayProfileForm/Apply_Click: Error applying the Profile {_selectedProfile.Name}. Unable to change the display layout.");
|
||||
}
|
||||
|
||||
// Also refresh the right-click menu (if we have a main form loaded)
|
||||
if (Program.AppMainForm is Form)
|
||||
{
|
||||
Program.AppMainForm.RefreshNotifyIconMenus();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -124,6 +130,12 @@ namespace DisplayMagician.UIForms
|
||||
|
||||
}
|
||||
|
||||
// Also refresh the right-click menu (if we have a main form loaded)
|
||||
if (Program.AppMainForm is Form)
|
||||
{
|
||||
Program.AppMainForm.RefreshNotifyIconMenus();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void Save_Click(object sender, EventArgs e)
|
||||
@ -178,6 +190,7 @@ namespace DisplayMagician.UIForms
|
||||
{
|
||||
MessageBox.Show(ex.Message, Language.Shortcut, MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -431,6 +444,12 @@ namespace DisplayMagician.UIForms
|
||||
// now update the profiles image listview
|
||||
RefreshDisplayProfileUI();
|
||||
|
||||
// Also refresh the right-click menu (if we have a main form loaded)
|
||||
if (Program.AppMainForm is Form)
|
||||
{
|
||||
Program.AppMainForm.RefreshNotifyIconMenus();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void ilv_saved_profiles_ItemClick(object sender, ItemClickEventArgs e)
|
||||
|
@ -102,12 +102,6 @@ namespace DisplayMagician.UIForms
|
||||
// Restart updating the saved_profiles listview
|
||||
ilv_saved_shortcuts.ResumeLayout();
|
||||
|
||||
// Also refresh the right-click menu (if we have a main form loaded)
|
||||
if (Program.AppMainForm is Form)
|
||||
{
|
||||
Program.AppMainForm.RefreshNotifyIconMenus();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private ShortcutItem GetShortcutFromName(string shortcutName)
|
||||
@ -207,6 +201,7 @@ namespace DisplayMagician.UIForms
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logger.Warn(ex, $"ShortcutLibraryForm/btn_save_Click: Exception saving shortcut to {dialog_save.FileName}.");
|
||||
MessageBox.Show(ex.Message, Language.Shortcut, MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
@ -282,6 +277,11 @@ namespace DisplayMagician.UIForms
|
||||
this.Cursor = Cursors.Default;
|
||||
RemoveWarningIfShortcuts();
|
||||
|
||||
// Also refresh the right-click menu (if we have a main form loaded)
|
||||
if (Program.AppMainForm is Form)
|
||||
{
|
||||
Program.AppMainForm.RefreshNotifyIconMenus();
|
||||
}
|
||||
}
|
||||
|
||||
private void btn_edit_Click(object sender, EventArgs e)
|
||||
@ -328,6 +328,12 @@ namespace DisplayMagician.UIForms
|
||||
}
|
||||
|
||||
this.Cursor = Cursors.Default;
|
||||
|
||||
// Also refresh the right-click menu (if we have a main form loaded)
|
||||
if (Program.AppMainForm is Form)
|
||||
{
|
||||
Program.AppMainForm.RefreshNotifyIconMenus();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -365,6 +371,12 @@ namespace DisplayMagician.UIForms
|
||||
ShortcutRepository.IsValidRefresh();
|
||||
RefreshShortcutLibraryUI();
|
||||
RemoveWarningIfShortcuts();
|
||||
|
||||
// Also refresh the right-click menu (if we have a main form loaded)
|
||||
if (Program.AppMainForm is Form)
|
||||
{
|
||||
Program.AppMainForm.RefreshNotifyIconMenus();
|
||||
}
|
||||
}
|
||||
|
||||
private void btn_run_Click(object sender, EventArgs e)
|
||||
@ -437,6 +449,12 @@ namespace DisplayMagician.UIForms
|
||||
lbl_mask.Visible = false;
|
||||
lbl_mask.SendToBack();
|
||||
|
||||
// Also refresh the right-click menu (if we have a main form loaded)
|
||||
if (Program.AppMainForm is Form)
|
||||
{
|
||||
Program.AppMainForm.RefreshNotifyIconMenus();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void ilv_saved_shortcuts_ItemHover(object sender, ItemHoverEventArgs e)
|
||||
|
Loading…
Reference in New Issue
Block a user