Option Strict Off
Option Explicit On
'------------------------------------ 2024/04/01 ------------------------------------
Public Class frmMain

#Region "愰尵"
    Private mNew幚峴拞 As Boolean = True
    Public oo偐側僇僫 As New ClsKanaKana
    Public oo僗僀僗僀 As New 屲cls僗僀僗僀
    Public WithEvents oo儐儔儐儔 As New 屲cls儐儔儐儔
    Private oo儐乕僓僇乕僪嶌惉 As 巐frmDlgUserCardMake = Nothing
    Public mMenuHight As Integer
    Public mmLoading As Boolean
    Public TimEventOnStr As String = ""
    Private mIniReading As Boolean = False
    Private m僒僀僘僙僢僩嬛巭 As Boolean
    Private mCallFromFormLoad As Boolean = False
    Private mCall_In_frmMain_ResizeEnd As Boolean = False
    Private mOldWndState As FormWindowState = FormWindowState.Normal
    Private mVSpctCard00 As Boolean = False
    Private mVSpctCard01 As Boolean = False
    '**************************************************************************************************************************************
    Private WithEvents 僀儀儞僩gAppEventMaker As 屲clsEventMaker
    '**************************************************************************************************************************************
    Public mDef僇乕僪僀儊乕僕 As Image = Nothing

#End Region

    '仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴
    Friend Function aaAppIniFileOp(ByVal Load_0_QueryUnload_1_Resize_2_DoIniSave_3 As Long, ByRef rwIniDataStr() As String) As Boolean
        Return zzAppIniFileOp(Load_0_QueryUnload_1_Resize_2_DoIniSave_3, rwIniDataStr)
    End Function
    Private Function zzAppIniFileOp(ByVal Load_0_QueryUnload_1_Resize_2_DoIniSave_3 As Long, ByRef rwIniDataStr() As String) As Boolean
        '仧仧仧儊僀儞儂乕儉偵偺傒愝掕偡傞僐乕僪仧仧仧丂儊僀儞儂乕儉撪偐傜偺傒屇傃弌偟傑偡丅
        '撉弌偟帪偵丂INI 僼傽僀儖偑懚嵼偟側偄応崌偼丂False丂傪曉偟傑偡丅
        If gggAppIniFile Is Nothing Then Return False
        Try
            Dim RETVAL = False
            Dim Open0_Save1 As Long, opcode As Integer
            Open0_Save1 = Load_0_QueryUnload_1_Resize_2_DoIniSave_3
            With gggAppIniFile
                Select Case Open0_Save1
                    Case 0, 1
                        opcode = 0    'or ... 捛壛偱偒傞僐乕僪  ---> 屲clsAppINI.cAppIniCaption Or 屲clsAppINI.cAppIniBackColor Or 屲clsAppINI.cAppIniForeColor
                        RETVAL = gggAppIniFile.OpenSaveMain(Open0_Save1, Me.Name + "0012", Me, 屲clsAppINI.cAppIniFormPostSize Or opcode)  'or ... 捛壛偱偒傞僐乕僪  ---> , Text1, 屲clsAppINI.cAppIniText Or 屲clsAppINI.cAppIniTextSelSttLen Or 屲clsAppINI.cAppIniFontName Or 屲clsAppINI.cAppIniFontSize, List1, 屲clsAppINI.cAppIniList Or 屲clsAppINI.cAppIniListIndex, Check1, 屲clsAppINI.cAppIniValue,  ETC ........)
                        '******************************************************************************************************
                        gggint = gggAppIniFile.OpenSaveStrAry(Open0_Save1, Me.Name + "5522", Me, rwIniDataStr)
                        '******************************************************************************************************
                    Case 2
                        '偦傟偧傟偺僼僅乕儉偱丄埵抲偲僒僀僘偺僨乕僞乕傪曐懚偟傑偡丅
                        RETVAL = gggAppIniFile.FormSizeDataSetOnReSize(Me)
                End Select
                '******************************************************************************************************
                '儐乕僓乕傾僾儕偐傜柧帵揑偵 INI 僼傽僀儖傪曐懚偟傑偡丅
                If Open0_Save1 = 1 Then
                    gggint = gggAppIniFile.IniFileSaveDo
                End If
                '******************************************************************************************************
            End With
            Return RETVAL
        Catch
            MsgBox(ErrorToString)
        End Try
        Return False
    End Function
    ''仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯

    '********************************************************************************
    Friend Sub frmDlgUseCardSelect_User_s_DisPose(ByVal rMe_gmDlgID As Integer)    '2023/05/28 new add
        If rMe_gmDlgID = gmDlg偐側僇僫僇乕僪宆傪愝掕 Then
            Call oo偐側僇僫.aa偐側僇僫僎乕儉梡僇乕僪宆愝掕Dlg_Load_1_Disposed_2(2, Nothing)
        ElseIf rMe_gmDlgID = gmDlg僇乕僪僔儑乕僇乕僪宆傪愝掕 Then
            Call gooClsCardShow.aa僇乕僪僔儑乕梡僇乕僪宆愝掕Dlg_Load_1_Disposed_2(2, Nothing)
        End If
    End Sub
    '********************************************************************************

#Region "僼僅乕儉僀儀儞僩"
    Public Sub New()
        ' 偙偺屇傃弌偟偼丄Windows 僼僅乕儉 僨僓僀僫偱昁梫偱偡丅
        InitializeComponent()
        ' InitializeComponent() 屇傃弌偟偺屻偱弶婜壔傪捛壛偟傑偡丅
    End Sub
    '***********************************************************************
    Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
#If DEBUG Then
#Else
#End If
        '***********************************************************************
        mNew幚峴拞 = False
        '***********************************************************************
        If Not GMCOM傾僾儕MainForm弶婜壔_Pack(僀儀儞僩gAppEventMaker, Me, mmLoading, app僇乕僪孮椞堟嵟彫僒僀僘, mMenuHight, MainMenu1, Nothing, Nothing, Nothing, pct儊僀儞) Then End
        '***********************************************************************
        Try
            gooClsCardShow = New ClsCardShow
            gm傾僾儕屌桳僋儔僗 = oo偐側僇僫
            gm僗僀僗僀嫟梡僋儔僗 = oo僗僀僗僀
            gggbol = gm傾僾儕屌桳僋儔僗.aa弶婜愝掕僆僽僕僃愝掕()
            gggbol = oo僗僀僗僀.aa弶婜愝掕()
            '***********************************************************************
            If Not GMCOM傾僾儕MainForm_AppIniFile憖嶌(Me, mIniReading) Then End
            '***********************************************************************
            gggstr = gm傾僾儕屌桳僋儔僗.aaDlgFile僇乕僪梡_aa僂僀儞僪僂弶婜壔嶌惉_After_Ini_Read()
            gggstr = gm傾僾儕屌桳僋儔僗.aaDlgFile僎乕儉梡_aa僂僀儞僪僂弶婜壔嶌惉_After_Ini_Read()
            gggstr = oo僗僀僗僀.aaDlgFile僗僀僗僀梡_aa僂僀儞僪僂弶婜壔嶌惉_After_Ini_Read()
            '----------------------------------------
            mmLoading = False
            '----------------------------------------
            gggbol = 嘳Form_嵟彫壔忬懺側傜_昗弨僒僀僘偵栠偡(Me, m僒僀僘僙僢僩嬛巭)
            '----------------------------------------
            mCallFromFormLoad = True : Call frmMain_ResizeEnd(Nothing, Nothing) : mCallFromFormLoad = False
            '----------------------------------------
            Me.pct儊僀儞.Cursor = New Cursor(Me.GetType(), "hand.CUR")
            gggbol = 嘳Forms_Controls_僪儔僢僌僪儘僢僾傪壜擻偵偡傞(Me, pct儊僀儞, Nothing, Nothing, Nothing)
            '----------------------------------------
            Call gm傾僾儕屌桳僋儔僗.aa僎乕儉僋儕傾(False)
            '----------------------------------------
            gggbol = GMCOM傾僾儕MainForm弶婜壔_Pack_2222(MainMenu1, mnbbb嵟戝壔, pnl僎乕儉寢壥)
            '----------------------------------------
            Call 僀儀儞僩gAppEventMaker_僗僀僗僀偲儐儔儐儔奐巒偲掆巭()
            Call 僀儀儞僩gAppEventMaker_僗僀僗僀儐儔儐儔夋憸昞帵ONOFF(oo僗僀僗僀.p僗僀僗僀攚宨夋憸傪昞帵)
            '*************************************************************
            gggbol = 嘳Forms_嵟戝壔_昗弨壔_儊僯儏乕憖嶌(0, Me, mnbbb嵟戝壔)
            '*************************************************************
        Catch ex As Exception
            MsgBox(ErrorToString())
            gm傾僾儕廔椆偡傞 = True
        End Try
        Exit Sub
    End Sub

    Private Sub frmMain_FormClosing(ByVal sender As Object, ByVal e As FormClosingEventArgs) Handles Me.FormClosing
        qqqqq("仴 frmMain_FormClosing 仴仴仴仴仴仴仴仴仴仴")
        Dim Cancel As Boolean = e.Cancel
        Dim UnloadMode As CloseReason = e.CloseReason
        Me.Cursor = Cursors.Default
        '----------------------------------------------
        Call gm傾僾儕屌桳僋儔僗.aa僎乕儉僋儕傾(False)
        '----------------------------------------------
        Dim IniDataStr() As String = {""}
        Call aa僾儘僷僥傿弶婜壔_INI撉弌偟彂崬傒(gco僾儘僷iniWR, IniDataStr) '僾儘僷僥傿傪 INI 僼傽僀儖梡偺暥帤楍偵愝掕偡傞丅
        gm傾僾儕廔椆偡傞 = True
        '---------------------------------------------------------------------------
        gggint = zzAppIniFileOp(1, IniDataStr)  '昁偢屇傃弌偟傑偡丅
        '---------------------------------------------------------------------------
        e.Cancel = Cancel
    End Sub

    Private Sub frmMain_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
        '仧仧仧仧仧仧仧仧仧仧仧仧仧仧仧仧仧仧仧仧仧仧仧
        If mDef僇乕僪僀儊乕僕 IsNot Nothing Then mDef僇乕僪僀儊乕僕.Dispose()
        mDef僇乕僪僀儊乕僕 = Nothing
        '仧仧仧仧仧仧仧仧仧仧仧仧仧仧仧仧仧仧仧仧仧仧仧
        gggbol = 嘳嘳嘳AppOwnHDC_make_del_in_AppMain_Form_Load_FormClose_傕偟僄儔乕側傜_End_偡傞(2)
    End Sub

    Private Sub frmMain_Disposed(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Disposed
        qqqqq("仠 frmMain_Disposed 仠仠仠仠仠仠仠仠仠仠仠仠仠仠仠仠仠仠")
    End Sub

    Private Sub frmMain_SizeChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.SizeChanged
        Static oldWndState As FormWindowState
        If mCall_In_frmMain_ResizeEnd Then Return
        If Me.WindowState <> oldWndState Then
            oldWndState = Me.WindowState
            If Me.WindowState <> FormWindowState.Minimized Then
                If pp僗僀僗僀僼儔僼儔_偄偢傟偐偁傞偄偼椉曽_傪幚峴拞 Then
                    Call frmMain_ResizeEnd(Nothing, Nothing)
                ElseIf pp僇乕僪僔儑乕_or_僇乕僪僔儑乕僥僗僩_傪幚峴拞 Then
                    pct儊僀儞.Visible = False
                Else
                    pct儊僀儞.Visible = False
                    TimEventOnStr = "frmMain_SizeChanged"
                    TimEventOn.Enabled = True
                End If
            End If
        End If
    End Sub
    Private Sub frmMain_ResizeBegin(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.ResizeBegin
        '2022/09/20 僞僀僩儖僶乕偱僪儔僢僌偟偨偩偗偱傕丄偙偺僀儀儞僩偵棃傞偺偱丄梫拲堄
        If mCall_In_frmMain_ResizeEnd Then Return
        '' ''If pp僗僀僗僀僼儔僼儔_偄偢傟傕掆巭偟偰偄傞 Then
        '' ''End If
    End Sub
    Private Sub frmMain_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize
        If mCall_In_frmMain_ResizeEnd Then Return
        If pp僗僀僗僀僼儔僼儔_偄偢傟傕掆巭偟偰偄傞 Then
            pct儊僀儞.Visible = False
        End If
    End Sub

    Private Sub frmMain_ResizeEnd(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.ResizeEnd
        Static mOldWD, mOldHT As Integer : Static 僐僐偐傜屇傃弌偟偨 As Boolean
        '----------------------------------------
        If mmLoading = True Then Return
        If m僒僀僘僙僢僩嬛巭 Then Return
        If gm傾僾儕屌桳僋儔僗.DlgFile僎乕儉梡 Is Nothing Then Return
        If mIniReading Then Return
        If Me.WindowState = FormWindowState.Minimized Then Return
        If 僐僐偐傜屇傃弌偟偨 Then
            僐僐偐傜屇傃弌偟偨 = False : Return
        End If
        If pct儊僀儞.Visible = True And mCallFromFormLoad = False Then 'on Me.WindowState iconic --> normal
            If mOldWD = Me.Width And mOldHT = Me.Height Then Return
        End If
        '----------------------------------------
        gggbol = 嘳FormSizeChang嵟彫僒僀僘埲忋偵_僼儔僌愝掕晅(mCall_In_frmMain_ResizeEnd, Me, mMenuHight, app僇乕僪孮椞堟嵟彫僒僀僘, app僇乕僪孮椞堟嵟彫僒僀僘, 僐僐偐傜屇傃弌偟偨)
        '----------------------------------------
        If Not mCallFromFormLoad Then
            If pp僗僀僗僀僼儔僼儔_偄偢傟偐偁傞偄偼椉曽_傪幚峴拞 Then
                pct儊僀儞.Visible = False
                If mOldWD <> Me.Width Or mOldHT <> Me.Height Or mOldWndState <> Me.WindowState Then
                    Me.BackColor = Color.White
                    Me.Refresh()
                End If
                gm僗僀僗僀嵞僗僞乕僩尨場 = gcFormResize
            ElseIf pp僇乕僪僔儑乕_or_僇乕僪僔儑乕僥僗僩_傪幚峴拞 Then
                pct儊僀儞.Visible = False

            Else
                Dim YY As Integer = mMenuHight
                Dim WD As Integer = Math.Max(100, Me.ClientSize.Width)
                Dim HT As Integer = Math.Max(100, Me.ClientSize.Height - mMenuHight)
                pct儊僀儞.SetBounds(0, YY, WD, HT)
                pctBack.SetBounds(0, YY, WD, HT)
                If mmLoading Then
                    mmLoading = False
                ElseIf pp僎乕儉幚峴拞 Then
                    僐僐偐傜屇傃弌偟偨 = True
                    If Me.WindowState = FormWindowState.Maximized Then
                        gggbol = gm傾僾儕屌桳僋儔僗.aa昤夋梡_pctBoxs_僙僢僩Image(Me, "", True)
                    End If
                    Call gm傾僾儕屌桳僋儔僗.aa僇乕僪偺攝抲偲嵞昤夋(IIf(pp僎乕儉幚峴拞, 2, 3))
                    僐僐偐傜屇傃弌偟偨 = False
                ElseIf (Not pp僎乕儉幚峴拞) Then
                    gggbol = gm傾僾儕屌桳僋儔僗.aa昤夋梡_pctBoxs_僙僢僩Image(Me, "", False)  '2022/11/25 chg True)
                End If
                pct儊僀儞.Visible = pp僎乕儉僋儕傾忬懺 Or pp僎乕儉幚峴拞
                gm僗僀僗僀嵞僗僞乕僩尨場 = 0
            End If
        End If
        '----------------------------------------
        gggint = zzAppIniFileOp(2, gggstrary)
        '----------------------------------------
        mOldWD = Me.Width : mOldHT = Me.Height : mOldWndState = Me.WindowState
        '----------------------------------------
        'Static mmm As Integer
        'mmm = mmm + 1 : qqqqq("仭仭frmMain_ResizeEnd " + Format(mmm, "0000"))
        'qqqqq("Form OLD WD/HT  = " + CStr(mOldWD) + ", " + CStr(mOldHT))
        'qqqqq("Form new WD/HT  = " + CStr(Me.Width) + ", " + CStr(Me.Height))
        'qqqqq("仭仭frmMain_ResizeEnd")
        'qqqqq("app僇乕僪孮椞堟嵟彫僒僀僘            = " & CStr(app僇乕僪孮椞堟嵟彫僒僀僘))
        'qqqqq("Form.ClientSize.Height - mMenuHight = " & CStr(Me.ClientSize.Height - mMenuHight))
        'qqqqq("Form.ClientSize.Width               = " & CStr(Me.ClientSize.Width))
        'qqqqq("Form.Height - Form.ClientSize.Height = " & CStr(Me.Height - Me.ClientSize.Height))
        'qqqqq("Form.Height - Form.ClientSize.Height + mMenuHight = " & CStr(Me.Height - Me.ClientSize.Height + mMenuHight))
        'qqqqq("Form.Width - Form.ClientSize.Width = " & CStr(Me.Width - Me.ClientSize.Width))
        '----------------------------------------
    End Sub

    Private Sub frmMain_Move(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Move
        '仧仧仧儊僀儞儂乕儉偵偺傒愝掕偡傞僐乕僪仧仧仧丂儊僀儞儂乕儉撪偐傜偺傒屇傃弌偟傑偡丅
        gggint = zzAppIniFileOp(2, gggstrary)
    End Sub

    Private Sub frmMain_Paint(ByVal sender As Object, ByVal e As PaintEventArgs) Handles Me.Paint
        'Static mmm As Integer
        'mmm = mmm + 1 : qqqqq("仭仭frmMain_Paint " + Format(mmm, "0000") + vbCrLf)
        'If gm傾僾儕廔椆偡傞 Then qqqqq("gm傾僾儕廔椆偡傞  in frmMain_Paint()")
        'If pp僇乕僪僔儑乕_or_僇乕僪僔儑乕僥僗僩_傪幚峴拞 Then qqqqq("僔儑乕僥僗僩_傪幚峴拞  in frmMain_Paint()")
        If mCall_In_frmMain_ResizeEnd Then Return
        If pct儊僀儞.Visible = False Then Return
        Call gm傾僾儕屌桳僋儔僗.aafrmMain_Paint()
    End Sub

#End Region

#Region "儊僯儏乕僀儀儞僩"
    Friend Sub mn1game僎乕儉僋儕傾_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mn1game僎乕儉僋儕傾.Click
        If gm傾僾儕廔椆偡傞 Then Exit Sub
        Call gm傾僾儕屌桳僋儔僗.aa僎乕儉僋儕傾(False)
        Me.Refresh()
    End Sub
    Private Sub mn1game僇乕僪梡僼傽僀儖傪愝掕_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mn1game僇乕僪梡僼傽僀儖傪愝掕.Click
        If gm傾僾儕廔椆偡傞 Then Exit Sub
        Call gm傾僾儕屌桳僋儔僗.aa僼傽僀儖夋憸僇乕僪梡DlgShow(Me)
    End Sub
    Private Sub mn1game僎乕儉梡僼傽僀儖傪愝掕_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mn1game僎乕儉攚宨夋憸僼傽僀儖傪愝掕.Click
        If gm傾僾儕廔椆偡傞 Then Return
        Call gm傾僾儕屌桳僋儔僗.aa僼傽僀儖夋憸僎乕儉梡DlgShow(Me)
    End Sub
    Private Sub mn1game僎乕儉攚宨夋憸偺愗傝懼偊帪娫娫妘Do_1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mn1game僎乕儉攚宨夋憸偺愗傝懼偊帪娫娫妘Do_1.Click, mn1game僎乕儉攚宨夋憸偺愗傝懼偊帪娫娫妘Do_2.Click, mn1game僎乕儉攚宨夋憸偺愗傝懼偊帪娫娫妘Do_3.Click, mn1game僎乕儉攚宨夋憸偺愗傝懼偊帪娫娫妘Do_4.Click, mn1game僎乕儉攚宨夋憸偺愗傝懼偊帪娫娫妘Do_5.Click
        If gm傾僾儕屌桳僋儔僗 Is Nothing Then Return
        Dim index As Integer = IIf(sender.Equals(mn1game僎乕儉攚宨夋憸偺愗傝懼偊帪娫娫妘Do_1), 1, IIf(sender.Equals(mn1game僎乕儉攚宨夋憸偺愗傝懼偊帪娫娫妘Do_2), 2, IIf(sender.Equals(mn1game僎乕儉攚宨夋憸偺愗傝懼偊帪娫娫妘Do_3), 3, IIf(sender.Equals(mn1game僎乕儉攚宨夋憸偺愗傝懼偊帪娫娫妘Do_4), 4, IIf(sender.Equals(mn1game僎乕儉攚宨夋憸偺愗傝懼偊帪娫娫妘Do_5), 5, 0)))))
        If index = 0 Then Return
        gggbol = gm傾僾儕屌桳僋儔僗.aa_mn1game僎乕儉夋憸偺愗傝懼偊帪娫娫妘Do_Click(index)
    End Sub
    Private Sub mn1game僎乕儉攚宨夋憸傪師偺夋憸偵愗傝懼偊_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mn1game僎乕儉攚宨夋憸傪師偺夋憸偵愗傝懼偊.Click
        If gm傾僾儕廔椆偡傞 Then Return
        gggbol = gm傾僾儕屌桳僋儔僗.p僎乕儉攚宨夋憸偺愗傝懼偊_師偺夋憸偵_嫮惂揑偵
    End Sub
    Private Sub mn1game僇乕僪枃悢巜掕Do_1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mn1game僇乕僪枃悢巜掕Do_1.Click, mn1game僇乕僪枃悢巜掕Do_2.Click, mn1game僇乕僪枃悢巜掕Do_3.Click, mn1game僇乕僪枃悢巜掕Do_4.Click, mn1game僇乕僪枃悢巜掕Do_5.Click, mn1game僇乕僪枃悢巜掕Do_6.Click
        Dim index As Integer = IIf(sender.Equals(mn1game僇乕僪枃悢巜掕Do_1), 1, IIf(sender.Equals(mn1game僇乕僪枃悢巜掕Do_2), 2, IIf(sender.Equals(mn1game僇乕僪枃悢巜掕Do_3), 3, IIf(sender.Equals(mn1game僇乕僪枃悢巜掕Do_4), 4, IIf(sender.Equals(mn1game僇乕僪枃悢巜掕Do_5), 5, IIf(sender.Equals(mn1game僇乕僪枃悢巜掕Do_6), 6, 0))))))
        If index = 0 Then Return
        Call mn1game僇乕僪枃悢巜掕Do_ClickCOM(index)
    End Sub
    Friend Sub mn1game僇乕僪枃悢巜掕Do_ClickCOM(ByVal mnuIDX As Integer)
        If gm傾僾儕廔椆偡傞 Then Return
        gggstr = gm傾僾儕屌桳僋儔僗.p尰嵼偺僇乕僪枃悢_RW(gco僾儘僷MenuClick, CStr(mnuIDX))
        pct儊僀儞.Visible = True
    End Sub
    Private Sub mn1game僸儞僩昞帵Do_1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mn1game僸儞僩昞帵Do_1.Click, mn1game僸儞僩昞帵Do_2.Click, mn1game僸儞僩昞帵Do_3.Click, mn1game僸儞僩昞帵Do_4.Click
        If gm傾僾儕廔椆偡傞 Then Return
        If sender.Equals(mn1game僸儞僩昞帵Do_1) Or sender.Equals(mn1game僸儞僩昞帵Do_2) Or sender.Equals(mn1game僸儞僩昞帵Do_3) Or sender.Equals(mn1game僸儞僩昞帵Do_4) Then
            Dim Tagstr As String = sender.tag
            gggstr = gm傾僾儕屌桳僋儔僗.p僸儞僩昞帵_RW(gco僾儘僷MenuClick, Tagstr)
        Else
            Return
        End If
    End Sub
    Private Sub mn1game帺摦幚峴僇乕僪僔儑乕_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mn1game帺摦幚峴僇乕僪僔儑乕.Click
        If gm傾僾儕廔椆偡傞 Then Return
        p僎乕儉廔椆帪偺帺摦幚峴儌乕僪 = 1
    End Sub
    Private Sub mn1game帺摦幚峴僗僀僗僀_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mn1game帺摦幚峴僗僀僗僀.Click
        If gm傾僾儕廔椆偡傞 Then Return
        p僎乕儉廔椆帪偺帺摦幚峴儌乕僪 = 2
    End Sub
    Private Sub mn1game帺摦幚峴壗傕偟側偄_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mn1game帺摦幚峴壗傕偟側偄.Click
        If gm傾僾儕廔椆偡傞 Then Return
        p僎乕儉廔椆帪偺帺摦幚峴儌乕僪 = 3
    End Sub
    Friend Sub mn1game偙偺傾僾儕傪廔椆_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mn1game偙偺傾僾儕傪廔椆.Click
        gm傾僾儕廔椆偡傞 = True : Me.Close()
    End Sub

    Private Sub mn3opt僆僾僔儑儞愝掕Dlg昞帵_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mn3opt僆僾僔儑儞愝掕Dlg昞帵.Click
        Call gm傾僾儕屌桳僋儔僗.aa僆僾僔儑儞愝掕Dlg_Load_1_Disposed_2(1, Me)
    End Sub
    Private Sub mn3opt僒僂儞僪愝掕Dlg昞帵_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mn3opt僒僂儞僪愝掕Dlg昞帵.Click
        Call gm傾僾儕屌桳僋儔僗.aa僒僂儞僪愝掕Dlg_Load_1_Disposed_2(1, Me)
    End Sub
    Private Sub mn3opt僎乕儉梡僇乕僪宆偺愗傝懼偊僌儖乕僾愝掕_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mn3opt僎乕儉梡僇乕僪宆偺愗傝懼偊僌儖乕僾愝掕.Click
        Call gm傾僾儕屌桳僋儔僗.aa偐側僇僫僎乕儉梡僇乕僪宆愝掕Dlg_Load_1_Disposed_2(1, Me)
    End Sub
    Friend Function mn3opt僎乕儉梡僇乕僪宆偺愗傝懼偊帪娫娫妘Do_MenuCheckSet(ByVal propval_0_6 As Integer) As Integer
        Dim n As Integer = 嘳悢抣斖埻Int(0, 6, propval_0_6)
        mn3opt僎乕儉梡僇乕僪宆偺愗傝懼偊帪娫娫妘Do_1.Checked = (n = 0)
        mn3opt僎乕儉梡僇乕僪宆偺愗傝懼偊帪娫娫妘Do_2.Checked = (n = 1)
        mn3opt僎乕儉梡僇乕僪宆偺愗傝懼偊帪娫娫妘Do_3.Checked = (n = 2)
        mn3opt僎乕儉梡僇乕僪宆偺愗傝懼偊帪娫娫妘Do_4.Checked = (n = 3)
        mn3opt僎乕儉梡僇乕僪宆偺愗傝懼偊帪娫娫妘Do_5.Checked = (n = 4)
        mn3opt僎乕儉梡僇乕僪宆偺愗傝懼偊帪娫娫妘Do_6.Checked = (n = 5)
        mn3opt僎乕儉梡僇乕僪宆偺愗傝懼偊帪娫娫妘Do_7.Checked = (n = 6)
    End Function
    Private Sub mn3opt僎乕儉梡僇乕僪宆偺愗傝懼偊帪娫娫妘Do_1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mn3opt僎乕儉梡僇乕僪宆偺愗傝懼偊帪娫娫妘Do_1.Click, mn3opt僎乕儉梡僇乕僪宆偺愗傝懼偊帪娫娫妘Do_2.Click, mn3opt僎乕儉梡僇乕僪宆偺愗傝懼偊帪娫娫妘Do_3.Click, mn3opt僎乕儉梡僇乕僪宆偺愗傝懼偊帪娫娫妘Do_4.Click, mn3opt僎乕儉梡僇乕僪宆偺愗傝懼偊帪娫娫妘Do_5.Click, mn3opt僎乕儉梡僇乕僪宆偺愗傝懼偊帪娫娫妘Do_6.Click, mn3opt僎乕儉梡僇乕僪宆偺愗傝懼偊帪娫娫妘Do_7.Click
        If gm傾僾儕廔椆偡傞 Then Return
        If gm傾僾儕屌桳僋儔僗 Is Nothing Then Return
        Dim index As Integer = IIf(sender.Equals(mn3opt僎乕儉梡僇乕僪宆偺愗傝懼偊帪娫娫妘Do_1), 1, IIf(sender.Equals(mn3opt僎乕儉梡僇乕僪宆偺愗傝懼偊帪娫娫妘Do_2), 2, IIf(sender.Equals(mn3opt僎乕儉梡僇乕僪宆偺愗傝懼偊帪娫娫妘Do_3), 3, IIf(sender.Equals(mn3opt僎乕儉梡僇乕僪宆偺愗傝懼偊帪娫娫妘Do_4), 4, IIf(sender.Equals(mn3opt僎乕儉梡僇乕僪宆偺愗傝懼偊帪娫娫妘Do_5), 5, IIf(sender.Equals(mn3opt僎乕儉梡僇乕僪宆偺愗傝懼偊帪娫娫妘Do_6), 6, IIf(sender.Equals(mn3opt僎乕儉梡僇乕僪宆偺愗傝懼偊帪娫娫妘Do_7), 7, 0)))))))
        If index = 0 Then Return
        gggstr = gm傾僾儕屌桳僋儔僗.aa_mn3opt僎乕儉僇乕僪宆偺愗傝懼偊帪娫娫妘Do_Click(index)
    End Sub
    Private Sub mn3opt僎乕儉梡僇乕僪宆傪愗懼_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mn3opt僎乕儉梡僇乕僪宆傪愗懼.Click
        If gm傾僾儕廔椆偡傞 Then Return
        Call gm傾僾儕屌桳僋儔僗.mn3opt僎乕儉梡僇乕僪宆傪愗懼_Click(Me)
    End Sub
    Private Sub mn3opt儐乕僓乕僇乕僪偺曇廤_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mn3opt儐乕僓乕僇乕僪偺曇廤.Click
        If gm傾僾儕廔椆偡傞 Then Return
        If oo儐乕僓僇乕僪嶌惉 Is Nothing Then
            oo儐乕僓僇乕僪嶌惉 = New 巐frmDlgUserCardMake
            gggint = oo儐乕僓僇乕僪嶌惉.aaDlgShow(Me, 1.0!, 1.0!, 0.3!, "", 20, 520, 3, 3, 8)
        Else
            oo儐乕僓僇乕僪嶌惉.BringToFront()
        End If
    End Sub
    Friend Sub 儐乕僓乕僇乕僪偺曇廤_SetNothing()
        If oo儐乕僓僇乕僪嶌惉 IsNot Nothing Then
            oo儐乕僓僇乕僪嶌惉 = Nothing
        End If
    End Sub

    Private Sub mn9help巊梡曽朄傾僾儕愱梡_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mn9help巊梡曽朄傾僾儕愱梡.Click
        Call 巐frmHelpWnd.aaHelpWndShow(Me, GMCOM傾僾儕僞僀僩儖("") & "丂偺僿儖僾", gm僿儖僾僼傽僀儖, gm僿儖僾僼傽僀儖CSS)
    End Sub
    Private Sub mn9help巊梡曽朄Web僽儔僂僓_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mn9help巊梡曽朄Web僽儔僂僓.Click
        gggbol = 嘳FileRunOrFolderShow(CInt(Me.Handle), 0, gm僿儖僾僼傽僀儖)
    End Sub
    Private Sub mn9help僶乕僕儑儞忣曬_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mn9help僶乕僕儑儞忣曬.Click
        Dim dlg As New 巐frmDlgAbout
        dlg.AboutBoxShow(Me) '
        dlg.Dispose()
    End Sub
    Private Sub mnbbb嵟戝壔_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mnbbb嵟戝壔.Click
        mmLoading = True
        gggbol = 嘳Forms_嵟戝壔_昗弨壔_儊僯儏乕憖嶌(1, Me, mnbbb嵟戝壔)
        mmLoading = False
        Call frmMain_ResizeEnd(Nothing, Nothing)
    End Sub

    Private Sub tim僎乕儉帪娫_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles tim僎乕儉帪娫.Tick
        With gm傾僾儕屌桳僋儔僗
            gggbol = 僎乕儉僨乕僞乕昞帵(1, .p尰嵼偺僇乕僪枃悢, .p僇乕僪枃悢_尰嵼偺巆傝枃悢)
        End With
    End Sub
    Friend Function 僎乕儉僨乕僞乕昞帵(ByVal r奐巒_0_搑拞_1_廔椆_2_弶婜壔_3 As Integer, ByVal m僗僞乕僩僇乕僪枃悢 As Integer, ByVal m尰嵼偺巆傝僇乕僪枃悢 As Integer) As Boolean
        Dim v As Boolean = (r奐巒_0_搑拞_1_廔椆_2_弶婜壔_3 = 2)
        If r奐巒_0_搑拞_1_廔椆_2_弶婜壔_3 <> 1 Then gggbol = GMCOM_僎乕儉寢壥僷僱儖昞帵_愗懼(IIf(v, 1, 2))
        Return 嘳僎乕儉枃悢_宱夁帪娫_昞帵張棟(r奐巒_0_搑拞_1_廔椆_2_弶婜壔_3, tim僎乕儉帪娫, m僗僞乕僩僇乕僪枃悢, m尰嵼偺巆傝僇乕僪枃悢, mnttt帪娫枃悢, lblMaisuu, lblTime)
    End Function
#End Region

#Region "儊僯儏乕僀儀儞僩-僇乕僪僔儑乕"
    '仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
    Private Sub mn500僇乕僪僔儑乕_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mn500僇乕僪僔儑乕.Click, mn520僇乕僪僔儑乕偼儖乕僾偱幚峴.Click, mn521僇乕僪僔儑乕偼堦夞偩偗幚峴.Click
        Dim r儖乕僾偱幚峴 As Boolean, PropNewSet As Boolean
        If sender.Equals(mn500僇乕僪僔儑乕) Then
            r儖乕僾偱幚峴 = False : PropNewSet = False
        ElseIf sender.Equals(mn520僇乕僪僔儑乕偼儖乕僾偱幚峴) Then
            r儖乕僾偱幚峴 = True : PropNewSet = True
        ElseIf sender.Equals(mn521僇乕僪僔儑乕偼堦夞偩偗幚峴) Then
            r儖乕僾偱幚峴 = False : PropNewSet = True
        Else
            Return
        End If
        If PropNewSet Then gooClsCardShow.p僇乕僪僔儑乕偼儖乕僾偱幚峴 = r儖乕僾偱幚峴
        Dim bbb As Boolean = gooClsCardShow.p僇乕僪僔儑乕偼儖乕僾偱幚峴
        mn520僇乕僪僔儑乕偼儖乕僾偱幚峴.Checked = bbb
        mn521僇乕僪僔儑乕偼堦夞偩偗幚峴.Checked = Not bbb
    End Sub
    Private Sub mn510僇乕僪僔儑乕幚峴偲僆僾僔儑儞愝掕_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mn510僇乕僪僔儑乕幚峴偲僆僾僔儑儞愝掕.Click
        Call gooClsCardShow.aa僇乕僪僔儑乕僆僾僔儑儞Dlg_Load_1_Disposed_2(1, Me)
    End Sub
    Private Sub mn515僇乕僪僔儑乕梡僇乕僪宆傪愝掕_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mn515僇乕僪僔儑乕梡僇乕僪宆傪愝掕.Click
        Call gooClsCardShow.aa僇乕僪僔儑乕梡僇乕僪宆愝掕Dlg_Load_1_Disposed_2(1, Me)
    End Sub
    '仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
    Private Sub mn530僇乕僪僔儑乕幚峴暋悢偺崿崌_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mn530僇乕僪僔儑乕幚峴暋悢偺崿崌.Click, mn531僘乕儉.Click, mn532僕儍儞僾.Click, mn533僗儔僀僪.Click, mn534僋儖僋儖.Click, mn535僗僩僢僾.Click, mn536傾僠僐僠.Click, mn537儁僞儁僞.Click, mn538僗僋僗僋.Click, mn539僼儔僼儔.Click
        If gm傾僾儕廔椆偡傞 Then Return
        Dim index As Integer = IIf(sender.Equals(mn530僇乕僪僔儑乕幚峴暋悢偺崿崌), 0, IIf(sender.Equals(mn531僘乕儉), 1, IIf(sender.Equals(mn532僕儍儞僾), 2, IIf(sender.Equals(mn533僗儔僀僪), 3, IIf(sender.Equals(mn534僋儖僋儖), 4, IIf(sender.Equals(mn535僗僩僢僾), 5, IIf(sender.Equals(mn536傾僠僐僠), 6, IIf(sender.Equals(mn537儁僞儁僞), 7, IIf(sender.Equals(mn538僗僋僗僋), 8, IIf(sender.Equals(mn539僼儔僼儔), 9, -1))))))))))
        If index < 0 Then Return
        Call aa僇乕僪僔儑乕幚峴(index)
    End Sub
    Private Sub mn550僇乕僪僔儑乕儖乕僾傪掆巭_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mn550僇乕僪僔儑乕儖乕僾傪掆巭.Click
        If pp僇乕僪僔儑乕幚峴拞 Then gm僇乕僪儖乕僾掆巭尨場 = 999
    End Sub
    Private Sub mn590偙偺傾僾儕傪廔椆_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mn590偙偺傾僾儕傪廔椆.Click
        If 嘳MsgBox_傾僾儕廔椆偟傑偡偐(app傾僾儕僞僀僩儖) Then Call mn1game偙偺傾僾儕傪廔椆_Click(Nothing, Nothing)
    End Sub
    '仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
    Friend Function aa僇乕僪僔儑乕幚峴(ByRef op As Integer) As Boolean
        '********************************************************************************
        If pp僇乕僪僔儑乕幚峴拞 Then
            Call mn550僇乕僪僔儑乕儖乕僾傪掆巭_Click(Nothing, Nothing)
            Return True
        End If
        If pp僗僀僗僀僼儔僼儔_偄偢傟偐偁傞偄偼椉曽_傪幚峴拞 Then
            Call mn8僗僀僗僀偲儐儔儐儔偡傋偰掆巭_Click(Nothing, Nothing)
            Return True
        End If
        If Not pp僎乕儉僋儕傾忬懺 Then
            Call mn1game僎乕儉僋儕傾_Click(Nothing, Nothing)
            Return True
        End If
        '********************************************************************************
        Dim rc As RECT
        If Not pp僇乕僪僔儑乕幚峴拞 Then
            gggint = SetRect(rc, 0, mMenuHight, Me.ClientRectangle.Right, Me.ClientRectangle.Bottom)
            If (嘳Rect暆(rc) < app僇乕僪孮椞堟嵟彫僒僀僘 Or 嘳Rect崅(rc) < app僇乕僪孮椞堟嵟彫僒僀僘) Then
                MsgBox("尰嵼偺僂僀儞僪僒僀僘偼彫偝偡偓傑偡丅丂丂" & gggCR2 & "僇乕僪僔儑乕偼幚峴偱偒傑偣傫丅丂丂丂" & gggCR2 & "僂僀儞僪僒僀僘傪戝偒偔偟偰偔偩偝偄丅丂丂", 48, "僂僀儞僪僒僀僘傪戝偒偔偟偰偔偩偝偄")
                Return False
            End If
        Else
            Return True
        End If
        '********************************************************************************
        If Not pp僇乕僪僔儑乕幚峴拞 Then
            'qqqqq("aa僇乕僪僔儑乕幚峴  IN    " + CStr(op))
            aa僇乕僪僔儑乕幚峴 = gooClsCardShow.aa僇乕僪僔儑乕奐巒偲掆巭(op)
            'qqqqq("aa僇乕僪僔儑乕幚峴  OUT   " + CStr(op))
        End If
    End Function
    '仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
#End Region

#Region "僗僀僗僀幚峴儊僯儏乕孮"

    Private Sub mn8suiyula_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mn8suiyula.Click
        '    'no op
    End Sub

    Friend Sub mn8僗僀僗僀偲儐儔儐儔傪幚峴_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mn8僗僀僗僀偲儐儔儐儔傪幚峴.Click
        If pp僎乕儉幚峴拞 Then gggint = gm傾僾儕屌桳僋儔僗.aa僎乕儉僋儕傾(False)
        Call oo僗僀僗僀.aa僗僀僗僀偲儐儔儐儔幚峴偺奐巒偲掆巭(3, True)
        '********************************************************************************
        If gm傾僾儕廔椆偡傞 Then Exit Sub
        '********************************************************************************
    End Sub

    Friend Sub mn8僗僀僗僀偲儐儔儐儔偡傋偰掆巭_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mn8僗僀僗僀偲儐儔儐儔偡傋偰掆巭.Click
        If pp僗僀僗僀僼儔僼儔_偄偢傟偐偁傞偄偼椉曽_傪幚峴拞 Then Call oo僗僀僗僀.aa僗僀僗僀偲儐儔儐儔幚峴偺奐巒偲掆巭(3, False)
    End Sub

    Friend Sub mn8僗僀僗僀幚峴_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mn8僗僀僗僀幚峴.Click
        If pp僎乕儉幚峴拞 Then gggint = gm傾僾儕屌桳僋儔僗.aa僎乕儉僋儕傾(False)
        Call oo僗僀僗僀.aa僗僀僗僀偲儐儔儐儔幚峴偺奐巒偲掆巭(1, True)
        '********************************************************************************
        If gm傾僾儕廔椆偡傞 Then Exit Sub
        '********************************************************************************
    End Sub

    Friend Sub mn8僗僀僗僀掆巭_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mn8僗僀僗僀掆巭.Click
        Call oo僗僀僗僀.aa僗僀僗僀偲儐儔儐儔幚峴偺奐巒偲掆巭(1, False)
    End Sub

    Friend Sub mn8儐儔儐儔幚峴_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mn8儐儔儐儔幚峴.Click
        If pp僎乕儉幚峴拞 Then gggint = gm傾僾儕屌桳僋儔僗.aa僎乕儉僋儕傾(False)
        Call oo僗僀僗僀.aa僗僀僗僀偲儐儔儐儔幚峴偺奐巒偲掆巭(2, True)
    End Sub

    Friend Sub mn8儐儔儐儔掆巭_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mn8儐儔儐儔掆巭.Click
        Call oo僗僀僗僀.aa僗僀僗僀偲儐儔儐儔幚峴偺奐巒偲掆巭(2, False)
    End Sub

    Friend Sub mn8僗僀僗僀偲儐儔儐儔傪昞帵_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mn8僗僀僗僀偲儐儔儐儔傪昞帵.Click
        Call gm僗僀僗僀嫟梡僋儔僗.aa僗僀僗僀儐儔儐儔愝掕Dlg_Load_1_Disposed_2(1, Me) 'gggbol = oo僗僀僗僀.aa僗僀僗僀儐儔儐儔愝掕DlgShow(Me)
    End Sub

    Friend Sub mn8僗僀僗僀夋憸傪愝掕_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mn8僗僀僗僀夋憸傪愝掕.Click
        Call oo僗僀僗僀.aa僼傽僀儖夋憸僗僀僗僀梡DlgShow(Me)
    End Sub

    Private Sub mn8偙偺傾僾儕傪廔椆_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mn8偙偺傾僾儕傪廔椆.Click
        Call mn1game偙偺傾僾儕傪廔椆_Click(Nothing, Nothing)
    End Sub


#End Region

#Region "僞僀儅乕僀儀儞僩"
    Private Sub TimEventOn_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles TimEventOn.Tick
        TimEventOn.Enabled = False
        'qqqqq("僞僀儅乕僀儀儞僩  TimEventOn_Tick()")
        Dim opstr As String = TimEventOnStr
        TimEventOnStr = ""
        Select Case opstr
            'Case "mn8僗僀僗僀偲儐儔儐儔傪幚峴_Click"  2023/06/02 del
            '    Call mn8僗僀僗僀偲儐儔儐儔傪幚峴_Click(Nothing, Nothing)
            Case "frmMain_SizeChanged"
                Call frmMain_ResizeEnd(Nothing, Nothing) ': qqqqq("TimEventOn_Tick  frmMain_SizeChanged")
            Case "僼僅乕儉儅僂僗僀儀儞僩張棟_GameEnd"
                pp僎乕儉僋儕傾忬懺 = True
                Call mn1game僎乕儉僋儕傾_Click(Nothing, Nothing)
                Select Case p僎乕儉廔椆帪偺帺摦幚峴儌乕僪
                    Case 1 '
                        gggbol = aa僇乕僪僔儑乕幚峴(0)
                    Case 2 '
                        If oo僗僀僗僀.p僗僀僗僀攚宨夋憸傪昞帵 Then
                            Call mn8僗僀僗僀偲儐儔儐儔傪幚峴_Click(Nothing, Nothing)
                        Else
                            Call mn8僗僀僗僀幚峴_Click(Nothing, Nothing)
                        End If
                    Case Else
                        'no op
                End Select
        End Select
    End Sub

    Friend Function aaTim僇乕僪宆曄峏_EnabledSet(ByVal en As Boolean) As Boolean
        Tim僇乕僪宆曄峏.Enabled = en
    End Function
    Friend Sub Tim僇乕僪宆曄峏_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Tim僇乕僪宆曄峏.Tick
        'Static mmm As Integer
        'qqqqq("frmmain.Tim僇乕僪宆曄峏_Tick")
        '---------------------------------------------------------------
        If pp僎乕儉幚峴拞 Then
            With gm傾僾儕屌桳僋儔僗
                If .p僎乕儉僇乕僪宆偺愗傝懼偊_僇儗儞僩僇僂儞僩_枮婜() Then
                    'mmm = mmm + 1 : qqqqq(CStr(mmm) + " frmmain.Tim僇乕僪宆曄峏_Tick p僎乕儉僇乕僪宆巊梡拞偺尰嵼偺IDX_NextSet")
                    Dim n As Integer = .p僎乕儉僇乕僪宆巊梡拞偺尰嵼偺IDX_NextSet
                    gggbol = .aa僇乕僪偺攝抲偲嵞昤夋(3, 1, False)
                End If
            End With
        ElseIf pp僗僀僗僀僼儔僼儔_偄偢傟偐偁傞偄偼椉曽_傪幚峴拞 Then
            With oo僗僀僗僀
                If .p僗僀僗僀僇乕僪僀儊乕僕偺愗傝懼偊_僇儗儞僩僇僂儞僩_枮婜() Then
                    'mmm = mmm + 1 : qqqqq(CStr(mmm) + " frmmain.Tim僇乕僪宆曄峏_Tick p僗僀僗僀僇乕僪僀儊乕僕偺愗傝懼偊_僇儗儞僩僇僂儞僩_枮婜")
                    Dim n As Integer = p僗僀僗僀僇乕僪僀儊乕僕偺愗傝懼偊IDX_NextSet()
                    If (gAppEventMaker.僼僅乕儉偺昞帵徚嫀_愝掕偲庢摼(0, gmDlg僗僀僗僀儐儔儐儔)) Then
                        oo僗僀僗僀.aa僗僀僗僀儐儔儐儔愝掕Dlg_aaBtnOptStateSet("p僗僀僗僀僇乕僪僀儊乕僕")
                    End If
                End If
            End With
        Else
            Tim僇乕僪宆曄峏.Enabled = False
        End If
    End Sub

#End Region

#Region "僂僀儞僪僂偵僪儔僢僌僪儘僢僾偱僼傽僀儖捛壛"
    Private Sub frmMain_DragOver(ByVal sender As Object, ByVal e As DragEventArgs) Handles Me.DragOver
        If oo僗僀僗僀.DlgFile僗僀僗僀梡.lbl嶍彍儌乕僪.Visible = True Then Return
        If pp僗僀僗僀僼儔僼儔_偄偢傟傕掆巭偟偰偄傞 Then Return
        gggbol = 嘳OLEDragDrop僼傽僀儖僀儀儞僩_Drag_Is_巜掕EXT_IN(e, gco奼挘巕廤_夋憸)
    End Sub
    Private Sub frmMain_DragDrop(ByVal sender As Object, ByVal e As DragEventArgs) Handles Me.DragDrop
        If oo僗僀僗僀.DlgFile僗僀僗僀梡.lbl嶍彍儌乕僪.Visible = True Then Return
        If pp僗僀僗僀僼儔僼儔_偄偢傟傕掆巭偟偰偄傞 Then Return
        Call zzMe_or_pctBmp_or_pct儊僀儞_DragDrop_COM(sender, e)
    End Sub
    '***********************************************************************
    Private Sub pct儊僀儞_DragOver(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles pct儊僀儞.DragOver
        If gm傾僾儕屌桳僋儔僗.DlgFile僎乕儉梡.lbl嶍彍儌乕僪.Visible = True Then Return
        If pp僗僀僗僀僼儔僼儔_偄偢傟偐偁傞偄偼椉曽_傪幚峴拞 Then Return
        gggbol = 嘳OLEDragDrop僼傽僀儖僀儀儞僩_Drag_Is_巜掕EXT_IN(e, gco奼挘巕廤_夋憸)
    End Sub
    Private Sub pct儊僀儞_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles pct儊僀儞.DragDrop
        If gm傾僾儕屌桳僋儔僗.DlgFile僎乕儉梡.lbl嶍彍儌乕僪.Visible = True Then Return
        If pp僗僀僗僀僼儔僼儔_偄偢傟偐偁傞偄偼椉曽_傪幚峴拞 Then Return
        Call zzMe_or_pctBmp_or_pct儊僀儞_DragDrop_COM(sender, e)
    End Sub
    '***********************************************************************
    Private Sub zzMe_or_pctBmp_or_pct儊僀儞_DragDrop_COM(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs)
        Dim wFolders_0_Ubound() As String = {""} : Dim wFiles() As String = {""} : Dim wDrpX_inControl, wDrpY_inControl As Integer
        If 嘳OLEDragDrop僼傽僀儖僀儀儞僩(3, sender, e, wFolders_0_Ubound, wFiles, wDrpX_inControl, wDrpY_inControl) Then
            'qqqqq("wFolders_0_Ubound") : For a = 0 To UBound(wFolders_0_Ubound) : qqqqq(wFolders_0_Ubound(a)) : Next
            'qqqqq("wFiles_0_Ubound") : For a = 0 To UBound(wFiles_0_Ubound) : qqqqq(wFiles_0_Ubound(a)) : Next
            'qqqqq(CStr(wDrpX_inControl))
            'qqqqq(CStr(wDrpY_inControl))
        End If
        Dim max As Integer = 嘳暥攝楍傪僛儘儀乕僗偐傜堧儀乕僗偵偡傞(wFiles)
        gmFlag_On_OLEDropFile = True
        If sender.Equals(Me) Then
            gggbol = oo僗僀僗僀.DlgFile僗僀僗僀梡.aa僼傽僀儖夋憸堦枃傪儕僗僩偵捛壛_on_DRAG_DROP_in_frmMain(wFiles)
        Else
            gggbol = gm傾僾儕屌桳僋儔僗.DlgFile僎乕儉梡.aa僼傽僀儖夋憸堦枃傪儕僗僩偵捛壛_on_DRAG_DROP_in_frmMain(wFiles)
        End If
        gmFlag_On_OLEDropFile = False
    End Sub
#End Region

#Region "pct儊僀儞_儅僂僗僀儀儞僩"
    Private Sub pct儊僀儞_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pct儊僀儞.MouseDown
        gggbol = pct儊僀儞_pctCard00_01_Mouse_Down_Up_COM(gcoMsDown, e.Button, e.X, e.Y, 0, 0, 0)
    End Sub
    Private Sub pct儊僀儞_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pct儊僀儞.MouseUp
        gggbol = pct儊僀儞_pctCard00_01_Mouse_Down_Up_COM(gcoMsUp, e.Button, e.X, e.Y, 0, 0, 0)
    End Sub
    Private Sub pctCard00_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pctCard00.MouseDown
        gggbol = pct儊僀儞_pctCard00_01_Mouse_Down_Up_COM(gcoMsDown, e.Button, e.X, e.Y, 123, pctCard00.Left, pctCard00.Top)
    End Sub
    Private Sub pctCard00_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pctCard00.MouseUp
        gggbol = pct儊僀儞_pctCard00_01_Mouse_Down_Up_COM(gcoMsUp, e.Button, e.X, e.Y, 123, pctCard00.Left, pctCard00.Top)
    End Sub
    Private Sub pctCard01_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pctCard01.MouseDown
        gggbol = pct儊僀儞_pctCard00_01_Mouse_Down_Up_COM(gcoMsDown, e.Button, e.X, e.Y, 124, pctCard01.Left, pctCard01.Top)
    End Sub
    Private Sub pctCard01_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pctCard01.MouseUp
        gggbol = pct儊僀儞_pctCard00_01_Mouse_Down_Up_COM(gcoMsUp, e.Button, e.X, e.Y, 124, pctCard01.Left, pctCard01.Top)
    End Sub
    Private Function pct儊僀儞_pctCard00_01_Mouse_Down_Up_COM(ByVal op As Integer, ByVal btn As Integer, ByVal x As Integer, ByVal y As Integer, ByVal Addbtn As Integer, ByVal Addx As Integer, ByVal Addy As Integer) As Boolean
        If gm傾僾儕廔椆偡傞 Then Return False
        If Not pp僎乕儉幚峴拞 Then Return False
        If gm僎乕儉幚峴拞_in_MouseEvent Then Return False
        If gm僎乕儉幚峴拞_in_MouseUp_張棟拞 Then Return False
        If pp僗僀僗僀僼儔僼儔_偄偢傟偐偁傞偄偼椉曽_傪幚峴拞 Then Return False '0 = 側偟丂丂丂1 = 僗僀僗僀偺傒丂丂丂2 = 儐儔儐儔偺傒丂丂丂3 = 僗僀僗僀儐儔儐儔椉曽
        If pp僇乕僪僔儑乕幚峴拞 Then Return False
        '********************************************************************************
        Dim RET As Boolean : Dim ShiftXY As Integer = 3 : Dim wIsMoveDownToUp As Boolean = False
        Dim wGameEnd As Boolean = False
        Dim bbb As Integer = btn + Addbtn
        Dim xxx As Integer = x + Addx
        Dim yyy As Integer = y + Addy
        RET = 嘳儅僂僗僀儀儞僩専嵏2022(op, bbb, xxx, yyy, ShiftXY, ShiftXY, ShiftXY, ShiftXY, wIsMoveDownToUp)
        If RET And op = gcoMsUp Then
            RET = gm傾僾儕屌桳僋儔僗.aa僼僅乕儉儅僂僗僀儀儞僩張棟(xxx, yyy, pctCard00, pctCard01, wGameEnd)
        End If
        Return RET
    End Function

#End Region

#Region "pnl僎乕儉寢壥"
    '***************************************************************************************************************
    'pnl僎乕儉寢壥丂傪丂徚偡
    Private Sub pnl僎乕儉寢壥_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles pnl僎乕儉寢壥.Click, lblHed.Click, lblMaisuu.Click, lblTime.Click
        gggbol = GMCOM_僎乕儉寢壥僷僱儖昞帵_愗懼(2)
    End Sub
    Private Sub pnl僎乕儉寢壥_VisibleChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles pnl僎乕儉寢壥.VisibleChanged
        If mNew幚峴拞 Then Return
        If pnl僎乕儉寢壥.Visible = False Then gm僎乕儉寢壥僷僱儖昞帵偑徚嫀偝傟偨 = True
    End Sub
    '***************************************************************************************************************
#End Region

#Region "aa奜晹偲偺僀儞僞僼僃僀僗"

    Friend Function aa儊僯儏乕僆僽僕僃愝掕(ByRef 僾儘僷 As String, ByRef 儊僰() As ToolStripMenuItem, ByRef 壓 As Integer, ByRef 忋 As Integer) As Boolean
        '--------------------------------------------------------------------------------
        '2022/12/15  懠偺傾僾儕偲偺嫟梡娭悢偺偨傔偺僟儈乕僐乕僪
        Static mnu僥儞億儔儕 As ToolStripMenuItem
        '2022/12/15  懠偺傾僾儕偲偺嫟梡娭悢偺偨傔偺僟儈乕僐乕僪
        '--------------------------------------------------------------------------------
        Dim a As Integer
        Select Case 僾儘僷
            '--------------------------------------------------------------------------------
            '2021/06/25  摿暿偵捛壛偟偨僾儘僷
            Case "p僎乕儉攚宨夋憸偺愗傝懼偊帪娫娫妘"
                a = 嘳儊僯儏乕攝楍嶌惉_1_20(儊僰, mn1game僎乕儉攚宨夋憸偺愗傝懼偊帪娫娫妘Do_1, mn1game僎乕儉攚宨夋憸偺愗傝懼偊帪娫娫妘Do_2, mn1game僎乕儉攚宨夋憸偺愗傝懼偊帪娫娫妘Do_3, mn1game僎乕儉攚宨夋憸偺愗傝懼偊帪娫娫妘Do_4, mn1game僎乕儉攚宨夋憸偺愗傝懼偊帪娫娫妘Do_5)
                壓 = 1 : 忋 = UBound(儊僰)
                '--------------------------------------------------------------------------------
            Case "p尰嵼偺僇乕僪枃悢"
                a = 嘳儊僯儏乕攝楍嶌惉_1_20(儊僰, mn1game僇乕僪枃悢巜掕Do_1, mn1game僇乕僪枃悢巜掕Do_2, mn1game僇乕僪枃悢巜掕Do_3, mn1game僇乕僪枃悢巜掕Do_4, mn1game僇乕僪枃悢巜掕Do_5, mn1game僇乕僪枃悢巜掕Do_6)
                壓 = 1 : 忋 = UBound(儊僰)
            Case "p僸儞僩昞帵"
                a = 嘳儊僯儏乕攝楍嶌惉_1_20(儊僰, mn1game僸儞僩昞帵Do_1, mn1game僸儞僩昞帵Do_2, mn1game僸儞僩昞帵Do_3, mn1game僸儞僩昞帵Do_4)
                壓 = 1 : 忋 = UBound(儊僰)
                '--------------------------------------------------------------------------------
                '2022/12/15  懠偺傾僾儕偲偺嫟梡娭悢偺偨傔偺僟儈乕僐乕僪
            Case "p僗僀僗僀傪帺摦幚峴"
                If mnu僥儞億儔儕 IsNot Nothing Then
                    mnu僥儞億儔儕.Dispose()
                End If
                mnu僥儞億儔儕 = New ToolStripMenuItem
                壓 = 1 : 忋 = 1
                ReDim 儊僰(壓)
                儊僰(壓) = mnu僥儞億儔儕
                '2022/12/15  懠偺傾僾儕偲偺嫟梡娭悢偺偨傔偺僟儈乕僐乕僪
                '--------------------------------------------------------------------------------
        End Select
        Return True
        ' ''--------------------------------------------------------------------------------
        ''Static m As Long
        ''m = m + 1: If m = 1 Then qqqqq "************************************":
        ''qqqqq "aa儊僯... " + 僾儘僷 + "   " + CStr(壓) + " - " + CStr(忋)
        ' ''--------------------------------------------------------------------------------
    End Function
    Friend Function aa僾儘僷僥傿弶婜壔_INI撉弌偟彂崬傒(ByRef 僾儘僷僐儅儞僪 As Integer, ByRef ini攝楍() As String) As Boolean
        Dim CurIDX As Integer
        Dim 攝楍忋尷 As Integer = 1000
        Dim ssss As String
        Select Case 僾儘僷僐儅儞僪
            Case gco僾儘僷弶婜壔
                Call p僎乕儉廔椆帪偺帺摦幚峴儌乕僪_RW(僾儘僷僐儅儞僪)
                Call p僗僀僗僀僇乕僪僀儊乕僕_RW(僾儘僷僐儅儞僪)
            Case gco僾儘僷iniRD
                Const ads As String = "="
                Dim Hedp僎乕儉廔椆帪偺帺摦幚峴儌乕僪_RW As String = p僎乕儉廔椆帪偺帺摦幚峴儌乕僪_RW(gco僾儘僷柤) + ads
                Dim Hedp僗僀僗僀僇乕僪僀儊乕僕_RW As String = p僗僀僗僀僇乕僪僀儊乕僕_RW(gco僾儘僷柤) + ads
                For CurIDX = 1 To UBound(ini攝楍)
                    ssss = ini攝楍(CurIDX)
                    If InStr(ssss, Hedp僎乕儉廔椆帪偺帺摦幚峴儌乕僪_RW) = 1 Then
                        Call p僎乕儉廔椆帪偺帺摦幚峴儌乕僪_RW(僾儘僷僐儅儞僪, ssss)
                    ElseIf InStr(ssss, Hedp僗僀僗僀僇乕僪僀儊乕僕_RW) = 1 Then
                        Call p僗僀僗僀僇乕僪僀儊乕僕_RW(僾儘僷僐儅儞僪, ssss)
                    End If
                Next
            Case gco僾儘僷iniWR
                ReDim ini攝楍(攝楍忋尷)
                CurIDX = 0
                CurIDX = CurIDX + 1 : If CurIDX <= 攝楍忋尷 Then ini攝楍(CurIDX) = "" Else GoTo exitpos_gco僾儘僷iniWR
                CurIDX = CurIDX + 1 : If CurIDX <= 攝楍忋尷 Then ini攝楍(CurIDX) = "Use In aa僾儘僷僥傿弶婜壔_INI撉弌偟彂崬傒()" Else GoTo exitpos_gco僾儘僷iniWR
                CurIDX = CurIDX + 1 : If CurIDX <= 攝楍忋尷 Then ini攝楍(CurIDX) = "仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭 DataStart 仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭" Else GoTo exitpos_gco僾儘僷iniWR
                CurIDX = CurIDX + 1 : If CurIDX <= 攝楍忋尷 Then ini攝楍(CurIDX) = p僎乕儉廔椆帪偺帺摦幚峴儌乕僪_RW(僾儘僷僐儅儞僪) Else Return True
                CurIDX = CurIDX + 1 : If CurIDX <= 攝楍忋尷 Then ini攝楍(CurIDX) = p僗僀僗僀僇乕僪僀儊乕僕_RW(僾儘僷僐儅儞僪) Else Return True
        End Select
        gggbol = gm傾僾儕屌桳僋儔僗.aa僾儘僷僥傿弶婜壔_INI撉弌偟彂崬傒sub(僾儘僷僐儅儞僪, ini攝楍, CurIDX)
        gggbol = oo僗僀僗僀.aa僾儘僷僥傿弶婜壔_INI撉弌偟彂崬傒sub(僾儘僷僐儅儞僪, ini攝楍, CurIDX)
        gggbol = oo儐儔儐儔.aa僾儘僷僥傿弶婜壔_INI撉弌偟彂崬傒sub(僾儘僷僐儅儞僪, ini攝楍, CurIDX)
        gggbol = gooClsCardShow.aa僾儘僷僥傿弶婜壔_INI撉弌偟彂崬傒sub(僾儘僷僐儅儞僪, ini攝楍, CurIDX)
        If 僾儘僷僐儅儞僪 = gco僾儘僷iniWR Then
            CurIDX = CurIDX + 1 : If CurIDX <= 攝楍忋尷 Then ini攝楍(CurIDX) = "仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭 DataEnd 仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭"
            CurIDX = CurIDX + 1 : If CurIDX <= 攝楍忋尷 Then ini攝楍(CurIDX) = ""
            ReDim Preserve ini攝楍(CurIDX)
        End If
exitpos_gco僾儘僷iniWR:
        ReDim Preserve ini攝楍(CurIDX) : Return True
        Return True
    End Function

    Friend Function aa_傕偟僎乕儉幚峴拞側傜偽嵞昤夋(ByVal 嫟桳偺偨傔偺僟儈乕侾 As Integer, ByRef 嫟桳偺偨傔偺僟儈乕俀 As Boolean, ByRef 嫟桳偺偨傔偺僟儈乕俁 As Boolean) As Boolean
        If pp僎乕儉幚峴拞 Then
            Return gm傾僾儕屌桳僋儔僗.aa僇乕僪偺攝抲偲嵞昤夋(3)
        ElseIf pp僗僀僗僀僼儔僼儔_偄偢傟傕掆巭偟偰偄傞 Then
            gm傾僾儕屌桳僋儔僗.aa僎乕儉僋儕傾(False)
        End If
        Return False
    End Function

#End Region

#Region "僾儘僷僥傿"
    '仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
    Friend Property p僎乕儉廔椆帪偺帺摦幚峴儌乕僪() As Integer
        Get
            Return Val(p僎乕儉廔椆帪偺帺摦幚峴儌乕僪_RW(gco僾儘僷Get))
        End Get
        Set(ByVal Value As Integer)
            Call p僎乕儉廔椆帪偺帺摦幚峴儌乕僪_RW(gco僾儘僷Let, CStr(Value))
        End Set
    End Property
    Friend Function p僎乕儉廔椆帪偺帺摦幚峴儌乕僪_RW(ByRef 僾儘僷僐儅儞僪 As Integer, Optional ByRef s As String = "") As String
        'frmMain 偺儊僯儏乕偵偁傞
        '1  僇乕僪僔儑乕  mn1game帺摦幚峴僇乕僪僔儑乕
        '2  僗僀僗僀     mn1game帺摦幚峴僗僀僗僀
        '3  壗傕偟側偄   mn1game帺摦幚峴壗傕偟側偄
        Const PropName As String = "p僎乕儉廔椆帪偺帺摦幚峴儌乕僪" : Const 抣DEF As Integer = 1 : Static 壓, 抣, 忋 As Integer  '1,2,3
        Dim 媽抣 As Integer = 抣
        Select Case 僾儘僷僐儅儞僪
            Case gco僾儘僷柤 : Return PropName
            Case gco僾儘僷弶婜壔 : 抣 = 抣DEF : 壓 = 1 : 忋 = 3
            Case gco僾儘僷婯掕抣 : Return CStr(抣DEF)
            Case gco僾儘僷Get : Return CStr(抣)
            Case gco僾儘僷Let : 抣 = 嘳悢抣斖埻Int(壓, 忋, Val(s))
            Case gco僾儘僷iniWR : Return 嘳Ini僨乕僞乕暥_RW(gco僾儘僷iniWR, PropName, CStr(抣))
            Case gco僾儘僷iniRD : 抣 = 嘳悢抣斖埻Int(壓, 忋, CInt(嘳Ini僨乕僞乕暥_RW(gco僾儘僷iniRD, PropName, s)))
        End Select
        Select Case 僾儘僷僐儅儞僪
            Case gco僾儘僷弶婜壔, gco僾儘僷Let, gco僾儘僷iniRD
                mn1game帺摦幚峴僇乕僪僔儑乕.Checked = (抣 = 1)
                mn1game帺摦幚峴僗僀僗僀.Checked = (抣 = 2)
                mn1game帺摦幚峴壗傕偟側偄.Checked = (抣 = 3)
        End Select
        Return CStr(抣)
    End Function
    '仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
    Friend Function p僗僀僗僀僇乕僪僀儊乕僕偺愗傝懼偊IDX_NextSet() As Integer
        p僗僀僗僀僇乕僪僀儊乕僕 = p僗僀僗僀僇乕僪僀儊乕僕 + 1
        Return p僗僀僗僀僇乕僪僀儊乕僕
    End Function
    Friend Property p僗僀僗僀僇乕僪僀儊乕僕() As Integer
        '0 = 儈僢僋僗        '1 = 暥帤        '2 = 傕傛偆        '3 = 夋憸
        Get
            Return CInt(p僗僀僗僀僇乕僪僀儊乕僕_RW(gco僾儘僷Get))
        End Get
        Set(ByVal Value As Integer)
            Call p僗僀僗僀僇乕僪僀儊乕僕_RW(gco僾儘僷Let, CStr(Value))
        End Set
    End Property
    Friend Function p僗僀僗僀僇乕僪僀儊乕僕_RW(ByRef 僾儘僷僐儅儞僪 As Integer, Optional ByRef s As String = "") As String
        '0 to 3  list box index
        Const PropName As String = "p僗僀僗僀僇乕僪僀儊乕僕" : Const 抣DEF As Integer = 0 : Static 抣 As Integer
        Dim 媽抣 As Integer = 抣
        Select Case 僾儘僷僐儅儞僪
            Case gco僾儘僷柤 : Return PropName
            Case gco僾儘僷弶婜壔 : 抣 = 抣DEF
            Case gco僾儘僷婯掕抣 : Return CStr(抣DEF)
            Case gco僾儘僷Get : Return CStr(抣)
            Case gco僾儘僷Let
                Dim n As Integer = CInt(s)
                If n > 3 Then n = 0
                抣 = 嘳悢抣斖埻Int(0, 3, n)
            Case gco僾儘僷iniWR : Return 嘳Ini僨乕僞乕暥_RW(gco僾儘僷iniWR, PropName, CStr(抣))
            Case gco僾儘僷iniRD : 抣 = 嘳悢抣斖埻Int(0, 3, CInt(嘳Ini僨乕僞乕暥_RW(gco僾儘僷iniRD, PropName, s)))
        End Select
        Select Case 僾儘僷僐儅儞僪
            Case gco僾儘僷Let
                If 媽抣 <> 抣 Then
                    If (gAppEventMaker.僼僅乕儉偺昞帵徚嫀_愝掕偲庢摼(0, gmDlg僗僀僗僀儐儔儐儔)) Then
                        oo僗僀僗僀.aa僗僀僗僀儐儔儐儔愝掕Dlg_aaBtnOptStateSet("p僗僀僗僀僇乕僪僀儊乕僕")
                    End If
                    If (pp僗僀僗僀幚峴拞 Or pp僗僀僗僀and儐儔儐儔幚峴拞) Then
                        '--------------------------------------------------------------------------------------
                        gm僗僀僗僀嵞僗僞乕僩_for_偐側僇僫 = True    '2023/05/13 add new
                        '--------------------------------------------------------------------------------------
                    End If
                End If
        End Select
        Return CStr(抣)
    End Function

#End Region

#Region "僀儀儞僩 from gAppEventMaker"

    Private Sub 僀儀儞僩gAppEventMaker_Dlg僗僀僗僀偲儐儔儐儔傪昞帵徚嫀(ByVal r昞帵True徚嫀False As Boolean) Handles 僀儀儞僩gAppEventMaker.Dlg僗僀僗僀偲儐儔儐儔傪昞帵徚嫀
        If (gAppEventMaker.僼僅乕儉偺昞帵徚嫀_愝掕偲庢摼(0, gmDlg僗僀僗僀儐儔儐儔) = False) And r昞帵True徚嫀False Then
            Call mn8僗僀僗僀偲儐儔儐儔傪昞帵_Click(Nothing, Nothing)
        End If
    End Sub

    Private Sub 僀儀儞僩gAppEventMaker_僇乕僪僔儑乕奐巒偲掆巭(ByVal r奐巒true掆巭false As Boolean) Handles 僀儀儞僩gAppEventMaker.僇乕僪僔儑乕奐巒偲掆巭
        Dim ev As Boolean = (r奐巒true掆巭false = False)
        mn1game.Visible = ev
        mn3opt.Visible = ev
        mn500僇乕僪僔儑乕.Visible = True
        mn8suiyula.Visible = ev
        mn9help僶乕僕儑儞忣曬.Enabled = ev
        mnu515僙僷儗乕僞乕.Visible = ev
        mn520僇乕僪僔儑乕偼儖乕僾偱幚峴.Visible = ev
        mn521僇乕僪僔儑乕偼堦夞偩偗幚峴.Visible = ev
        mnu525僙僷儗乕僞乕.Visible = ev
        mn530僇乕僪僔儑乕幚峴暋悢偺崿崌.Visible = ev
        mn531僘乕儉.Visible = ev
        mn532僕儍儞僾.Visible = ev
        mn533僗儔僀僪.Visible = ev
        mn534僋儖僋儖.Visible = ev
        mn535僗僩僢僾.Visible = ev
        mn536傾僠僐僠.Visible = ev
        mn537儁僞儁僞.Visible = ev
        mn538僗僋僗僋.Visible = ev
        mn539僼儔僼儔.Visible = ev
        mn550僇乕僪僔儑乕儖乕僾傪掆巭.Enabled = Not ev
        gggbol = GMCOM_僎乕儉僨乕僞乕儊僯儏乕_VisibleSet(mnttt帪娫枃悢)
    End Sub

    Private Sub 僀儀儞僩gAppEventMaker_僎乕儉奐巒偲掆巭(ByVal r奐巒True掆巭False As Boolean, ByRef wOptionRetStr As String) Handles 僀儀儞僩gAppEventMaker.僎乕儉奐巒偲掆巭
        If r奐巒True掆巭False Then
            If pp僗僀僗僀僼儔僼儔_偄偢傟偐偁傞偄偼椉曽_傪幚峴拞 Then
                Call oo僗僀僗僀.aa僗僀僗僀偲儐儔儐儔幚峴偺奐巒偲掆巭(5, False)
            End If
        Else
        End If
        mn1game僎乕儉僋儕傾.Enabled = r奐巒True掆巭False
        mn1game僎乕儉攚宨夋憸傪師偺夋憸偵愗傝懼偊.Enabled = r奐巒True掆巭False
        mn3opt僎乕儉梡僇乕僪宆傪愗懼.Enabled = r奐巒True掆巭False
        mn500僇乕僪僔儑乕.Visible = Not r奐巒True掆巭False
        mn8suiyula.Visible = Not r奐巒True掆巭False
    End Sub

    Private Sub 僀儀儞僩gAppEventMaker_僗僀僗僀偲儐儔儐儔奐巒偲掆巭() Handles 僀儀儞僩gAppEventMaker.僗僀僗僀偲儐儔儐儔奐巒偲掆巭
        If gm傾僾儕廔椆偡傞 Then Return
        gggbol = 僀儀儞僩gAppEventMaker.僗僀僗僀偲儐儔儐儔奐巒偲掆巭_嫟捠張棟("frmMain", mn8僗僀僗僀偲儐儔儐儔傪幚峴, mn8僗僀僗僀偲儐儔儐儔偡傋偰掆巭, _
                                   mn8僗僀僗僀幚峴, mn8僗僀僗僀掆巭, mn8儐儔儐儔幚峴, mn8儐儔儐儔掆巭, _
                                   mn8僗僀僗僀偲儐儔儐儔傪昞帵, mn8僗僀僗僀夋憸傪愝掕)
        '--------------------------------------
        Dim ev As Boolean = pp僗僀僗僀僼儔僼儔_偄偢傟傕掆巭偟偰偄傞
        mn1game.Visible = ev
        mn3opt.Visible = ev
        mn500僇乕僪僔儑乕.Visible = ev
        mn9help僶乕僕儑儞忣曬.Enabled = ev
        '--------------------------------------
        gggbol = GMCOM_僎乕儉僨乕僞乕儊僯儏乕_VisibleSet(mnttt帪娫枃悢)
    End Sub

    Private Sub 僀儀儞僩gAppEventMaker_僗僀僗僀儐儔儐儔夋憸昞帵ONOFF(ByVal r夋憸昞帵OnOff As Boolean) Handles 僀儀儞僩gAppEventMaker.僗僀僗僀儐儔儐儔夋憸昞帵ONOFF
        If gm傾僾儕廔椆偡傞 Then Return
        '------------------------------------------------------------------
        mn8僗僀僗僀偲儐儔儐儔傪幚峴.Enabled = r夋憸昞帵OnOff
        mn8儐儔儐儔幚峴.Enabled = r夋憸昞帵OnOff
    End Sub

    Private Sub 僀儀儞僩gAppEventMaker_僼僅乕儉偺昞帵偲徚嫀(ByVal r僼僅乕儉柤ID As Integer, ByVal r昞帵True徚嫀False As Boolean) Handles 僀儀儞僩gAppEventMaker.僼僅乕儉偺昞帵偲徚嫀
        If gm傾僾儕廔椆偡傞 Then
            qqqqq("gm傾僾儕廔椆偡傞 Event_僼僅乕儉偺昞帵偲徚嫀()" + Me.Name)
            Return
        End If
        Dim b1 As Boolean = Not r昞帵True徚嫀False
        Select Case r僼僅乕儉柤ID
            Case gmDlgFile僎乕儉梡
                mn1game僎乕儉攚宨夋憸僼傽僀儖傪愝掕.Enabled = b1
                mn1game僎乕儉攚宨夋憸偺愗傝懼偊帪娫娫妘.Enabled = b1
                mn1game僎乕儉攚宨夋憸傪師偺夋憸偵愗傝懼偊.Enabled = b1 And pp僎乕儉幚峴拞
            Case gmDlg僆僾僔儑儞愝掕
                mn3opt僆僾僔儑儞愝掕Dlg昞帵.Enabled = b1
            Case gmDlg僒僂儞僪愝掕
                mn3opt僒僂儞僪愝掕Dlg昞帵.Enabled = b1
            Case gmDlg僗僀僗僀儐儔儐儔
                mn8僗僀僗僀偲儐儔儐儔傪昞帵.Enabled = b1
            Case gmDlgFile僗僀僗僀梡
                mn8僗僀僗僀夋憸傪愝掕.Enabled = b1
            Case gmDlg僇乕僪僔儑乕僆僾僔儑儞
                mn510僇乕僪僔儑乕幚峴偲僆僾僔儑儞愝掕.Enabled = b1
        End Select
    End Sub

#End Region

#Region "仭仭 屲cls僗僀僗僀  嫟梡僋儔僗傪巊梡偡傞偨傔偺僟儈乕娭悢"
    Friend Sub mn8僗僀僗僀梡僇乕僪宆傪愝掕_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        '嫟梡僋儔僗傪巊梡偡傞偨傔偺僟儈乕娭悢
    End Sub
    Friend Function p僗僀僗僀僇乕僪宆儕乕僕儑儞傪嶌傞(ByVal op As Integer, ByRef 夋暆 As Integer, ByRef 夋崅 As Integer, ByRef 榞暆幚悺 As Integer, ByRef Rgn夋 As Integer, ByRef Rgn榞 As Integer) As Boolean
        Return False
    End Function
#End Region

End Class




