From bd3cb640be12621ac37253e8a8c627ae40692e4d Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Thu, 7 Feb 2019 15:39:12 +0200 Subject: Some fixes and improvements for PPC & Machine Studio. --- .../Connection/DefaultMachineProvider.cs | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs index 2a0392dd6..95912e1ea 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs @@ -33,11 +33,6 @@ namespace Tango.PPC.Common.Connection private bool _isInitialized; private Thread _connection_thread; - /// - /// Occurs when current has changed. - /// - public event EventHandler MachineOperatorChanged; - private Machine _machine; /// /// Gets the database machine entity associated with the current machine. @@ -67,23 +62,11 @@ namespace Tango.PPC.Common.Connection } private set { - var oldOperator = _machineOperator; _machineOperator = value; - OnMachineOperatorChanged(oldOperator, _machineOperator); RaisePropertyChangedAuto(); } } - /// - /// Called when the machine operator has been changed - /// - /// The old operator. - /// The new operator. - protected virtual void OnMachineOperatorChanged(IMachineOperator oldOperator, IMachineOperator newOperator) - { - MachineOperatorChanged?.Invoke(this, new MachineOperatorChangedEventArgs(oldOperator, newOperator)); - } - /// /// Initializes a new instance of the class. /// @@ -128,7 +111,6 @@ namespace Tango.PPC.Common.Connection MachineOperator.Adapter = response.Adapter; MachineOperator.JobHandlingMode = JobHandlerModes.SettingUp; LogManager.Log("Connecting machine operator..."); - MachineOperatorChanged?.Invoke(this, new MachineOperatorChangedEventArgs(MachineOperator, MachineOperator)); await MachineOperator.Connect(); @@ -142,7 +124,6 @@ namespace Tango.PPC.Common.Connection UsbTransportAdapter adapter = new UsbTransportAdapter(settings.EmbeddedComPort, UsbSerialBaudRates.BR_115200); MachineOperator.Adapter = adapter; MachineOperator.JobHandlingMode = JobHandlerModes.SettingUp; - MachineOperatorChanged?.Invoke(this, new MachineOperatorChangedEventArgs(MachineOperator, MachineOperator)); await MachineOperator.Connect(); await Task.Delay(1000); @@ -165,7 +146,6 @@ namespace Tango.PPC.Common.Connection MachineOperator.Adapter = adapter; MachineOperator.JobHandlingMode = JobHandlerModes.SettingUp; LogManager.Log("Connecting machine operator..."); - MachineOperatorChanged?.Invoke(this, new MachineOperatorChangedEventArgs(MachineOperator, MachineOperator)); await MachineOperator.Connect(); await Task.Delay(1000); -- cgit v1.3.1