Remove redundant EnableChanged event
- Issue MatterHackers/MCCentral#5265 Consider removing PrinterConnection.EnableChanged event
This commit is contained in:
parent
6953742123
commit
af374e0abf
5 changed files with 0 additions and 22 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -116,8 +116,6 @@ namespace MatterHackers.MatterControl.PrinterCommunication
|
|||
|
||||
public event EventHandler DestinationChanged;
|
||||
|
||||
public event EventHandler EnableChanged;
|
||||
|
||||
public event EventHandler HomingPositionChanged;
|
||||
|
||||
public event EventHandler HotendTemperatureRead;
|
||||
|
|
@ -1189,7 +1187,6 @@ You will then need to logout and log back in to the computer for the changes to
|
|||
TurnOffBedAndExtruders(TurnOff.Now);
|
||||
FanSpeed0To255 = 0;
|
||||
}
|
||||
OnEnabledChanged(null);
|
||||
}
|
||||
|
||||
public void HotendTemperatureWasWritenToPrinter(string line)
|
||||
|
|
@ -1349,7 +1346,6 @@ You will then need to logout and log back in to the computer for the changes to
|
|||
ConnectionFailed?.Invoke(this, eventArgs);
|
||||
|
||||
CommunicationState = CommunicationStates.Disconnected;
|
||||
OnEnabledChanged(eventArgs);
|
||||
}
|
||||
|
||||
private void OnIdle()
|
||||
|
|
@ -2340,11 +2336,6 @@ You will then need to logout and log back in to the computer for the changes to
|
|||
BedTemperatureRead?.Invoke(this, e);
|
||||
}
|
||||
|
||||
private void OnEnabledChanged(EventArgs e)
|
||||
{
|
||||
EnableChanged?.Invoke(this, e);
|
||||
}
|
||||
|
||||
private void OnHotendTemperatureRead(EventArgs e)
|
||||
{
|
||||
HotendTemperatureRead?.Invoke(this, e);
|
||||
|
|
|
|||
|
|
@ -102,7 +102,6 @@ namespace MatterHackers.MatterControl.PrinterControls
|
|||
|
||||
// Register listeners
|
||||
printer.Connection.CommunicationStateChanged += PrinterStatusChanged;
|
||||
printer.Connection.EnableChanged += PrinterStatusChanged;
|
||||
|
||||
SetVisibleControls();
|
||||
}
|
||||
|
|
@ -129,7 +128,6 @@ namespace MatterHackers.MatterControl.PrinterControls
|
|||
// Unregister listeners
|
||||
printer.Settings.PrintLevelingEnabledChanged -= Settings_PrintLevelingEnabledChanged;
|
||||
printer.Connection.CommunicationStateChanged -= PrinterStatusChanged;
|
||||
printer.Connection.EnableChanged -= PrinterStatusChanged;
|
||||
|
||||
base.OnClosed(e);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -118,7 +118,6 @@ namespace MatterHackers.MatterControl.PrinterControls
|
|||
|
||||
// Register listeners
|
||||
printer.Connection.CommunicationStateChanged += Printer_StatusChanged;
|
||||
printer.Connection.EnableChanged += Printer_StatusChanged;
|
||||
SetVisibleControls();
|
||||
}
|
||||
|
||||
|
|
@ -131,7 +130,6 @@ namespace MatterHackers.MatterControl.PrinterControls
|
|||
{
|
||||
// Unregister listeners
|
||||
printer.Connection.CommunicationStateChanged -= Printer_StatusChanged;
|
||||
printer.Connection.EnableChanged -= Printer_StatusChanged;
|
||||
|
||||
base.OnClosed(e);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,7 +106,6 @@ namespace MatterHackers.MatterControl
|
|||
// Register listeners
|
||||
printer.Connection.CommunicationStateChanged += Printer_StatusChanged;
|
||||
printer.Connection.DetailedPrintingStateChanged += Printer_StatusChanged;
|
||||
printer.Connection.EnableChanged += Printer_StatusChanged;
|
||||
|
||||
SetVisibleControls();
|
||||
}
|
||||
|
|
@ -158,7 +157,6 @@ namespace MatterHackers.MatterControl
|
|||
// Unregister listeners
|
||||
printer.Connection.CommunicationStateChanged -= Printer_StatusChanged;
|
||||
printer.Connection.DetailedPrintingStateChanged -= Printer_StatusChanged;
|
||||
printer.Connection.EnableChanged -= Printer_StatusChanged;
|
||||
|
||||
base.OnClosed(e);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue