Network.Adapter, Network.Camera.CLP1611, Network.Camera.RoI Network.Tftp and Network.Telnet components added. Camera detection and live strean work OK.
This commit is contained in:
@@ -271,6 +271,7 @@ namespace DeviceTest
|
||||
operation4 = null;
|
||||
workerThreadRunning = false;
|
||||
|
||||
string initializedDeviceName = "none";
|
||||
try
|
||||
{
|
||||
if (parentFactory != null && parentCfg != null)
|
||||
@@ -291,8 +292,8 @@ namespace DeviceTest
|
||||
|
||||
foreach (var d in tbfDevices)
|
||||
{
|
||||
initializedDeviceName = d.Name;
|
||||
d.Initialize();
|
||||
Debug.WriteLine("{0}.Initialize()", d.Name);
|
||||
}
|
||||
|
||||
SaveSettings(); /// Save settings after successful initialization
|
||||
@@ -313,8 +314,10 @@ namespace DeviceTest
|
||||
workerThreadRunning = false;
|
||||
workerThread = null;
|
||||
|
||||
MessageBox.Show(string.Format("Exception: {0}", exc.Message), "Initialization failed",
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
MessageBox.Show(exc.Message,
|
||||
string.Format("'{0}' initialization failed", initializedDeviceName),
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Exclamation);
|
||||
|
||||
startButton.Enabled = true;
|
||||
stopButton.Enabled = false;
|
||||
@@ -334,6 +337,10 @@ namespace DeviceTest
|
||||
{
|
||||
operation1 = (tbfComponent4Op as TBF.BenchControl.Modbus.PressureMeter.Meret.PressureMeter).ReadPressureOp(ref floatBox);
|
||||
}
|
||||
else if (tbfComponent4Op is TBF.BenchControl.Network.Camera.CLP1611.Camera)
|
||||
{
|
||||
operation1 = (tbfComponent4Op as TBF.BenchControl.Network.Camera.CLP1611.Camera).LiveStreamOp();
|
||||
}
|
||||
|
||||
while (workerThreadRunning)
|
||||
{
|
||||
@@ -341,7 +348,7 @@ namespace DeviceTest
|
||||
|
||||
if (workerThreadRunning)
|
||||
{
|
||||
foreach (var d in tbfDevices) { d.RunDeviceBefore(); Debug.WriteLine("{0}.RunDeviceBefore()", d.Name); }
|
||||
foreach (var d in tbfDevices) d.RunDeviceBefore();
|
||||
|
||||
if (tbfComponent4Op != null)
|
||||
{
|
||||
@@ -380,11 +387,11 @@ namespace DeviceTest
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var d in tbfDevices) { d.RunDeviceAfter(); Debug.WriteLine("{0}.RunDeviceAfter()", d.Name); }
|
||||
foreach (var d in tbfDevices) d.RunDeviceAfter();
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var d in tbfDevices) { d.StopDevice(); Debug.WriteLine("{0}.StopDevice()", d.Name); }
|
||||
foreach (var d in tbfDevices) d.StopDevice();
|
||||
}
|
||||
|
||||
private void stopButton_Click(object sender, EventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user