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,12 +308,24 @@ namespace Ninjacrab.PersistentWindows.SystrayShell
|
||||||
|
|
||||||
static void EnableRestoreMenu(bool enableRestoreDB, bool checkUpgrade)
|
static void EnableRestoreMenu(bool enableRestoreDB, bool checkUpgrade)
|
||||||
{
|
{
|
||||||
systrayForm.UpdateMenuEnable(enableRestoreDB, checkUpgrade);
|
if (systrayForm.InvokeRequired)
|
||||||
|
systrayForm.BeginInvoke((Action) delegate ()
|
||||||
|
{
|
||||||
|
systrayForm.UpdateMenuEnable(enableRestoreDB, checkUpgrade);
|
||||||
|
});
|
||||||
|
else
|
||||||
|
systrayForm.UpdateMenuEnable(enableRestoreDB, checkUpgrade);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void EnableRestoreSnapshotMenu(bool enable)
|
static void EnableRestoreSnapshotMenu(bool enable)
|
||||||
{
|
{
|
||||||
systrayForm.EnableSnapshotRestore(enable);
|
if (systrayForm.InvokeRequired)
|
||||||
|
systrayForm.BeginInvoke((Action) delegate ()
|
||||||
|
{
|
||||||
|
systrayForm.EnableSnapshotRestore(enable);
|
||||||
|
});
|
||||||
|
else
|
||||||
|
systrayForm.EnableSnapshotRestore(enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
static public void CaptureSnapshot(int id, bool prompt = true)
|
static public void CaptureSnapshot(int id, bool prompt = true)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue