mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-12 13:35:39 +02:00
experiment to fix asynchronous GUI operation using BeginInvoke()
This commit is contained in:
parent
ebb30f8aa6
commit
096410f3d4
1 changed files with 14 additions and 2 deletions
|
@ -308,11 +308,23 @@ namespace Ninjacrab.PersistentWindows.SystrayShell
|
|||
|
||||
static void EnableRestoreMenu(bool enableRestoreDB, bool checkUpgrade)
|
||||
{
|
||||
if (systrayForm.InvokeRequired)
|
||||
systrayForm.BeginInvoke((Action) delegate ()
|
||||
{
|
||||
systrayForm.UpdateMenuEnable(enableRestoreDB, checkUpgrade);
|
||||
});
|
||||
else
|
||||
systrayForm.UpdateMenuEnable(enableRestoreDB, checkUpgrade);
|
||||
}
|
||||
|
||||
static void EnableRestoreSnapshotMenu(bool enable)
|
||||
{
|
||||
if (systrayForm.InvokeRequired)
|
||||
systrayForm.BeginInvoke((Action) delegate ()
|
||||
{
|
||||
systrayForm.EnableSnapshotRestore(enable);
|
||||
});
|
||||
else
|
||||
systrayForm.EnableSnapshotRestore(enable);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue