Growl can now be used in threads
This commit is contained in:
1 parent
36008d83e2
commit
b8692d080f
2 files changed
+6
No files matched your search
@@ -260,6 +260,8 @@ namespace HandyControl.Controls
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="growlInfo"></param>
|
/// <param name="growlInfo"></param>
|
||||||
private static void Show(GrowlInfo growlInfo)
|
private static void Show(GrowlInfo growlInfo)
|
||||||
|
{
|
||||||
|
Application.Current.Dispatcher.Invoke(() =>
|
||||||
{
|
{
|
||||||
var ctl = new Growl
|
var ctl = new Growl
|
||||||
{
|
{
|
||||||
@@ -277,6 +279,7 @@ namespace HandyControl.Controls
|
|||||||
_waitTime = Math.Max(growlInfo.WaitTime, 2)
|
_waitTime = Math.Max(growlInfo.WaitTime, 2)
|
||||||
};
|
};
|
||||||
GrowlPanel.Children.Insert(0, ctl);
|
GrowlPanel.Children.Insert(0, ctl);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -260,6 +260,8 @@ namespace HandyControl.Controls
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="growlInfo"></param>
|
/// <param name="growlInfo"></param>
|
||||||
private static void Show(GrowlInfo growlInfo)
|
private static void Show(GrowlInfo growlInfo)
|
||||||
|
{
|
||||||
|
Application.Current.Dispatcher.Invoke(new Action(() =>
|
||||||
{
|
{
|
||||||
var ctl = new Growl
|
var ctl = new Growl
|
||||||
{
|
{
|
||||||
@@ -277,6 +279,7 @@ namespace HandyControl.Controls
|
|||||||
_waitTime = Math.Max(growlInfo.WaitTime, 2)
|
_waitTime = Math.Max(growlInfo.WaitTime, 2)
|
||||||
};
|
};
|
||||||
GrowlPanel.Children.Insert(0, ctl);
|
GrowlPanel.Children.Insert(0, ctl);
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in new issue
Block a user