﻿Imports System
Imports System.Linq
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Text
Imports System.Windows.Forms
Imports System.Runtime.InteropServices
Imports Bt
Imports Bt.ScanLib
'Imports KDPP5000.BtScanLib
Imports BTClientLib
Imports System.IO
Imports System.Reflection
Imports BtScan2

Public Class frm5045
    Inherits System.Windows.Forms.Form
    Private btScanLib As BtScanLib
    Private scanHandler As Boolean = False
    'Private dbClient As BtrieveDbClient
    Private tmpStr As List(Of Dictionary(Of String, String))
    Private affected_rows As Integer

#Region " Windows tH[€ fUCiลถฌณ๊ฝR[h "

    Public Sub New()
        MyBase.New()

        ' ฑฬฤัoตอ Windows tH[€ fUCiล•K—vลทB
        InitializeComponent()

        ' InitializeComponent() ฤัoตฬใษ๚ป๐’วมตทB

    End Sub

    ' Form อAR“|[l“g๊——ษใ—๐ภsท้ฝ฿ษ dispose ๐I[o[ChตทB
    'Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
    '    If disposing Then
    '        If Not (components Is Nothing) Then
    '            components.Dispose()
    '        End If
    '    End If
    '    MyBase.Dispose(disposing)
    'End Sub

    ' Windows tH[€ fUCiล•K—vลทB
    'Private components As System.ComponentModel.IContainer

    '  : ศบฬvV[WอAWindows tH[€ fUCiล•K—vลทB
    'Windows tH[€ fUCi๐gมฤ•ฯXตฤญพณขB  
    ' R[h GfB^๐gมฤ•ฯXตศขลญพณขB
    'Friend WithEvents WarpCtrl1 As WarpControl.WarpCtrl
    'Friend WithEvents WarpHWBcr1 As WarpControl.WarpHWBcr
    'Friend WithEvents WarpBox1 As WarpControl.WarpBox
    'Friend WithEvents WarpField1 As WarpControl.WarpField
    'Friend WithEvents WarpFrame1 As WarpControl.WarpFrame
    'Friend WithEvents WarpField3 As WarpControl.WarpField
    'Friend WithEvents WarpField5 As WarpControl.WarpField
    'Friend WithEvents WarpField7 As WarpControl.WarpField
    'Friend WithEvents WarpField8 As WarpControl.WarpField
    'Friend WithEvents wfName As WarpControl.WarpField
    'Friend WithEvents WarpField4 As WarpControl.WarpField
    'Friend WithEvents WarpField6 As WarpControl.WarpField
    'Friend WithEvents WarpField11 As WarpControl.WarpField
    'Friend WithEvents wfPut1 As WarpControl.WarpField
    'Friend WithEvents wfID2 As WarpControl.WarpField
    'Friend WithEvents wfID3 As WarpControl.WarpField
    'Friend WithEvents wfID4 As WarpControl.WarpField
    'Friend WithEvents wfID5 As WarpControl.WarpField
    'Friend WithEvents wfPart2 As WarpControl.WarpField
    'Friend WithEvents wfPart3 As WarpControl.WarpField
    'Friend WithEvents wfPart4 As WarpControl.WarpField
    'Friend WithEvents wfPart5 As WarpControl.WarpField
    'Friend WithEvents wfCL2 As WarpControl.WarpField
    'Friend WithEvents wfCL3 As WarpControl.WarpField
    'Friend WithEvents wfCL4 As WarpControl.WarpField
    'Friend WithEvents wfCL5 As WarpControl.WarpField
    'Friend WithEvents wfZnc2 As WarpControl.WarpField
    'Friend WithEvents wfZnc3 As WarpControl.WarpField
    'Friend WithEvents wfZnc4 As WarpControl.WarpField
    'Friend WithEvents wfZnc5 As WarpControl.WarpField
    'Friend WithEvents wfSerial2 As WarpControl.WarpField
    'Friend WithEvents wfSerial3 As WarpControl.WarpField
    'Friend WithEvents wfSerial4 As WarpControl.WarpField
    'Friend WithEvents wfSerial5 As WarpControl.WarpField
    'Friend WithEvents wfID1 As WarpControl.WarpField
    'Friend WithEvents wfSerial1 As WarpControl.WarpField
    'Friend WithEvents wfZnc1 As WarpControl.WarpField
    'Friend WithEvents wfCL1 As WarpControl.WarpField
    'Friend WithEvents wfPart1 As WarpControl.WarpField
    'Friend WithEvents wfInput As WarpControl.WarpField
    'Friend WithEvents wfCrtnNo As WarpControl.WarpField

    '<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
    '    Me.WarpFrame1 = New WarpControl.WarpFrame()
    '    Me.wfInput = New WarpControl.WarpField()
    '    Me.wfSerial5 = New WarpControl.WarpField()
    '    Me.wfSerial4 = New WarpControl.WarpField()
    '    Me.wfSerial3 = New WarpControl.WarpField()
    '    Me.wfSerial2 = New WarpControl.WarpField()
    '    Me.wfZnc5 = New WarpControl.WarpField()
    '    Me.wfZnc4 = New WarpControl.WarpField()
    '    Me.wfZnc3 = New WarpControl.WarpField()
    '    Me.wfZnc2 = New WarpControl.WarpField()
    '    Me.wfCL5 = New WarpControl.WarpField()
    '    Me.wfCL4 = New WarpControl.WarpField()
    '    Me.wfCL3 = New WarpControl.WarpField()
    '    Me.wfCL2 = New WarpControl.WarpField()
    '    Me.wfPart5 = New WarpControl.WarpField()
    '    Me.wfPart4 = New WarpControl.WarpField()
    '    Me.wfPart3 = New WarpControl.WarpField()
    '    Me.wfPart2 = New WarpControl.WarpField()
    '    Me.wfID5 = New WarpControl.WarpField()
    '    Me.wfID4 = New WarpControl.WarpField()
    '    Me.wfID3 = New WarpControl.WarpField()
    '    Me.wfID2 = New WarpControl.WarpField()
    '    Me.WarpField11 = New WarpControl.WarpField()
    '    Me.WarpField6 = New WarpControl.WarpField()
    '    Me.WarpField4 = New WarpControl.WarpField()
    '    Me.wfID1 = New WarpControl.WarpField()
    '    Me.wfSerial1 = New WarpControl.WarpField()
    '    Me.wfPut1 = New WarpControl.WarpField()
    '    Me.wfZnc1 = New WarpControl.WarpField()
    '    Me.wfCL1 = New WarpControl.WarpField()
    '    Me.WarpField8 = New WarpControl.WarpField()
    '    Me.WarpField7 = New WarpControl.WarpField()
    '    Me.wfPart1 = New WarpControl.WarpField()
    '    Me.WarpField5 = New WarpControl.WarpField()
    '    Me.wfCrtnNo = New WarpControl.WarpField()
    '    Me.WarpField3 = New WarpControl.WarpField()
    '    Me.WarpField1 = New WarpControl.WarpField()
    '    Me.WarpBox1 = New WarpControl.WarpBox()
    '    Me.wfName = New WarpControl.WarpField()
    '    Me.WarpHWBcr1 = New WarpControl.WarpHWBcr()
    '    Me.WarpFrame1.SuspendLayout()
    '    Me.SuspendLayout()
    '    '
    '    'WarpFrame1
    '    '
    '    Me.WarpFrame1.Controls.Add(Me.wfInput)
    '    Me.WarpFrame1.Controls.Add(Me.wfSerial5)
    '    Me.WarpFrame1.Controls.Add(Me.wfSerial4)
    '    Me.WarpFrame1.Controls.Add(Me.wfSerial3)
    '    Me.WarpFrame1.Controls.Add(Me.wfSerial2)
    '    Me.WarpFrame1.Controls.Add(Me.wfZnc5)
    '    Me.WarpFrame1.Controls.Add(Me.wfZnc4)
    '    Me.WarpFrame1.Controls.Add(Me.wfZnc3)
    '    Me.WarpFrame1.Controls.Add(Me.wfZnc2)
    '    Me.WarpFrame1.Controls.Add(Me.wfCL5)
    '    Me.WarpFrame1.Controls.Add(Me.wfCL4)
    '    Me.WarpFrame1.Controls.Add(Me.wfCL3)
    '    Me.WarpFrame1.Controls.Add(Me.wfCL2)
    '    Me.WarpFrame1.Controls.Add(Me.wfPart5)
    '    Me.WarpFrame1.Controls.Add(Me.wfPart4)
    '    Me.WarpFrame1.Controls.Add(Me.wfPart3)
    '    Me.WarpFrame1.Controls.Add(Me.wfPart2)
    '    Me.WarpFrame1.Controls.Add(Me.wfID5)
    '    Me.WarpFrame1.Controls.Add(Me.wfID4)
    '    Me.WarpFrame1.Controls.Add(Me.wfID3)
    '    Me.WarpFrame1.Controls.Add(Me.wfID2)
    '    Me.WarpFrame1.Controls.Add(Me.WarpField11)
    '    Me.WarpFrame1.Controls.Add(Me.WarpField6)
    '    Me.WarpFrame1.Controls.Add(Me.WarpField4)
    '    Me.WarpFrame1.Controls.Add(Me.wfID1)
    '    Me.WarpFrame1.Controls.Add(Me.wfSerial1)
    '    Me.WarpFrame1.Controls.Add(Me.wfPut1)
    '    Me.WarpFrame1.Controls.Add(Me.wfZnc1)
    '    Me.WarpFrame1.Controls.Add(Me.wfCL1)
    '    Me.WarpFrame1.Controls.Add(Me.WarpField8)
    '    Me.WarpFrame1.Controls.Add(Me.WarpField7)
    '    Me.WarpFrame1.Controls.Add(Me.wfPart1)
    '    Me.WarpFrame1.Controls.Add(Me.WarpField5)
    '    Me.WarpFrame1.Controls.Add(Me.wfCrtnNo)
    '    Me.WarpFrame1.Controls.Add(Me.WarpField3)
    '    Me.WarpFrame1.Controls.Add(Me.WarpField1)
    '    Me.WarpFrame1.Controls.Add(Me.WarpBox1)
    '    Me.WarpFrame1.Controls.Add(Me.wfName)
    '    Me.WarpFrame1.Font = New System.Drawing.Font("MS UI Gothic", 9.0!)
    '    Me.WarpFrame1.Location = New System.Drawing.Point(0, 0)
    '    Me.WarpFrame1.Name = "WarpFrame1"
    '    Me.WarpFrame1.Size = New System.Drawing.Size(240, 296)
    '    Me.WarpFrame1.TabIndex = 1
    '    Me.WarpFrame1.Text = "WarpFrame1"
    '    Me.WarpFrame1.UseMacro = False
    '    Me.WarpFrame1.UseMacroFileName = ""
    '    '
    '    'wfInput
    '    '
    '    Me.wfInput.BcrFlag = True
    '    Me.wfInput.DecimalPointPosition = CType(0, Short)
    '    Me.wfInput.Font = New System.Drawing.Font("lr SVbN", 16.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel)
    '    Me.wfInput.FontSize = WarpControl.FontSizes.Small4
    '    Me.wfInput.Format = ""
    '    Me.wfInput.InputMode.Secret = True
    '    Me.wfInput.Length = CType(1, Short)
    '    Me.wfInput.Location = New System.Drawing.Point(105, 168)
    '    Me.wfInput.MacroBcr = ""
    '    Me.wfInput.MacroIn = ""
    '    Me.wfInput.MacroKey = ""
    '    Me.wfInput.MacroOut = ""
    '    Me.wfInput.Name = "wfInput"
    '    Me.wfInput.Size = New System.Drawing.Size(9, 18)
    '    Me.wfInput.TabIndex = CType(41, Short)
    '    '
    '    'wfSerial5
    '    '
    '    Me.wfSerial5.BcrFlag = True
    '    Me.wfSerial5.DecimalPointPosition = CType(0, Short)
    '    Me.wfSerial5.Font = New System.Drawing.Font("lr SVbN", 16.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel)
    '    Me.wfSerial5.FontSize = WarpControl.FontSizes.Small4
    '    Me.wfSerial5.Format = ""
    '    Me.wfSerial5.Length = CType(6, Short)
    '    Me.wfSerial5.Location = New System.Drawing.Point(180, 144)
    '    Me.wfSerial5.MacroBcr = ""
    '    Me.wfSerial5.MacroIn = ""
    '    Me.wfSerial5.MacroKey = ""
    '    Me.wfSerial5.MacroOut = ""
    '    Me.wfSerial5.Name = "wfSerial5"
    '    Me.wfSerial5.Size = New System.Drawing.Size(54, 18)
    '    Me.wfSerial5.TabIndex = CType(40, Short)
    '    Me.wfSerial5.Text = "XXXXXX"
    '    '
    '    'wfSerial4
    '    '
    '    Me.wfSerial4.BcrFlag = True
    '    Me.wfSerial4.DecimalPointPosition = CType(0, Short)
    '    Me.wfSerial4.Font = New System.Drawing.Font("lr SVbN", 16.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel)
    '    Me.wfSerial4.FontSize = WarpControl.FontSizes.Small4
    '    Me.wfSerial4.Format = ""
    '    Me.wfSerial4.Length = CType(6, Short)
    '    Me.wfSerial4.Location = New System.Drawing.Point(180, 120)
    '    Me.wfSerial4.MacroBcr = ""
    '    Me.wfSerial4.MacroIn = ""
    '    Me.wfSerial4.MacroKey = ""
    '    Me.wfSerial4.MacroOut = ""
    '    Me.wfSerial4.Name = "wfSerial4"
    '    Me.wfSerial4.Size = New System.Drawing.Size(54, 18)
    '    Me.wfSerial4.TabIndex = CType(39, Short)
    '    Me.wfSerial4.Text = "XXXXXX"
    '    '
    '    'wfSerial3
    '    '
    '    Me.wfSerial3.BcrFlag = True
    '    Me.wfSerial3.DecimalPointPosition = CType(0, Short)
    '    Me.wfSerial3.Font = New System.Drawing.Font("lr SVbN", 16.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel)
    '    Me.wfSerial3.FontSize = WarpControl.FontSizes.Small4
    '    Me.wfSerial3.Format = ""
    '    Me.wfSerial3.Length = CType(6, Short)
    '    Me.wfSerial3.Location = New System.Drawing.Point(180, 96)
    '    Me.wfSerial3.MacroBcr = ""
    '    Me.wfSerial3.MacroIn = ""
    '    Me.wfSerial3.MacroKey = ""
    '    Me.wfSerial3.MacroOut = ""
    '    Me.wfSerial3.Name = "wfSerial3"
    '    Me.wfSerial3.Size = New System.Drawing.Size(54, 18)
    '    Me.wfSerial3.TabIndex = CType(38, Short)
    '    Me.wfSerial3.Text = "XXXXXX"
    '    '
    '    'wfSerial2
    '    '
    '    Me.wfSerial2.BcrFlag = True
    '    Me.wfSerial2.DecimalPointPosition = CType(0, Short)
    '    Me.wfSerial2.Font = New System.Drawing.Font("lr SVbN", 16.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel)
    '    Me.wfSerial2.FontSize = WarpControl.FontSizes.Small4
    '    Me.wfSerial2.Format = ""
    '    Me.wfSerial2.Length = CType(6, Short)
    '    Me.wfSerial2.Location = New System.Drawing.Point(180, 72)
    '    Me.wfSerial2.MacroBcr = ""
    '    Me.wfSerial2.MacroIn = ""
    '    Me.wfSerial2.MacroKey = ""
    '    Me.wfSerial2.MacroOut = ""
    '    Me.wfSerial2.Name = "wfSerial2"
    '    Me.wfSerial2.Size = New System.Drawing.Size(54, 18)
    '    Me.wfSerial2.TabIndex = CType(37, Short)
    '    Me.wfSerial2.Text = "XXXXXX"
    '    '
    '    'wfZnc5
    '    '
    '    Me.wfZnc5.DecimalPointPosition = CType(0, Short)
    '    Me.wfZnc5.Font = New System.Drawing.Font("lr SVbN", 16.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel)
    '    Me.wfZnc5.FontSize = WarpControl.FontSizes.Small4
    '    Me.wfZnc5.Format = ""
    '    Me.wfZnc5.Length = CType(1, Short)
    '    Me.wfZnc5.Location = New System.Drawing.Point(157, 144)
    '    Me.wfZnc5.MacroBcr = ""
    '    Me.wfZnc5.MacroIn = ""
    '    Me.wfZnc5.MacroKey = ""
    '    Me.wfZnc5.MacroOut = ""
    '    Me.wfZnc5.Name = "wfZnc5"
    '    Me.wfZnc5.Size = New System.Drawing.Size(9, 18)
    '    Me.wfZnc5.TabIndex = CType(36, Short)
    '    Me.wfZnc5.Text = "X"
    '    '
    '    'wfZnc4
    '    '
    '    Me.wfZnc4.DecimalPointPosition = CType(0, Short)
    '    Me.wfZnc4.Font = New System.Drawing.Font("lr SVbN", 16.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel)
    '    Me.wfZnc4.FontSize = WarpControl.FontSizes.Small4
    '    Me.wfZnc4.Format = ""
    '    Me.wfZnc4.Length = CType(1, Short)
    '    Me.wfZnc4.Location = New System.Drawing.Point(157, 120)
    '    Me.wfZnc4.MacroBcr = ""
    '    Me.wfZnc4.MacroIn = ""
    '    Me.wfZnc4.MacroKey = ""
    '    Me.wfZnc4.MacroOut = ""
    '    Me.wfZnc4.Name = "wfZnc4"
    '    Me.wfZnc4.Size = New System.Drawing.Size(9, 18)
    '    Me.wfZnc4.TabIndex = CType(35, Short)
    '    Me.wfZnc4.Text = "X"
    '    '
    '    'wfZnc3
    '    '
    '    Me.wfZnc3.DecimalPointPosition = CType(0, Short)
    '    Me.wfZnc3.Font = New System.Drawing.Font("lr SVbN", 16.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel)
    '    Me.wfZnc3.FontSize = WarpControl.FontSizes.Small4
    '    Me.wfZnc3.Format = ""
    '    Me.wfZnc3.Length = CType(1, Short)
    '    Me.wfZnc3.Location = New System.Drawing.Point(157, 96)
    '    Me.wfZnc3.MacroBcr = ""
    '    Me.wfZnc3.MacroIn = ""
    '    Me.wfZnc3.MacroKey = ""
    '    Me.wfZnc3.MacroOut = ""
    '    Me.wfZnc3.Name = "wfZnc3"
    '    Me.wfZnc3.Size = New System.Drawing.Size(9, 18)
    '    Me.wfZnc3.TabIndex = CType(34, Short)
    '    Me.wfZnc3.Text = "X"
    '    '
    '    'wfZnc2
    '    '
    '    Me.wfZnc2.DecimalPointPosition = CType(0, Short)
    '    Me.wfZnc2.Font = New System.Drawing.Font("lr SVbN", 16.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel)
    '    Me.wfZnc2.FontSize = WarpControl.FontSizes.Small4
    '    Me.wfZnc2.Format = ""
    '    Me.wfZnc2.Length = CType(1, Short)
    '    Me.wfZnc2.Location = New System.Drawing.Point(157, 72)
    '    Me.wfZnc2.MacroBcr = ""
    '    Me.wfZnc2.MacroIn = ""
    '    Me.wfZnc2.MacroKey = ""
    '    Me.wfZnc2.MacroOut = ""
    '    Me.wfZnc2.Name = "wfZnc2"
    '    Me.wfZnc2.Size = New System.Drawing.Size(9, 18)
    '    Me.wfZnc2.TabIndex = CType(33, Short)
    '    Me.wfZnc2.Text = "X"
    '    '
    '    'wfCL5
    '    '
    '    Me.wfCL5.DecimalPointPosition = CType(0, Short)
    '    Me.wfCL5.Font = New System.Drawing.Font("lr SVbN", 16.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel)
    '    Me.wfCL5.FontSize = WarpControl.FontSizes.Small4
    '    Me.wfCL5.Format = ""
    '    Me.wfCL5.Length = CType(2, Short)
    '    Me.wfCL5.Location = New System.Drawing.Point(132, 144)
    '    Me.wfCL5.MacroBcr = ""
    '    Me.wfCL5.MacroIn = ""
    '    Me.wfCL5.MacroKey = ""
    '    Me.wfCL5.MacroOut = ""
    '    Me.wfCL5.Name = "wfCL5"
    '    Me.wfCL5.Size = New System.Drawing.Size(18, 18)
    '    Me.wfCL5.TabIndex = CType(32, Short)
    '    Me.wfCL5.Text = "XX"
    '    '
    '    'wfCL4
    '    '
    '    Me.wfCL4.DecimalPointPosition = CType(0, Short)
    '    Me.wfCL4.Font = New System.Drawing.Font("lr SVbN", 16.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel)
    '    Me.wfCL4.FontSize = WarpControl.FontSizes.Small4
    '    Me.wfCL4.Format = ""
    '    Me.wfCL4.Length = CType(2, Short)
    '    Me.wfCL4.Location = New System.Drawing.Point(132, 120)
    '    Me.wfCL4.MacroBcr = ""
    '    Me.wfCL4.MacroIn = ""
    '    Me.wfCL4.MacroKey = ""
    '    Me.wfCL4.MacroOut = ""
    '    Me.wfCL4.Name = "wfCL4"
    '    Me.wfCL4.Size = New System.Drawing.Size(18, 18)
    '    Me.wfCL4.TabIndex = CType(31, Short)
    '    Me.wfCL4.Text = "XX"
    '    '
    '    'wfCL3
    '    '
    '    Me.wfCL3.DecimalPointPosition = CType(0, Short)
    '    Me.wfCL3.Font = New System.Drawing.Font("lr SVbN", 16.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel)
    '    Me.wfCL3.FontSize = WarpControl.FontSizes.Small4
    '    Me.wfCL3.Format = ""
    '    Me.wfCL3.Length = CType(2, Short)
    '    Me.wfCL3.Location = New System.Drawing.Point(132, 96)
    '    Me.wfCL3.MacroBcr = ""
    '    Me.wfCL3.MacroIn = ""
    '    Me.wfCL3.MacroKey = ""
    '    Me.wfCL3.MacroOut = ""
    '    Me.wfCL3.Name = "wfCL3"
    '    Me.wfCL3.Size = New System.Drawing.Size(18, 18)
    '    Me.wfCL3.TabIndex = CType(30, Short)
    '    Me.wfCL3.Text = "XX"
    '    '
    '    'wfCL2
    '    '
    '    Me.wfCL2.DecimalPointPosition = CType(0, Short)
    '    Me.wfCL2.Font = New System.Drawing.Font("lr SVbN", 16.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel)
    '    Me.wfCL2.FontSize = WarpControl.FontSizes.Small4
    '    Me.wfCL2.Format = ""
    '    Me.wfCL2.Length = CType(2, Short)
    '    Me.wfCL2.Location = New System.Drawing.Point(132, 72)
    '    Me.wfCL2.MacroBcr = ""
    '    Me.wfCL2.MacroIn = ""
    '    Me.wfCL2.MacroKey = ""
    '    Me.wfCL2.MacroOut = ""
    '    Me.wfCL2.Name = "wfCL2"
    '    Me.wfCL2.Size = New System.Drawing.Size(18, 18)
    '    Me.wfCL2.TabIndex = CType(29, Short)
    '    Me.wfCL2.Text = "XX"
    '    '
    '    'wfPart5
    '    '
    '    Me.wfPart5.BcrFlag = True
    '    Me.wfPart5.DecimalPointPosition = CType(0, Short)
    '    Me.wfPart5.Font = New System.Drawing.Font("lr SVbN", 16.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel)
    '    Me.wfPart5.FontSize = WarpControl.FontSizes.Small4
    '    Me.wfPart5.Format = ""
    '    Me.wfPart5.Length = CType(12, Short)
    '    Me.wfPart5.Location = New System.Drawing.Point(18, 144)
    '    Me.wfPart5.MacroBcr = ""
    '    Me.wfPart5.MacroIn = ""
    '    Me.wfPart5.MacroKey = ""
    '    Me.wfPart5.MacroOut = ""
    '    Me.wfPart5.Name = "wfPart5"
    '    Me.wfPart5.Size = New System.Drawing.Size(108, 18)
    '    Me.wfPart5.TabIndex = CType(28, Short)
    '    Me.wfPart5.Text = "XXXX-XX-XXXX"
    '    '
    '    'wfPart4
    '    '
    '    Me.wfPart4.BcrFlag = True
    '    Me.wfPart4.DecimalPointPosition = CType(0, Short)
    '    Me.wfPart4.Font = New System.Drawing.Font("lr SVbN", 16.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel)
    '    Me.wfPart4.FontSize = WarpControl.FontSizes.Small4
    '    Me.wfPart4.Format = ""
    '    Me.wfPart4.Length = CType(12, Short)
    '    Me.wfPart4.Location = New System.Drawing.Point(18, 120)
    '    Me.wfPart4.MacroBcr = ""
    '    Me.wfPart4.MacroIn = ""
    '    Me.wfPart4.MacroKey = ""
    '    Me.wfPart4.MacroOut = ""
    '    Me.wfPart4.Name = "wfPart4"
    '    Me.wfPart4.Size = New System.Drawing.Size(108, 18)
    '    Me.wfPart4.TabIndex = CType(27, Short)
    '    Me.wfPart4.Text = "XXXX-XX-XXXX"
    '    '
    '    'wfPart3
    '    '
    '    Me.wfPart3.BcrFlag = True
    '    Me.wfPart3.DecimalPointPosition = CType(0, Short)
    '    Me.wfPart3.Font = New System.Drawing.Font("lr SVbN", 16.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel)
    '    Me.wfPart3.FontSize = WarpControl.FontSizes.Small4
    '    Me.wfPart3.Format = ""
    '    Me.wfPart3.Length = CType(12, Short)
    '    Me.wfPart3.Location = New System.Drawing.Point(18, 96)
    '    Me.wfPart3.MacroBcr = ""
    '    Me.wfPart3.MacroIn = ""
    '    Me.wfPart3.MacroKey = ""
    '    Me.wfPart3.MacroOut = ""
    '    Me.wfPart3.Name = "wfPart3"
    '    Me.wfPart3.Size = New System.Drawing.Size(108, 18)
    '    Me.wfPart3.TabIndex = CType(26, Short)
    '    Me.wfPart3.Text = "XXXX-XX-XXXX"
    '    '
    '    'wfPart2
    '    '
    '    Me.wfPart2.BcrFlag = True
    '    Me.wfPart2.DecimalPointPosition = CType(0, Short)
    '    Me.wfPart2.Font = New System.Drawing.Font("lr SVbN", 16.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel)
    '    Me.wfPart2.FontSize = WarpControl.FontSizes.Small4
    '    Me.wfPart2.Format = ""
    '    Me.wfPart2.Length = CType(12, Short)
    '    Me.wfPart2.Location = New System.Drawing.Point(18, 72)
    '    Me.wfPart2.MacroBcr = ""
    '    Me.wfPart2.MacroIn = ""
    '    Me.wfPart2.MacroKey = ""
    '    Me.wfPart2.MacroOut = ""
    '    Me.wfPart2.Name = "wfPart2"
    '    Me.wfPart2.Size = New System.Drawing.Size(108, 18)
    '    Me.wfPart2.TabIndex = CType(25, Short)
    '    Me.wfPart2.Text = "XXXX-XX-XXXX"
    '    '
    '    'wfID5
    '    '
    '    Me.wfID5.DecimalPointPosition = CType(0, Short)
    '    Me.wfID5.Font = New System.Drawing.Font("lr SVbN", 16.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel)
    '    Me.wfID5.FontSize = WarpControl.FontSizes.Small4
    '    Me.wfID5.Format = ""
    '    Me.wfID5.Length = CType(1, Short)
    '    Me.wfID5.Location = New System.Drawing.Point(3, 144)
    '    Me.wfID5.MacroBcr = ""
    '    Me.wfID5.MacroIn = ""
    '    Me.wfID5.MacroKey = ""
    '    Me.wfID5.MacroOut = ""
    '    Me.wfID5.Name = "wfID5"
    '    Me.wfID5.Size = New System.Drawing.Size(9, 18)
    '    Me.wfID5.TabIndex = CType(24, Short)
    '    Me.wfID5.Text = "X"
    '    '
    '    'wfID4
    '    '
    '    Me.wfID4.DecimalPointPosition = CType(0, Short)
    '    Me.wfID4.Font = New System.Drawing.Font("lr SVbN", 16.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel)
    '    Me.wfID4.FontSize = WarpControl.FontSizes.Small4
    '    Me.wfID4.Format = ""
    '    Me.wfID4.Length = CType(1, Short)
    '    Me.wfID4.Location = New System.Drawing.Point(3, 120)
    '    Me.wfID4.MacroBcr = ""
    '    Me.wfID4.MacroIn = ""
    '    Me.wfID4.MacroKey = ""
    '    Me.wfID4.MacroOut = ""
    '    Me.wfID4.Name = "wfID4"
    '    Me.wfID4.Size = New System.Drawing.Size(9, 18)
    '    Me.wfID4.TabIndex = CType(23, Short)
    '    Me.wfID4.Text = "X"
    '    '
    '    'wfID3
    '    '
    '    Me.wfID3.DecimalPointPosition = CType(0, Short)
    '    Me.wfID3.Font = New System.Drawing.Font("lr SVbN", 16.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel)
    '    Me.wfID3.FontSize = WarpControl.FontSizes.Small4
    '    Me.wfID3.Format = ""
    '    Me.wfID3.Length = CType(1, Short)
    '    Me.wfID3.Location = New System.Drawing.Point(3, 96)
    '    Me.wfID3.MacroBcr = ""
    '    Me.wfID3.MacroIn = ""
    '    Me.wfID3.MacroKey = ""
    '    Me.wfID3.MacroOut = ""
    '    Me.wfID3.Name = "wfID3"
    '    Me.wfID3.Size = New System.Drawing.Size(9, 18)
    '    Me.wfID3.TabIndex = CType(22, Short)
    '    Me.wfID3.Text = "X"
    '    '
    '    'wfID2
    '    '
    '    Me.wfID2.DecimalPointPosition = CType(0, Short)
    '    Me.wfID2.Font = New System.Drawing.Font("lr SVbN", 16.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel)
    '    Me.wfID2.FontSize = WarpControl.FontSizes.Small4
    '    Me.wfID2.Format = ""
    '    Me.wfID2.Length = CType(1, Short)
    '    Me.wfID2.Location = New System.Drawing.Point(3, 72)
    '    Me.wfID2.MacroBcr = ""
    '    Me.wfID2.MacroIn = ""
    '    Me.wfID2.MacroKey = ""
    '    Me.wfID2.MacroOut = ""
    '    Me.wfID2.Name = "wfID2"
    '    Me.wfID2.Size = New System.Drawing.Size(9, 18)
    '    Me.wfID2.TabIndex = CType(21, Short)
    '    Me.wfID2.Text = "X"
    '    '
    '    'WarpField11
    '    '
    '    Me.WarpField11.DecimalPointPosition = CType(0, Short)
    '    Me.WarpField11.Font = New System.Drawing.Font("lr SVbN", 16.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel)
    '    Me.WarpField11.FontSize = WarpControl.FontSizes.Small4
    '    Me.WarpField11.Format = ""
    '    Me.WarpField11.Length = CType(5, Short)
    '    Me.WarpField11.Location = New System.Drawing.Point(138, 172)
    '    Me.WarpField11.MacroBcr = ""
    '    Me.WarpField11.MacroIn = ""
    '    Me.WarpField11.MacroKey = ""
    '    Me.WarpField11.MacroOut = ""
    '    Me.WarpField11.Name = "WarpField11"
    '    Me.WarpField11.Size = New System.Drawing.Size(45, 18)
    '    Me.WarpField11.TabIndex = CType(18, Short)
    '    Me.WarpField11.Text = "Total"
    '    '
    '    'WarpField6
    '    '
    '    Me.WarpField6.DecimalPointPosition = CType(0, Short)
    '    Me.WarpField6.DisplayAttribute.Bold = True
    '    Me.WarpField6.Font = New System.Drawing.Font("lr SVbN", 16.5!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel)
    '    Me.WarpField6.FontSize = WarpControl.FontSizes.Small4
    '    Me.WarpField6.Format = ""
    '    Me.WarpField6.Length = CType(6, Short)
    '    Me.WarpField6.Location = New System.Drawing.Point(180, 24)
    '    Me.WarpField6.MacroBcr = ""
    '    Me.WarpField6.MacroIn = ""
    '    Me.WarpField6.MacroKey = ""
    '    Me.WarpField6.MacroOut = ""
    '    Me.WarpField6.Name = "WarpField6"
    '    Me.WarpField6.Size = New System.Drawing.Size(54, 18)
    '    Me.WarpField6.TabIndex = CType(17, Short)
    '    Me.WarpField6.Text = "Serial"
    '    '
    '    'WarpField4
    '    '
    '    Me.WarpField4.DecimalPointPosition = CType(0, Short)
    '    Me.WarpField4.DisplayAttribute.Bold = True
    '    Me.WarpField4.Font = New System.Drawing.Font("lr SVbN", 16.5!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel)
    '    Me.WarpField4.FontSize = WarpControl.FontSizes.Small4
    '    Me.WarpField4.Format = ""
    '    Me.WarpField4.Length = CType(2, Short)
    '    Me.WarpField4.Location = New System.Drawing.Point(1, 24)
    '    Me.WarpField4.MacroBcr = ""
    '    Me.WarpField4.MacroIn = ""
    '    Me.WarpField4.MacroKey = ""
    '    Me.WarpField4.MacroOut = ""
    '    Me.WarpField4.Name = "WarpField4"
    '    Me.WarpField4.Size = New System.Drawing.Size(18, 18)
    '    Me.WarpField4.TabIndex = CType(2, Short)
    '    Me.WarpField4.Text = "ID"
    '    '
    '    'wfID1
    '    '
    '    Me.wfID1.DecimalPointPosition = CType(0, Short)
    '    Me.wfID1.Font = New System.Drawing.Font("lr SVbN", 16.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel)
    '    Me.wfID1.FontSize = WarpControl.FontSizes.Small4
    '    Me.wfID1.Format = ""
    '    Me.wfID1.Length = CType(1, Short)
    '    Me.wfID1.Location = New System.Drawing.Point(3, 48)
    '    Me.wfID1.MacroBcr = ""
    '    Me.wfID1.MacroIn = ""
    '    Me.wfID1.MacroKey = ""
    '    Me.wfID1.MacroOut = ""
    '    Me.wfID1.Name = "wfID1"
    '    Me.wfID1.Size = New System.Drawing.Size(9, 18)
    '    Me.wfID1.TabIndex = CType(16, Short)
    '    Me.wfID1.Text = "X"
    '    '
    '    'wfSerial1
    '    '
    '    Me.wfSerial1.BcrFlag = True
    '    Me.wfSerial1.DecimalPointPosition = CType(0, Short)
    '    Me.wfSerial1.Font = New System.Drawing.Font("lr SVbN", 16.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel)
    '    Me.wfSerial1.FontSize = WarpControl.FontSizes.Small4
    '    Me.wfSerial1.Format = ""
    '    Me.wfSerial1.Length = CType(6, Short)
    '    Me.wfSerial1.Location = New System.Drawing.Point(180, 48)
    '    Me.wfSerial1.MacroBcr = ""
    '    Me.wfSerial1.MacroIn = ""
    '    Me.wfSerial1.MacroKey = ""
    '    Me.wfSerial1.MacroOut = ""
    '    Me.wfSerial1.Name = "wfSerial1"
    '    Me.wfSerial1.Size = New System.Drawing.Size(54, 18)
    '    Me.wfSerial1.TabIndex = CType(15, Short)
    '    Me.wfSerial1.Text = "XXXXXX"
    '    '
    '    'wfPut1
    '    '
    '    Me.wfPut1.DecimalPointPosition = CType(0, Short)
    '    Me.wfPut1.DisplayAttribute.Bold = True
    '    Me.wfPut1.Font = New System.Drawing.Font("lr SVbN", 16.5!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel)
    '    Me.wfPut1.FontSize = WarpControl.FontSizes.Small4
    '    Me.wfPut1.Format = ""
    '    Me.wfPut1.Length = CType(4, Short)
    '    Me.wfPut1.Location = New System.Drawing.Point(192, 172)
    '    Me.wfPut1.MacroBcr = ""
    '    Me.wfPut1.MacroIn = ""
    '    Me.wfPut1.MacroKey = ""
    '    Me.wfPut1.MacroOut = ""
    '    Me.wfPut1.Name = "wfPut1"
    '    Me.wfPut1.Size = New System.Drawing.Size(36, 18)
    '    Me.wfPut1.TabIndex = CType(14, Short)
    '    Me.wfPut1.Text = "ZZZZ"
    '    '
    '    'wfZnc1
    '    '
    '    Me.wfZnc1.DecimalPointPosition = CType(0, Short)
    '    Me.wfZnc1.Font = New System.Drawing.Font("lr SVbN", 16.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel)
    '    Me.wfZnc1.FontSize = WarpControl.FontSizes.Small4
    '    Me.wfZnc1.Format = ""
    '    Me.wfZnc1.Length = CType(1, Short)
    '    Me.wfZnc1.Location = New System.Drawing.Point(157, 48)
    '    Me.wfZnc1.MacroBcr = ""
    '    Me.wfZnc1.MacroIn = ""
    '    Me.wfZnc1.MacroKey = ""
    '    Me.wfZnc1.MacroOut = ""
    '    Me.wfZnc1.Name = "wfZnc1"
    '    Me.wfZnc1.Size = New System.Drawing.Size(9, 18)
    '    Me.wfZnc1.TabIndex = CType(12, Short)
    '    Me.wfZnc1.Text = "X"
    '    '
    '    'wfCL1
    '    '
    '    Me.wfCL1.DecimalPointPosition = CType(0, Short)
    '    Me.wfCL1.Font = New System.Drawing.Font("lr SVbN", 16.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel)
    '    Me.wfCL1.FontSize = WarpControl.FontSizes.Small4
    '    Me.wfCL1.Format = ""
    '    Me.wfCL1.Length = CType(2, Short)
    '    Me.wfCL1.Location = New System.Drawing.Point(132, 48)
    '    Me.wfCL1.MacroBcr = ""
    '    Me.wfCL1.MacroIn = ""
    '    Me.wfCL1.MacroKey = ""
    '    Me.wfCL1.MacroOut = ""
    '    Me.wfCL1.Name = "wfCL1"
    '    Me.wfCL1.Size = New System.Drawing.Size(18, 18)
    '    Me.wfCL1.TabIndex = CType(11, Short)
    '    Me.wfCL1.Text = "XX"
    '    '
    '    'WarpField8
    '    '
    '    Me.WarpField8.DecimalPointPosition = CType(0, Short)
    '    Me.WarpField8.DisplayAttribute.Bold = True
    '    Me.WarpField8.Font = New System.Drawing.Font("lr SVbN", 16.5!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel)
    '    Me.WarpField8.FontSize = WarpControl.FontSizes.Small4
    '    Me.WarpField8.Format = ""
    '    Me.WarpField8.Length = CType(3, Short)
    '    Me.WarpField8.Location = New System.Drawing.Point(148, 24)
    '    Me.WarpField8.MacroBcr = ""
    '    Me.WarpField8.MacroIn = ""
    '    Me.WarpField8.MacroKey = ""
    '    Me.WarpField8.MacroOut = ""
    '    Me.WarpField8.Name = "WarpField8"
    '    Me.WarpField8.Size = New System.Drawing.Size(27, 18)
    '    Me.WarpField8.TabIndex = CType(10, Short)
    '    Me.WarpField8.Text = "Znc"
    '    '
    '    'WarpField7
    '    '
    '    Me.WarpField7.DecimalPointPosition = CType(0, Short)
    '    Me.WarpField7.DisplayAttribute.Bold = True
    '    Me.WarpField7.Font = New System.Drawing.Font("lr SVbN", 16.5!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel)
    '    Me.WarpField7.FontSize = WarpControl.FontSizes.Small4
    '    Me.WarpField7.Format = ""
    '    Me.WarpField7.Length = CType(2, Short)
    '    Me.WarpField7.Location = New System.Drawing.Point(126, 24)
    '    Me.WarpField7.MacroBcr = ""
    '    Me.WarpField7.MacroIn = ""
    '    Me.WarpField7.MacroKey = ""
    '    Me.WarpField7.MacroOut = ""
    '    Me.WarpField7.Name = "WarpField7"
    '    Me.WarpField7.Size = New System.Drawing.Size(18, 18)
    '    Me.WarpField7.TabIndex = CType(9, Short)
    '    Me.WarpField7.Text = "CL"
    '    '
    '    'wfPart1
    '    '
    '    Me.wfPart1.BcrFlag = True
    '    Me.wfPart1.DecimalPointPosition = CType(0, Short)
    '    Me.wfPart1.Font = New System.Drawing.Font("lr SVbN", 16.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel)
    '    Me.wfPart1.FontSize = WarpControl.FontSizes.Small4
    '    Me.wfPart1.Format = ""
    '    Me.wfPart1.Length = CType(12, Short)
    '    Me.wfPart1.Location = New System.Drawing.Point(18, 48)
    '    Me.wfPart1.MacroBcr = ""
    '    Me.wfPart1.MacroIn = ""
    '    Me.wfPart1.MacroKey = ""
    '    Me.wfPart1.MacroOut = ""
    '    Me.wfPart1.Name = "wfPart1"
    '    Me.wfPart1.Size = New System.Drawing.Size(108, 18)
    '    Me.wfPart1.TabIndex = CType(8, Short)
    '    Me.wfPart1.Text = "XXXX-XX-XXXX"
    '    '
    '    'WarpField5
    '    '
    '    Me.WarpField5.DecimalPointPosition = CType(0, Short)
    '    Me.WarpField5.DisplayAttribute.Bold = True
    '    Me.WarpField5.Font = New System.Drawing.Font("lr SVbN", 16.5!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel)
    '    Me.WarpField5.FontSize = WarpControl.FontSizes.Small4
    '    Me.WarpField5.Format = ""
    '    Me.WarpField5.Length = CType(7, Short)
    '    Me.WarpField5.Location = New System.Drawing.Point(33, 24)
    '    Me.WarpField5.MacroBcr = ""
    '    Me.WarpField5.MacroIn = ""
    '    Me.WarpField5.MacroKey = ""
    '    Me.WarpField5.MacroOut = ""
    '    Me.WarpField5.Name = "WarpField5"
    '    Me.WarpField5.Size = New System.Drawing.Size(63, 18)
    '    Me.WarpField5.TabIndex = CType(7, Short)
    '    Me.WarpField5.Text = "Part-No"
    '    '
    '    'wfCrtnNo
    '    '
    '    Me.wfCrtnNo.DecimalPointPosition = CType(0, Short)
    '    Me.wfCrtnNo.DisplayAttribute.Bold = True
    '    Me.wfCrtnNo.Font = New System.Drawing.Font("lr SVbN", 22.5!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel)
    '    Me.wfCrtnNo.FontSize = WarpControl.FontSizes.Small2
    '    Me.wfCrtnNo.Format = ""
    '    Me.wfCrtnNo.Length = CType(5, Short)
    '    Me.wfCrtnNo.Location = New System.Drawing.Point(156, 0)
    '    Me.wfCrtnNo.MacroBcr = ""
    '    Me.wfCrtnNo.MacroIn = ""
    '    Me.wfCrtnNo.MacroKey = ""
    '    Me.wfCrtnNo.MacroOut = ""
    '    Me.wfCrtnNo.Name = "wfCrtnNo"
    '    Me.wfCrtnNo.Size = New System.Drawing.Size(60, 24)
    '    Me.wfCrtnNo.TabIndex = CType(6, Short)
    '    Me.wfCrtnNo.Text = "XXXXX"
    '    '
    '    'WarpField3
    '    '
    '    Me.WarpField3.DecimalPointPosition = CType(0, Short)
    '    Me.WarpField3.Font = New System.Drawing.Font("lr SVbN", 22.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel)
    '    Me.WarpField3.FontSize = WarpControl.FontSizes.Small2
    '    Me.WarpField3.Format = ""
    '    Me.WarpField3.Length = CType(8, Short)
    '    Me.WarpField3.Location = New System.Drawing.Point(0, 0)
    '    Me.WarpField3.MacroBcr = ""
    '    Me.WarpField3.MacroIn = ""
    '    Me.WarpField3.MacroKey = ""
    '    Me.WarpField3.MacroOut = ""
    '    Me.WarpField3.Name = "WarpField3"
    '    Me.WarpField3.Size = New System.Drawing.Size(96, 24)
    '    Me.WarpField3.TabIndex = CType(5, Short)
    '    Me.WarpField3.Text = "CartonNo"
    '    '
    '    'WarpField1
    '    '
    '    Me.WarpField1.DecimalPointPosition = CType(0, Short)
    '    Me.WarpField1.Font = New System.Drawing.Font("lr SVbN", 22.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel)
    '    Me.WarpField1.FontSize = WarpControl.FontSizes.Small2
    '    Me.WarpField1.Format = ""
    '    Me.WarpField1.InputMode.Secret = True
    '    Me.WarpField1.Length = CType(1, Short)
    '    Me.WarpField1.Location = New System.Drawing.Point(228, 0)
    '    Me.WarpField1.MacroBcr = ""
    '    Me.WarpField1.MacroIn = ""
    '    Me.WarpField1.MacroKey = ""
    '    Me.WarpField1.MacroOut = ""
    '    Me.WarpField1.Name = "WarpField1"
    '    Me.WarpField1.Size = New System.Drawing.Size(12, 24)
    '    Me.WarpField1.TabIndex = CType(4, Short)
    '    '
    '    'WarpBox1
    '    '
    '    Me.WarpBox1.BoxType = WarpControl.BoxTypes.Box
    '    Me.WarpBox1.DrawMode = WarpControl.DrawModes.Paint
    '    Me.WarpBox1.Font = New System.Drawing.Font("lr SVbN", 33.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel)
    '    Me.WarpBox1.ForeColor = CType(15, Short)
    '    Me.WarpBox1.Image = "C:\H081-0015.jpg"
    '    Me.WarpBox1.Location = New System.Drawing.Point(0, 192)
    '    Me.WarpBox1.Name = "WarpBox1"
    '    Me.WarpBox1.Size = New System.Drawing.Size(240, 24)
    '    Me.WarpBox1.TabIndex = 3
    '    '
    '    'wfName
    '    '
    '    Me.wfName.BcrFlag = True
    '    Me.wfName.DecimalPointPosition = CType(0, Short)
    '    Me.wfName.Font = New System.Drawing.Font("lr SVbN", 22.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel)
    '    Me.wfName.FontSize = WarpControl.FontSizes.Small2
    '    Me.wfName.Format = ""
    '    Me.wfName.Length = CType(20, Short)
    '    Me.wfName.Location = New System.Drawing.Point(0, 216)
    '    Me.wfName.MacroBcr = ""
    '    Me.wfName.MacroIn = ""
    '    Me.wfName.MacroKey = ""
    '    Me.wfName.MacroOut = ""
    '    Me.wfName.Name = "wfName"
    '    Me.wfName.Size = New System.Drawing.Size(240, 24)
    '    Me.wfName.TabIndex = CType(2, Short)
    '    '
    '    'WarpHWBcr1
    '    '
    '    Me.WarpHWBcr1.Decode.Code39 = True
    '    Me.WarpHWBcr1.DiscreteFirstLen = CType(0, Short)
    '    Me.WarpHWBcr1.DiscreteSecondLen = CType(0, Short)
    '    Me.WarpHWBcr1.InterleavedFirstLen = CType(0, Short)
    '    Me.WarpHWBcr1.InterleavedSecondLen = CType(0, Short)
    '    '
    '    'frm5045
    '    '
    '    Me.AutoScaleBaseSize = New System.Drawing.Size(5, 12)
    '    Me.ClientSize = New System.Drawing.Size(240, 296)
    '    Me.Controls.Add(Me.WarpFrame1)
    '    Me.Font = New System.Drawing.Font("MS UI Gothic", 9.0!)
    '    Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
    '    Me.Name = "frm5045"
    '    Me.Text = "Form1"
    '    Me.WarpFrame1.ResumeLayout(False)
    '    Me.ResumeLayout(False)

    'End Sub

#End Region

    Public Enum M5045_STATUS As Integer
        INIT = 0
        MENUBACK = 1
        NOTCD = 2
        NOTEXIST = 3
        DSCAN = 4
        DONE = 5
        RETRY = 6
        PRINT = 7
    End Enum

    Public mint5045status As Integer

    Private Sub frm5045_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
        Select Case e.KeyCode.ToString()
            Case "F1"
            Case "F2"
                gintStatus = TR_STATUS.QUIT
                Me.Close()
                Exit Sub
        End Select
    End Sub


    Private Sub frm5045_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load

        '// Case QVGA -> resolution to 1/2
        If System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width = 240 Then
            Call resolution.VGAtoQVGA(Me)
        End If

        Dim wstrImage As String
        Dim rtn As Integer

        Try
            mint5045status = M5045_STATUS.INIT

            ' t[€ฬI[v“
            'rtn = WarpFrame1.Open()
            'If (rtn <> 0) Then
            '    Err.Raise(vbObjectError + 1, gAppName, "WarpError")
            'End If

#If Not Debug Then
            'sSetImgFName(G_CONST_MID_H5045, WarpBox1)
#End If
            sDisp5045()
            'sDispItemCode()

            ' tH[€EC“ ภs
            sMain()
            ' t[€ฬN[Y
            'rtn = WarpFrame1.Close()
            'If (rtn <> 0) Then
            '    Err.Raise(vbObjectError + 1, gAppName, "WarpError")
            'End If

            ' tH[€EN[Y
            'Me.Close()

            Exit Sub

        Catch ex As Exception
            gintStatus = TR_STATUS.QUIT
            sErrLog(gAppName, "frm5045_Load", ex.ToString)
            Me.Close()
        End Try

    End Sub

    Private Sub btScanLib_OnScan(ByVal result As String)
        Dim buf As String = result
        Dim rtn As Integer

        If (Not fCheckCode(buf)) Then
            sBeepSound(modPublicHT.BEEP_TYPE.A, modPublicHT.BEEP_SELECTION.NG)
#If Not Debug Then
            fFnc_WrpMsg("E", G_CONST_MID_E5E25)
#End If
            Exit Sub
        End If

        '“—อ—
        rtn = fProcInput(RTrim(buf))

        If rtn = 0 Then
            Select Case mint5045status
                Case M5045_STATUS.INIT


                Case M5045_STATUS.MENUBACK


                Case M5045_STATUS.NOTCD              'ูศ้o[R[h
                    sBeepSound(modPublicHT.BEEP_TYPE.A, modPublicHT.BEEP_SELECTION.NG)
                    sOutputLog(gstrctPicsIni.strOutput_KDPP, "KDPP5E25", G_CONST_BC_PART, buf)
#If Not Debug Then
                    fFnc_WrpMsg("E", G_CONST_MID_E5E25)
#End If
                    Exit Sub
                Case M5045_STATUS.NOTEXIST           '
                    sBeepSound(modPublicHT.BEEP_TYPE.A, modPublicHT.BEEP_SELECTION.NG)
                    sOutputLog(gstrctPicsIni.strOutput_KDPP, "KDPP5E30", G_CONST_BC_PART, buf)
#If Not Debug Then
                    fFnc_WrpMsg("E", G_CONST_MID_E5E30)
#End If
                    Exit Sub
                Case M5045_STATUS.DSCAN
                    sBeepSound(modPublicHT.BEEP_TYPE.A, modPublicHT.BEEP_SELECTION.NG)
                    sOutputLog(gstrctPicsIni.strOutput_KDPP, "KDPP5E35", G_CONST_BC_PART, buf)
#If Not Debug Then
                    fFnc_WrpMsg("E", G_CONST_MID_E5E35)
#End If
                    Exit Sub
                Case M5045_STATUS.DONE
                    RemoveHandler btScanLib.OnScan, AddressOf btScanLib_OnScan
                    btScanLib.Disable()
                    gintStatus = TR_STATUS.RETRY3
                    Me.Close()
                    Exit Sub

                Case M5045_STATUS.RETRY
                    RemoveHandler btScanLib.OnScan, AddressOf btScanLib_OnScan
                    btScanLib.Disable()
                    gintStatus = TR_STATUS.RETRY1
                    Me.Close()
                    Exit Sub

                Case M5045_STATUS.PRINT
                    RemoveHandler btScanLib.OnScan, AddressOf btScanLib_OnScan
                    btScanLib.Disable()
                    gintStatus = TR_STATUS.PRINT
                    Me.Close()
                    Exit Sub

            End Select

        Else

            'f0.WarpCtrl1.MessageBox(G_CONST_EMT_DB, G_CONST_EM_DB, MWA_DB_WARNING, MWA_DB_OK)
            'f0.WarpCtrl1.MessageBox(G_CONST_EMT_DB, fEditErrorInfo(gclsDB.BtriveStatus, gclsDB.ErrFile), MWA_DB_WARNING, MWA_DB_OK)
            MessageBox.Show(G_CONST_EM_DB, G_CONST_EMT_DB, MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1)

        End If

    End Sub


    ' t[€EC“
    Public Sub sMain()

        '        Dim WKey As Short
        '        Dim buf As String
        '        Dim rtn As Integer

        '        Try

        '            ' t[€ฬ—๐ฑฑษLqตทB
        '            Do While (True)

        '                ' R[h“—อ
        '                WKey = WarpFrame1.Input(wfInput)

        '                If WKey = WKY_ENT Then


        '                ElseIf WKey = WKY_BCR Then

        '                    'สฐบฐฤ“—อฬๆ“พ
        '                    rtn = WarpHWBcr1.Get(buf)
        '                    sBeepSound(modPublicHT.BEEP_TYPE.A, modPublicHT.BEEP_SELECTION.OK)
        '                    If (rtn <> 0) Then
        '                        Err.Raise(vbObjectError + 1, gAppName, "WarpError")
        '                    End If

        '                    'มชฏธรจผฏฤ
        '                    If (Not fCheckCode(buf)) Then
        '                        sBeepSound(modPublicHT.BEEP_TYPE.A, modPublicHT.BEEP_SELECTION.NG)
        '#If Not Debug Then
        '                        fFnc_WrpMsg("E", G_CONST_MID_E5E25)
        '#End If
        '                        Exit Do
        '                    End If

        '                    '“—อ—
        '                    rtn = fProcInput(RTrim(buf))

        '                    If rtn = 0 Then
        '                        Select Case mint5045status
        '                            Case M5045_STATUS.INIT


        '                            Case M5045_STATUS.MENUBACK


        '                            Case M5045_STATUS.NOTCD              'ูศ้o[R[h
        '                                sBeepSound(modPublicHT.BEEP_TYPE.A, modPublicHT.BEEP_SELECTION.NG)
        '                                sOutputLog(gstrctPicsIni.strOutput_KDPP, "KDPP5E25", G_CONST_BC_PART, buf)
        '#If Not Debug Then
        '                                fFnc_WrpMsg("E", G_CONST_MID_E5E25)
        '#End If
        '                            Case M5045_STATUS.NOTEXIST           '
        '                                sBeepSound(modPublicHT.BEEP_TYPE.A, modPublicHT.BEEP_SELECTION.NG)
        '                                sOutputLog(gstrctPicsIni.strOutput_KDPP, "KDPP5E30", G_CONST_BC_PART, buf)
        '#If Not Debug Then
        '                                fFnc_WrpMsg("E", G_CONST_MID_E5E30)
        '#End If
        '                            Case M5045_STATUS.DSCAN
        '                                sBeepSound(modPublicHT.BEEP_TYPE.A, modPublicHT.BEEP_SELECTION.NG)
        '                                sOutputLog(gstrctPicsIni.strOutput_KDPP, "KDPP5E35", G_CONST_BC_PART, buf)
        '#If Not Debug Then
        '                                fFnc_WrpMsg("E", G_CONST_MID_E5E35)
        '#End If
        '                            Case M5045_STATUS.DONE
        '                                gintStatus = TR_STATUS.RETRY3
        '                                Exit Do

        '                            Case M5045_STATUS.RETRY
        '                                gintStatus = TR_STATUS.RETRY1
        '                                Exit Do

        '                            Case M5045_STATUS.PRINT
        '                                gintStatus = TR_STATUS.PRINT
        '                                Exit Do

        '                        End Select

        '                    Else

        '                        'f0.WarpCtrl1.MessageBox(G_CONST_EMT_DB, G_CONST_EM_DB, MWA_DB_WARNING, MWA_DB_OK)
        '                        f0.WarpCtrl1.MessageBox(G_CONST_EMT_DB, fEditErrorInfo(gclsDB.BtriveStatus, gclsDB.ErrFile), MWA_DB_WARNING, MWA_DB_OK)

        '                    End If

        '                ElseIf WKey = WKY_ERROR Then

        '                    f0.WarpCtrl1.MessageBox(G_CONST_EMT_WARP, G_CONST_EM_WARP, MWA_DB_WARNING, MWA_DB_OK)

        '                End If

        '            Loop

        '            Exit Sub

        '        Catch ex As Exception
        '            'gintStatus = TR_STATUS.QUIT
        '            sErrLog(gAppName, "sMain", ex.ToString)
        '        End Try

    End Sub

    '/*
    '|| ึ”–ผFsDisp5045
    '|| T—v  F5045ๆ–ส•\ฆ
    '*/
    Private Sub sDisp5045()

        sClrAll()

        wfCrtnNo.Text = gstrctPPDisp.strCrtnNo
        If gstrctPPDisp.intNumOfPkg - gstrctPPDisp.intNumOfScanned > 0 Then
            With gastrctPPDispPart(0)
                wfID1.Text = .strID
                wfPart1.Text = .strPartNoDisp
                wfCL1.Text = .strCL
                wfZnc1.Text = .strZ
                wfSerial1.Text = .strSerial
            End With
        End If
        If gstrctPPDisp.intNumOfPkg - gstrctPPDisp.intNumOfScanned > 1 Then
            With gastrctPPDispPart(1)
                wfID2.Text = .strID
                wfPart2.Text = .strPartNoDisp
                wfCL2.Text = .strCL
                wfZnc2.Text = .strZ
                wfSerial2.Text = .strSerial
            End With
        End If
        If gstrctPPDisp.intNumOfPkg - gstrctPPDisp.intNumOfScanned > 2 Then
            With gastrctPPDispPart(2)
                wfID3.Text = .strID
                wfPart3.Text = .strPartNoDisp
                wfCL3.Text = .strCL
                wfZnc3.Text = .strZ
                wfSerial3.Text = .strSerial
            End With
        End If
        If gstrctPPDisp.intNumOfPkg - gstrctPPDisp.intNumOfScanned > 3 Then
            With gastrctPPDispPart(3)
                wfID4.Text = .strID
                wfPart4.Text = .strPartNoDisp
                wfCL4.Text = .strCL
                wfZnc4.Text = .strZ
                wfSerial4.Text = .strSerial
            End With
        End If
        If gstrctPPDisp.intNumOfPkg - gstrctPPDisp.intNumOfScanned > 4 Then
            With gastrctPPDispPart(4)
                wfID5.Text = .strID
                wfPart5.Text = .strPartNoDisp
                wfCL5.Text = .strCL
                wfZnc5.Text = .strZ
                wfSerial5.Text = .strSerial
            End With
        End If

        wfPut1.Text = gstrctPPDisp.intNumOfPkg - gstrctPPDisp.intNumOfScanned
        wfName.Text = gstrctKDHT.strUserName

    End Sub

    '/*
    '|| ึ”–ผFfProcInput
    '|| T—v  F“—อ—
    '*/
    Private Function fProcInput(ByVal pstrInput As String) As Integer

        Dim rtn As Integer
        Dim wintCnt As Integer
        Dim tmp As String

        fProcInput = -1

        Try

            If RTrim(pstrInput) = "OCMENUBACK" Then             'OCMENUBACKศ็ฮ

                mint5045status = M5045_STATUS.NOTCD
                fProcInput = 0
                Exit Function

            ElseIf RTrim(pstrInput) = "OCZEROOK" Then                         'OCMENUBACKศ็ฮ

                tmp = "ZEROOK"

            ElseIf pstrInput.StartsWith("P") Then        'ๆ“ชชPศ็ฮ

                If pstrInput.Length = G_CONST_LLEN_PRT1 Or pstrInput.Length = G_CONST_LLEN_PRT2 Then '•”•io[R[h
                    '•\ฆ—p•”•iR[hฉ็“เ•”R[hึ•ฯท
                    tmp = Mid(pstrInput, 1, 1) & fBackDispItem(Mid(pstrInput, 2, 10), True) & Mid(pstrInput, 12)
                Else '…”แข(KDPP5E25)
                    mint5045status = M5045_STATUS.NOTCD
                    fProcInput = 0
                    Exit Function
                End If

            Else

                mint5045status = M5045_STATUS.NOTCD
                fProcInput = 0
                Exit Function

            End If

            rtn = fProcData4SRetry2(tmp, wintCnt)

            'rtn = fProcData4SRetry2(pstrInput, wintCnt)

            If rtn = -1 Then
                Exit Function
            ElseIf rtn = -2 Then
                mint5045status = M5045_STATUS.NOTEXIST
                fProcInput = 0
                Exit Function
            ElseIf rtn = -3 Then
                mint5045status = M5045_STATUS.DSCAN
                fProcInput = 0
                Exit Function
            ElseIf gstrctPPDisp.intNumOfPkg = gstrctPPDisp.intNumOfScanned + 1 Then
                If gstrctPPDisp.strCrtnNo = gstrctPPDisp.strCrtnTo Then
                    mint5045status = M5045_STATUS.PRINT
                Else
                    gstrctPPDisp.strCrtnNo = CStr(CInt(gstrctPPDisp.strCrtnNo) + 1).PadLeft(5, "0")
                    mint5045status = M5045_STATUS.RETRY
                End If
            Else
                gstrctPPDisp.intNumOfScanned = gstrctPPDisp.intNumOfPkg - wintCnt
                mint5045status = M5045_STATUS.DONE
            End If

            fProcInput = 0

            Exit Function

        Catch ex As Exception
            sErrLog(gAppName, "fProcInput", ex.ToString)
        End Try
    End Function


    '/*
    '|| ึ”–ผFsClrAll
    '|| T—v  Fๆ–สNA
    '*/
    Private Sub sClrAll()

        wfID1.Text = " "
        wfPart1.Text = " "
        wfCL1.Text = " "
        wfZnc1.Text = " "
        wfSerial1.Text = " "
        wfID2.Text = " "
        wfPart2.Text = " "
        wfCL2.Text = " "
        wfZnc2.Text = " "
        wfSerial2.Text = " "
        wfID3.Text = " "
        wfPart3.Text = " "
        wfCL3.Text = " "
        wfZnc3.Text = " "
        wfSerial3.Text = " "
        wfID4.Text = " "
        wfPart4.Text = " "
        wfCL4.Text = " "
        wfZnc4.Text = " "
        wfSerial4.Text = " "
        wfID5.Text = " "
        wfPart5.Text = " "
        wfCL5.Text = " "
        wfZnc5.Text = " "
        wfSerial5.Text = " "

    End Sub

    Private Sub frm5045_Activated(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Activated
        ' Enable BTScanLib
        If Not scanHandler Then
            btScanLib = btScanLib.getInstance()
            AddHandler btScanLib.OnScan, AddressOf btScanLib_OnScan
            scanHandler = True
            btScanLib.Debug = False
            btScanLib.Enable()
        End If
    End Sub
End Class







