﻿Imports System
Imports System.Linq
Imports System.Collections.Generic
Imports System.Text
Imports System.Windows.Forms
Imports Microsoft.WindowsCE.Forms
Imports System.Runtime.InteropServices

Public Class frm2E32
    Private mstrPartLabel As String
    Public WriteOnly Property pPartLabel() As String
        Set(ByVal strValue As String)
            mstrPartLabel = strValue
        End Set
    End Property


    Private Sub frm2E32_Load(ByVal sender As System.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

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

#If Not Debug Then
            wstrImage = G_CONST_IMG_DIR & "E" & gstrctKDHT.strCountry & "-" & G_CONST_MID_E2E32 & G_CONST_IMG_EXT
            WarpBox1.Image = Image.FromHbitmap(wstrImage)
#End If

            sDisp2E32(mstrPartLabel)

            ' 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
            sErrLog(gAppName, "frm2E32_Load", ex.ToString)
        End Try
    End Sub
    '/*
    '|| Function Name: sDisp2E32
    '|| Version: 2E32 display function
    '*/
    Private Sub sDisp2E32(ByVal buf As String)
        wfName.Text = gstrctKDHT.strUserName
        wfLocation.Text = fstrDivision(2, gstrctP2000.strLctnStart)
        wfPart.Text = (fstrDivision(7, fstrDivision(4, Mid(buf, 2, 10))))
        wfCL.Text = (Mid(buf, 12, 2))
        wfZnc.Text = (Mid(buf, 14, 1))
    End Sub
    Public Sub sMain()

        'Dim WKey As Short

        'Try

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

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

        '        If WKey = Bt.LibDef.BT_KEY_ENT Then


        '        ElseIf WKey = Bt.LibDef.BT_KEY_F1 Then

        '            Exit Do

        '        ElseIf WKey = Bt.LibDef.BT_KEY_F2 Then


        '        ElseIf WKey = Bt.LibDef.BT_ERR Then
        '            'f0.WarpCtrl1.MessageBox(G_CONST_EMT_WARP, G_CONST_EM_WARP, MWA_DB_WARNING, MWA_DB_OK)
        '            MessageBox.Show(G_CONST_EM_WARP, G_CONST_EMT_WARP, MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1)
        '            f0.Show()
        '            Exit Do

        '        End If

        '    Loop

        '    Exit Sub

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

    End Sub

    Private Sub frm2E32_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown

    End Sub
End Class