Remove redundant EnableChanged event

- Issue MatterHackers/MCCentral#5265
Consider removing PrinterConnection.EnableChanged event
This commit is contained in:
jlewin 2019-04-05 11:44:55 -07:00
parent 6953742123
commit af374e0abf
5 changed files with 0 additions and 22 deletions

View file

@ -147,7 +147,6 @@ namespace MatterHackers.MatterControl.ActionBar
// Register listeners
printer.Connection.CommunicationStateChanged += Connection_CommunicationStateChanged;
printer.Connection.EnableChanged += Connection_EnableChanged;
printer.Connection.ConnectionFailed += Connection_Failed;
this.SetVisibleStates();
@ -157,7 +156,6 @@ namespace MatterHackers.MatterControl.ActionBar
{
// Unregister listeners
printer.Connection.CommunicationStateChanged -= Connection_CommunicationStateChanged;
printer.Connection.EnableChanged -= Connection_EnableChanged;
printer.Connection.ConnectionFailed -= Connection_Failed;
base.OnClosed(e);
@ -238,11 +236,6 @@ namespace MatterHackers.MatterControl.ActionBar
}
}
private void Connection_EnableChanged(object s, EventArgs e)
{
SetVisibleStates();
}
private void Connection_CommunicationStateChanged(object s, EventArgs e)
{
this.SetVisibleStates();