aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-02-07 15:39:12 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-02-07 15:39:12 +0200
commitbd3cb640be12621ac37253e8a8c627ae40692e4d (patch)
treecddc36bc95b966f48e1b7387fed1955504d3975b /Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs
parent7a1f9f14cc50001366be0efefc25fd5af403d02e (diff)
downloadTango-bd3cb640be12621ac37253e8a8c627ae40692e4d.tar.gz
Tango-bd3cb640be12621ac37253e8a8c627ae40692e4d.zip
Some fixes and improvements for PPC & Machine Studio.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs20
1 files changed, 0 insertions, 20 deletions
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;
- /// <summary>
- /// Occurs when current <see cref="IMachineOperator" /> has changed.
- /// </summary>
- public event EventHandler<MachineOperatorChangedEventArgs> MachineOperatorChanged;
-
private Machine _machine;
/// <summary>
/// Gets the database machine entity associated with the current machine.
@@ -67,24 +62,12 @@ namespace Tango.PPC.Common.Connection
}
private set
{
- var oldOperator = _machineOperator;
_machineOperator = value;
- OnMachineOperatorChanged(oldOperator, _machineOperator);
RaisePropertyChangedAuto();
}
}
/// <summary>
- /// Called when the machine operator has been changed
- /// </summary>
- /// <param name="oldOperator">The old operator.</param>
- /// <param name="newOperator">The new operator.</param>
- protected virtual void OnMachineOperatorChanged(IMachineOperator oldOperator, IMachineOperator newOperator)
- {
- MachineOperatorChanged?.Invoke(this, new MachineOperatorChangedEventArgs(oldOperator, newOperator));
- }
-
- /// <summary>
/// Initializes a new instance of the <see cref="DefaultMachineProvider"/> class.
/// </summary>
public DefaultMachineProvider()
@@ -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);