Toasts – Diff between revs 19 and 23

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 19 Rev 23
Line 29... Line 29...
29   29  
30 public void Dispose() 30 public void Dispose()
31 { 31 {
32 if (_toastFromActionBlockLink != null) 32 if (_toastFromActionBlockLink != null)
33 { 33 {
34 _toastFromActionBlockLink?.Dispose(); 34 _toastFromActionBlockLink.Dispose();
35 _toastFromActionBlockLink = null; 35 _toastFromActionBlockLink = null;
36 } 36 }
Line 37... Line 37...
37 } 37 }
38   38  
39 private static void DisplayForm(ToastForm toastForm) 39 private static void DisplayForm(ToastForm toastForm)
40 { 40 {
41 new Thread(() => 41 var thread = new Thread(() =>
-   42 {
-   43 Application.Run(toastForm);
42 { 44 });
43 Application.Run(toastForm); 45 thread.SetApartmentState(ApartmentState.STA);
Line 44... Line 46...
44 }).Start(); 46 thread.Start();
45 } 47 }
46   48