mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-24 03:44:13 +08:00
allow access to Settings from different threads.
This commit is contained in:
parent
f883d9d4af
commit
c4acb0c44b
@ -1,4 +1,8 @@
|
|||||||
namespace GameRes.Formats.Properties {
|
using System;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Threading;
|
||||||
|
|
||||||
|
namespace GameRes.Formats.Properties {
|
||||||
|
|
||||||
|
|
||||||
// This class allows you to handle specific events on the settings class:
|
// This class allows you to handle specific events on the settings class:
|
||||||
@ -16,8 +20,12 @@
|
|||||||
// this.SettingsSaving += this.SettingsSavingEventHandler;
|
// this.SettingsSaving += this.SettingsSavingEventHandler;
|
||||||
//
|
//
|
||||||
|
|
||||||
if (null != System.Windows.Application.Current)
|
if (null != Application.Current)
|
||||||
System.Windows.Application.Current.Exit += ApplicationExitHandler;
|
{
|
||||||
|
Application.Current.Dispatcher.BeginInvoke (DispatcherPriority.Normal, new Action(() => {
|
||||||
|
Application.Current.Exit += ApplicationExitHandler;
|
||||||
|
}));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ApplicationExitHandler (object sender, System.Windows.ExitEventArgs args)
|
void ApplicationExitHandler (object sender, System.Windows.ExitEventArgs args)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user