sinterlkaas
New Member
- Joined
- Jan 17, 2012
- Messages
- 536
- Reaction score
- 14
topic says enough this event never gets called
when I close DB the thread stays alive still showing a msgbox every 3 seconds
snippet:
my current work around:
when I close DB the thread stays alive still showing a msgbox every 3 seconds
snippet:
Code:
public void OnShutdown()
{
somethread.Abort()
}
public void doWork()
{
while(true)
{
Messagebox.Show("still running");
Thread.Sleep(3000);
}
}
my current work around:
Code:
App.Current.Dispatcher.ShutdownStarted += new EventHandler(Dispatcher_ShutdownStarted);
void Dispatcher_ShutdownStarted(object sender, EventArgs e)
{
somethread.Abort();
}
Last edited: