Connection Succeeded -> EventHandler
This commit is contained in:
parent
5d6be0c4bf
commit
44a019d95c
4 changed files with 23 additions and 15 deletions
|
|
@ -203,13 +203,15 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
}
|
||||
};
|
||||
|
||||
printer.Connection.ConnectionSucceeded.RegisterEvent((s, e) =>
|
||||
void ConnectionSucceeded(object s, EventArgs e)
|
||||
{
|
||||
UiThread.RunOnIdle(() =>
|
||||
{
|
||||
PrintRecovery.CheckIfNeedToRecoverPrint(printer);
|
||||
});
|
||||
}, ref unregisterEvents);
|
||||
}
|
||||
printer.Connection.ConnectionSucceeded += ConnectionSucceeded;
|
||||
this.Closed += (s, e) => printer.Connection.ConnectionSucceeded -= ConnectionSucceeded;
|
||||
}
|
||||
|
||||
bool buttonIsBeingClicked;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue