changed CommunicationStateChanged to EventHandler
This commit is contained in:
parent
75cec79256
commit
4bb93fcc19
18 changed files with 64 additions and 39 deletions
|
|
@ -219,11 +219,12 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
|
||||
printer.Bed.RendererOptions.PropertyChanged += RendererOptions_PropertyChanged;
|
||||
|
||||
printer.Connection.CommunicationStateChanged.RegisterEvent((s, e) =>
|
||||
void CommunicationStateChanged(object s, EventArgs e)
|
||||
{
|
||||
this.SetSliderVisibility();
|
||||
}, ref unregisterEvents);
|
||||
|
||||
}
|
||||
printer.Connection.CommunicationStateChanged += CommunicationStateChanged;
|
||||
this.Closed += (s, e) => printer.Connection.CommunicationStateChanged -= CommunicationStateChanged;
|
||||
}
|
||||
|
||||
private void RendererOptions_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue