converting more rooted events
This commit is contained in:
parent
704d4c1d7b
commit
0a1b9a5553
4 changed files with 24 additions and 11 deletions
|
|
@ -410,10 +410,10 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
|
||||
// Wait for printing to complete
|
||||
var printFinishedResetEvent = new AutoResetEvent(false);
|
||||
ApplicationController.Instance.ActivePrinter.Connection.PrintFinished.RegisterEvent((s, e) =>
|
||||
ApplicationController.Instance.ActivePrinter.Connection.PrintFinished += (s, e) =>
|
||||
{
|
||||
printFinishedResetEvent.Set();
|
||||
}, ref unregisterEvents);
|
||||
};
|
||||
|
||||
testRunner.StartPrint();
|
||||
|
||||
|
|
@ -507,7 +507,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
var printer = ApplicationController.Instance.ActivePrinter;
|
||||
|
||||
var printFinishedResetEvent = new AutoResetEvent(false);
|
||||
printer.Connection.PrintFinished.RegisterEvent((s, e) => printFinishedResetEvent.Set(), ref unregisterEvents);
|
||||
printer.Connection.PrintFinished += (s, e) => printFinishedResetEvent.Set();
|
||||
|
||||
testRunner.StartPrint();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue