Files
ATV_STDLabelAttach/QRValidation/Project/StateMachine/_Close.cs
atvstdla dc66158497 Add QRValidation project to repository
- Added QRValidation vision control system
- Includes CapCleaningControl UI components
- WebSocket-based barcode validation system
- Support for Crevis PLC integration
- Test projects for PLC emulator, motion, IO panel, and Modbus

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-02 11:38:38 +09:00

56 lines
1.5 KiB
C#

using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
namespace Project
{
public partial class fMain
{
/// <summary>
/// Function executed once when closing the program
/// </summary>
private void _Close_Start()
{
//동작코드off
PUB.IsTrigger[0] = PUB.IsTrigger[1] = false;
PUB.IsProcess[0] = PUB.IsProcess[1] = false;
PUB.IsLive[0] = PUB.IsLive[1] = false;
tmDisplay.Stop();
PUB.log_[0].Add("Socket close");
PUB.log_[1].Add("Socket close");
try
{
PUB.wsock_[0].Stop();
PUB.wsock_[1].Stop();
}
catch { }
//연결체크용 쓰레드 종료
bRunConnection = false;
PUB.log_[0].Add("Program Close");
PUB.log_[1].Add("Program Close");
PUB.LogFlush();
//크레비스OFF - 210203
try
{
if (PUB._hDevice[PUB.setting.CameraIndexL] > 0)
PUB._virtualFG40.AcqStop(PUB._hDevice[PUB.setting.CameraIndexL]);
if (PUB._hDevice[PUB.setting.CameraIndexR] > 0)
PUB._virtualFG40.AcqStop(PUB._hDevice[PUB.setting.CameraIndexR]);
PUB._virtualFG40.FreeSystem();
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
}
}