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

#Region "愰尵"
    Private mNew幚峴拞 As Boolean = True
    Public oo僺僞儁僞 As New ClsPitapeta
    Public oo僗僀僗僀 As New 屲cls僗僀僗僀
    Public WithEvents oo儐儔儐儔 As New 屲cls儐儔儐儔
    Public WithEvents 僎乕儉梡僇乕僪宆愝掕Dlg As 巐frmDlgUseCardSelect
    Public WithEvents 僗僀僗僀僇乕僪宆愝掕Dlg As 巐frmDlgUseCardSelect
    Private oo儐乕僓僇乕僪嶌惉 As 巐frmDlgUserCardMake = Nothing

    Public mMenuHight As Integer
    Public mmLoading As Boolean
    Private mIniReading As Boolean = False
    Private m僒僀僘僙僢僩嬛巭 As Boolean
    Private TimEventOnStr As String = ""
    Private mCallFromFormLoad As Boolean = False
    Private mCall_In_frmMain_ResizeEnd As Boolean = False

    Private mOldWndState As FormWindowState = FormWindowState.Normal
    Private DoeventCall As Boolean = False
    '**************************************************************************************************************************************
    Private WithEvents 僀儀儞僩gAppEventMaker As 屲clsEventMaker
    '**************************************************************************************************************************************
#End Region

#Region "AppIniFileOp"
    '仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴仴
    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 As Boolean = 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
    '仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯仯
#End Region

    '********************************************************************************
    Friend Sub frmDlgUseCardSelect_User_s_DisPose(ByVal rMe_gmDlgID As Integer)
        '2023/05/28 new add
        If rMe_gmDlgID = gmDlg僎乕儉僇乕僪宆傪愝掕 Then
            Call aa僎乕儉梡僇乕僪宆傪愝掕Dlg_Load_1_Disposed_2(2, Nothing)
        ElseIf rMe_gmDlgID = gmDlg僗僀僗僀僇乕僪宆傪愝掕 Then
            Call 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
        '***********************************************************************
        gm傾僾儕屌桳僋儔僗 = oo僺僞儁僞 '2022/0812  懠偺傾僾儕偱嫟桳僋儔僗傪巊梡偡傞偨傔偺僄僀儕傾僗
        gm僗僀僗僀嫟梡僋儔僗 = oo僗僀僗僀
        Try
            gggbol = gm傾僾儕屌桳僋儔僗.aa弶婜愝掕僆僽僕僃愝掕()
            gggbol = oo僗僀僗僀.aa弶婜愝掕()
            '***********************************************************************
            If Not GMCOM傾僾儕MainForm_AppIniFile憖嶌(Me, mIniReading) Then End
            '***********************************************************************
            '----------------------------------------
            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儊僀儞, pctBmp, Nothing, Nothing)
            '----------------------------------------
            Call 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 System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
        'qqqqq("仴 frmMain_FormClosing 仴仴仴仴仴仴仴仴仴仴")
        Dim Cancel As Boolean = e.Cancel
        Dim UnloadMode As System.Windows.Forms.CloseReason = e.CloseReason

        Me.Cursor = Cursors.Default
        '----------------------------------------------
        Call 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
        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 oldWndSta As FormWindowState
        If mCall_In_frmMain_ResizeEnd Then Return
        If oldWndSta <> Me.WindowState Then
            If Me.WindowState <> FormWindowState.Minimized Then
                If pp僗僀僗僀僼儔僼儔_偄偢傟偐偁傞偄偼椉曽_傪幚峴拞 Then
                    Call frmMain_ResizeEnd(Nothing, Nothing)
                Else
                    pct儊僀儞.Visible = False : pctBmp.Left = 10000
                    TimEventOnStr = "frmMain_SizeChanged"
                    TimEventOn.Enabled = True
                End If
            Else
                Call frmMain_ResizeEnd(Nothing, Nothing) '僼儔僌愝掕偺傒偱婣偭偰偔傞
            End If
        End If
        oldWndSta = Me.WindowState
        ''Static mmm As Integer   : mmm = mmm + 1 : qqqqq("仭frmMain_SizeChanged " + Format(mmm, "0000"))
    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 : pctBmp.Left = 10000
        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 mCall_In_frmMain_ResizeEnd Then Return
        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
            mOldWndState = Me.WindowState : Return
        End If
        If 僐僐偐傜屇傃弌偟偨 Then Return
        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
                If mOldWD <> Me.Width Or mOldHT <> Me.Height Or mOldWndState <> Me.WindowState Then
                    Me.BackColor = Color.White
                    Me.Refresh()
                End If
                pct儊僀儞.Visible = False
                pctBmp.Left = 10000
                gm僗僀僗僀嵞僗僞乕僩尨場 = gcFormResize
            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)
                pctBmp.SetBounds(pctBmp.Left, YY, WD, HT)
                If mmLoading Then
                    mmLoading = False
                ElseIf pp僎乕儉幚峴拞 Then
                    僐僐偐傜屇傃弌偟偨 = True
                    Call gm傾僾儕屌桳僋儔僗.aa僇乕僪偺攝抲偲嵞昤夋(IIf(Not pp僎乕儉幚峴拞, 3, 2))
                    僐僐偐傜屇傃弌偟偨 = False
                ElseIf (Not pp僎乕儉幚峴拞) Then
                    gggbol = gm傾僾儕屌桳僋儔僗.aa昤夋梡_pctBoxs_僙僢僩Image_僒僀僘偑曄傢偭偰偄側偗傟偽_pct儊僀儞偩偗(Me, "", pp僎乕儉幚峴拞)
                ElseIf mOldWD <> Me.Width Or mOldHT <> Me.Height Or mOldWndState <> Me.WindowState Then
                    gggbol = gm傾僾儕屌桳僋儔僗.aa昤夋梡_pctBoxs_僙僢僩Image_僒僀僘偑曄傢偭偰偄側偗傟偽_pct儊僀儞偩偗(Me, CStr(CInt(Rnd() * 100000)), pp僎乕儉幚峴拞)
                End If
                pct儊僀儞.Visible = True
                pctBmp.Left = 0
                gm僗僀僗僀嵞僗僞乕僩尨場 = 0
            End If
        End If
        '----------------------------------------
        If mmLoading Then mmLoading = False
        '----------------------------------------
        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 System.Windows.Forms.PaintEventArgs) Handles Me.Paint
        'Static mmm As Integer : mmm = mmm + 1 : qqqqq("仭仭frmMain_Paint " + Format(mmm, "0000") + vbCrLf)
        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
        Call aa僎乕儉僋儕傾(False)
    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, 5))))
        gggstr = 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
        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, 5))))
        Call mn1game僇乕僪枃悢巜掕Do_ClickCOM(index)
    End Sub
    Friend Sub mn1game僇乕僪枃悢巜掕Do_ClickCOM(ByVal mnuIDX As Integer)
        If gm傾僾儕廔椆偡傞 Then Return
        '***********************************************************************
        gmDlg僎乕儉僇乕僪宆傪愝掕_偼_僎乕儉奐巒帪偵偼昞帵偝傟偰偄傞 = gAppEventMaker.僼僅乕儉偺昞帵徚嫀_愝掕偲庢摼(0, gmDlg僎乕儉僇乕僪宆傪愝掕)
        '***********************************************************************
        Call aa僎乕儉僋儕傾(True)
        If mnuIDX < 0 Then mnuIDX = gm傾僾儕屌桳僋儔僗.p尰嵼偺僇乕僪枃悢MenuIndex
        gggstr = gm傾僾儕屌桳僋儔僗.p尰嵼偺僇乕僪枃悢_RW(gco僾儘僷MenuClick, CStr(mnuIDX))
        pct儊僀儞.Visible = True
        pctBmp.Visible = False
        '***********************************************************************
        gmDlg僎乕儉僇乕僪宆傪愝掕_偼_僎乕儉奐巒帪偵偼昞帵偝傟偰偄傞 = False
        '***********************************************************************
    End Sub
    Private Sub mn1game僇乕僪偺廳側傝傪尭傜偡_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mn1game僇乕僪偺廳側傝傪尭傜偡.Click
        Call gm傾僾儕屌桳僋儔僗.mn1game僇乕僪偺廳側傝傪尭傜偡_Click()
    End Sub
    Friend Sub mn1game僗僀僗僀傪帺摦幚峴_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mn1game僗僀僗僀傪帺摦幚峴.Click
        If gm傾僾儕廔椆偡傞 Then Return
        mn1game僗僀僗僀傪帺摦幚峴.Checked = Not mn1game僗僀僗僀傪帺摦幚峴.Checked
        oo僗僀僗僀.p僗僀僗僀傪帺摦幚峴 = mn1game僗僀僗僀傪帺摦幚峴.Checked
    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
        If gm傾僾儕廔椆偡傞 Then Return
        Call gm傾僾儕屌桳僋儔僗.mn3opt僆僾僔儑儞愝掕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
        If gm傾僾儕廔椆偡傞 Then Return
        Call gm傾僾儕屌桳僋儔僗.mn3opt僒僂儞僪愝掕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
    Private Sub mn3opt僎乕儉梡僇乕僪宆傪愝掕_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mn3opt僎乕儉梡僇乕僪宆傪愝掕.Click
        Call Me.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
        If gm傾僾儕廔椆偡傞 Then Return
        If oo儐乕僓僇乕僪嶌惉 Is Nothing Then
            oo儐乕僓僇乕僪嶌惉 = New 巐frmDlgUserCardMake
            gggint = oo儐乕僓僇乕僪嶌惉.aaDlgShow(Me, 0.5, 2.0!, 0.3!, "", 20, 0, 4, 3, 10)
        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 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 = 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 = 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 = 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)
    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
    Friend Sub mn8僗僀僗僀梡僇乕僪宆傪愝掕_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mn8僗僀僗僀梡僇乕僪宆傪愝掕.Click
        Call Me.aa僗僀僗僀僇乕僪宆愝掕Dlg_Load_1_Disposed_2(1, 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 "僞僀儅乕僀儀儞僩"
    Friend Function aaTim僇乕僪宆曄峏_EnabledSet(ByVal en As Boolean) As Boolean
        'no op 嫟梡偺偨傔偺僟儈乕
    End Function
    Private Sub TimEventOn_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles TimEventOn.Tick
        TimEventOn.Enabled = False
        Select Case TimEventOnStr
            Case "mn8僗僀僗僀偲儐儔儐儔傪幚峴_Click" : Call mn8僗僀僗僀偲儐儔儐儔傪幚峴_Click(Nothing, Nothing)
            Case "frmMain_SizeChanged"
                Call frmMain_ResizeEnd(Nothing, Nothing) ': qqqqq("TimEventOn_Tick  frmMain_SizeChanged")
            Case ""
        End Select
        TimEventOnStr = ""
    End Sub
#End Region

#Region "僂僀儞僪僂偵僪儔僢僌僪儘僢僾偱僼傽僀儖捛壛"
    Private Sub frmMain_DragOver(ByVal sender As Object, ByVal e As System.Windows.Forms.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 System.Windows.Forms.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 pctBmp_DragOver(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles pctBmp.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 pctBmp_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles pctBmp.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 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 Function pct儊僀儞_儅僂僗僀儀儞僩_COM(ByRef EventFromWnd As Boolean, ByRef MouseOp As Integer, ByRef Button As Integer, ByRef X As Integer, ByRef Y As Integer, ByVal OnLoopCardID As Integer) As Boolean
        Dim wGameEnd As Boolean = False
        pct儊僀儞_儅僂僗僀儀儞僩_COM = gm傾僾儕屌桳僋儔僗.aa僼僅乕儉儅僂僗僀儀儞僩張棟(EventFromWnd, MouseOp, Button, X, Y, wGameEnd, OnLoopCardID)
        If wGameEnd Then
            Call mn1game僎乕儉僋儕傾_Click(Nothing, Nothing)
            Call aa_僗僀僗僀傪帺摦幚峴_傕偟愝掕偝傟偰偄傟偽()
            Dim wOptionRetStr As String = ""
            gggstr = 僀儀儞僩gAppEventMaker.MakeEvent僎乕儉奐巒偲掆巭(False, wOptionRetStr)
        End If
    End Function
    Private Sub pct儊僀儞_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pct儊僀儞.MouseDown
        If gm僎乕儉幚峴拞_in_MouseUp_張棟拞 Then Return
        Call pct儊僀儞_儅僂僗僀儀儞僩_COM(True, 1, e.Button, e.X, e.Y, 0)
    End Sub
    Private Sub pct儊僀儞_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pct儊僀儞.MouseMove
        If gm僎乕儉幚峴拞_in_MouseUp_張棟拞 Then Return
        Call pct儊僀儞_儅僂僗僀儀儞僩_COM(True, 2, e.Button, e.X, e.Y, 0)
    End Sub
    Private Sub pct儊僀儞_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pct儊僀儞.MouseUp
        If gm僎乕儉幚峴拞_in_MouseUp_張棟拞 Then Return
        Call pct儊僀儞_儅僂僗僀儀儞僩_COM(True, 3, e.Button, e.X, e.Y, 0)
    End Sub
    Private Sub pctBmp_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pctBmp.MouseUp
        Call pct儊僀儞_儅僂僗僀儀儞僩_COM(True, 3, e.Button, e.X, e.Y, 0)
    End Sub
#End Region

#Region "aa奜晹偲偺僀儞僞僼僃僀僗"
    Friend Function aa巊梡暆() As Integer
        Return Me.ClientSize.Width
    End Function
    Friend Function aa巊梡崅偝() As Integer
        Return Me.ClientSize.Height - MainMenu1.Height
    End Function
    Friend Function aa儊僯儏乕僆僽僕僃愝掕(ByRef 僾儘僷 As String, ByRef 儊僰() As ToolStripMenuItem, ByRef 壓 As Integer, ByRef 忋 As Integer) As Boolean
        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)
                壓 = 1 : 忋 = UBound(儊僰)

            Case "p僗僀僗僀傪帺摦幚峴"
                a = 嘳儊僯儏乕攝楍嶌惉_1_20(儊僰, mn1game僗僀僗僀傪帺摦幚峴)
                壓 = 1 : 忋 = UBound(儊僰)

        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 ssss As String
        Dim 攝楍忋尷 As Integer = 1000
        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(僾儘僷僐儅儞僪, 1, ssss)
                    ElseIf InStr(ssss, Hedp僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓_RW) = 1 Then
                        Call p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓_RW(僾儘僷僐儅儞僪, 1, 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)
        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_僗僀僗僀傪帺摦幚峴_傕偟愝掕偝傟偰偄傟偽() As Boolean
        If oo僗僀僗僀.p僗僀僗僀傪帺摦幚峴 Then
            TimEventOnStr = "mn8僗僀僗僀偲儐儔儐儔傪幚峴_Click" : TimEventOn.Enabled = True
            Return True
        End If
        Return False
    End Function
    Friend Function aa_傕偟僎乕儉幚峴拞側傜偽嵞昤夋(ByRef rNew1_WndReSize2_PropChange3 As Integer, ByRef r僇乕僪偺曄峏偩偗幚峴 As Integer, ByRef r僌儗乕儗儀儖偺曄峏 As Boolean) As Boolean
        If pp僎乕儉幚峴拞 Then
            Return gm傾僾儕屌桳僋儔僗.aa僇乕僪偺攝抲偲嵞昤夋(rNew1_WndReSize2_PropChange3, r僇乕僪偺曄峏偩偗幚峴, r僌儗乕儗儀儖偺曄峏)
        Else
            If pp僗僀僗僀僼儔僼儔_偄偢傟傕掆巭偟偰偄傞 Then Call aa僎乕儉僋儕傾(False)
        End If
        Return False
    End Function
    Friend Function aa僎乕儉僋儕傾(ByVal On僎乕儉奐巒 As Boolean) As Boolean
        Return gm傾僾儕屌桳僋儔僗.aa僎乕儉僋儕傾(On僎乕儉奐巒)
    End Function
    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 gm傾僾儕屌桳僋儔僗.p僗僀僗僀僇乕僪宆儕乕僕儑儞傪嶌傞(op, 夋暆, 夋崅, 榞暆幚悺, Rgn夋, Rgn榞)
    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
    '***************************************************************************************************************
#End Region

#Region "僾儘僷僥傿"
    '仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
    Private Const c儕僗僩偺怓攚宨 As Integer = 1
    Private Const c儕僗僩偺怓僇乕僪 As Integer = 2
    Private Const c儕僗僩偺怓僇乕僪榞 As Integer = 3
    '仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
    'Private Function p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓_屇傃弌偟僒儞僾儖()
    '    p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓攚宨) = 0
    '    p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓僇乕僪) = 0
    '    p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓僇乕僪榞) = 0
    '    Dim a As Integer = p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓DEF(c儕僗僩偺怓攚宨)
    '    Dim b As Integer = p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓DEF(c儕僗僩偺怓僇乕僪)
    '    Dim c As Integer = p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓DEF(c儕僗僩偺怓僇乕僪榞)
    'End Function
    Friend ReadOnly Property p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓DEF(ByVal typIDX123 As Integer) As Integer
        Get
            Return CInt(p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓_RW(gco僾儘僷婯掕抣, typIDX123))
        End Get
    End Property
    Friend Property p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓(ByVal typIDX123 As Integer) As Integer
        Get
            Return CInt(p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓_RW(gco僾儘僷Get, typIDX123))
        End Get
        Set(ByVal Value As Integer)
            Call p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓_RW(gco僾儘僷Let, typIDX123, CStr(Value))
        End Set
    End Property
    Friend Function p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓_RW(ByRef 僾儘僷僐儅儞僪 As Integer, Optional ByVal typIDX123 As Integer = 1, Optional ByRef s As String = "") As String
        Const PropName As String = "p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓" : Const cut As String = "," : Static 婯掕抣() As Integer = {0, &H55FFFF&, &HFF0020&, &H55AA&}
        Const 壓 As Integer = 1 : Const 忋 As Integer = 3 : Static 抣(忋) As Integer
        Dim typ As Integer = 嘳悢抣斖埻Int(壓, 忋, typIDX123)
        Select Case 僾儘僷僐儅儞僪
            Case gco僾儘僷柤 : Return PropName
            Case gco僾儘僷弶婜壔 : For a As Integer = 壓 To 忋 : 抣(a) = 婯掕抣(a) : Next
            Case gco僾儘僷婯掕抣 : Return CStr(婯掕抣(typ))
            Case gco僾儘僷Get : Return CStr(抣(typ))
            Case gco僾儘僷Let : 抣(typ) = CInt(嘳怓偺抣偺専嵏廋惓抣(Val(s)))
            Case gco僾儘僷iniWR
                Dim ww As String = CStr(抣(壓)) & cut & CStr(抣(壓 + 1)) & cut & CStr(抣(壓 + 2)) & cut
                Return 嘳Ini僨乕僞乕暥_RW(gco僾儘僷iniWR, PropName, ww)
            Case gco僾儘僷iniRD
                Dim ary() As String = {""}
                Dim m As Integer = 嘳暥傪僇僢僩偟偰攝楍偵偡傞(嘳Ini僨乕僞乕暥_RW(gco僾儘僷iniRD, PropName, s), cut, ary, False)
                If m = 忋 Then
                    For a As Integer = 壓 To 忋
                        抣(a) = CInt(嘳怓偺抣偺専嵏廋惓抣(Val(ary(a))))
                    Next
                End If
        End Select
        Return "0"
    End Function
    '仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
    'Private Function p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓_屇傃弌偟僒儞僾儖()
    '    p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓攚宨) = 0
    '    p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓僇乕僪) = 0
    '    p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓僇乕僪榞) = 0
    '    Dim a As Integer = p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓DEF(c儕僗僩偺怓攚宨)
    '    Dim b As Integer = p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓DEF(c儕僗僩偺怓僇乕僪)
    '    Dim c As Integer = p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓DEF(c儕僗僩偺怓僇乕僪榞)
    'End Function
    Friend ReadOnly Property p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓DEF(ByVal typIDX123 As Integer) As Integer
        Get
            Return CInt(p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓_RW(gco僾儘僷婯掕抣, typIDX123))
        End Get
    End Property
    Friend Property p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓(ByVal typIDX123 As Integer) As Integer
        Get
            Return CInt(p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓_RW(gco僾儘僷Get, typIDX123))
        End Get
        Set(ByVal Value As Integer)
            Call p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓_RW(gco僾儘僷Let, typIDX123, CStr(Value))
        End Set
    End Property
    Friend Function p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓_RW(ByRef 僾儘僷僐儅儞僪 As Integer, Optional ByVal typIDX123 As Integer = 1, Optional ByRef s As String = "") As String
        Const PropName As String = "p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓" : Const cut As String = "," : Static 婯掕抣() As Integer = {0, &H40FFA0&, &HFF0020&, &H4400&}
        Const 壓 As Integer = 1 : Const 忋 As Integer = 3 : Static 抣(忋) As Integer
        Dim typ As Integer = 嘳悢抣斖埻Int(壓, 忋, Val(typIDX123))
        Select Case 僾儘僷僐儅儞僪
            Case gco僾儘僷柤 : Return PropName
            Case gco僾儘僷弶婜壔 : For a As Integer = 壓 To 忋 : 抣(a) = 婯掕抣(a) : Next
            Case gco僾儘僷婯掕抣 : Return CStr(婯掕抣(typ))
            Case gco僾儘僷Get : Return CStr(抣(typ))
            Case gco僾儘僷Let : 抣(typ) = CInt(嘳怓偺抣偺専嵏廋惓抣(Val(s)))
            Case gco僾儘僷iniWR
                Dim ww As String = CStr(抣(壓)) & cut & CStr(抣(壓 + 1)) & cut & CStr(抣(壓 + 2)) & cut
                Return 嘳Ini僨乕僞乕暥_RW(gco僾儘僷iniWR, PropName, ww)
            Case gco僾儘僷iniRD
                Dim ary() As String = {""}
                Dim m As Integer = 嘳暥傪僇僢僩偟偰攝楍偵偡傞(嘳Ini僨乕僞乕暥_RW(gco僾儘僷iniRD, PropName, s), cut, ary, False)
                If m = 忋 Then
                    For a As Integer = 壓 To 忋
                        抣(a) = CInt(嘳怓偺抣偺専嵏廋惓抣(Val(ary(a))))
                    Next
                End If
        End Select
        Return "0"
    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, 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
        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
        mn9help僶乕僕儑儞忣曬.Enabled = ev
        '--------------------------------------
        If ev Then gggbol = aa僎乕儉僋儕傾(False)
        '--------------------------------------
        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僇乕僪僒僀僘僆僾僔儑儞.Enabled = b1
            Case gmDlg僆僾僔儑儞愝掕
                mn3opt僆僾僔儑儞愝掕Dlg昞帵.Enabled = b1
            Case gmDlg僒僂儞僪愝掕
                mn3opt僒僂儞僪愝掕Dlg昞帵.Enabled = b1
            Case gmDlg僗僀僗僀儐儔儐儔
                mn8僗僀僗僀偲儐儔儐儔傪昞帵.Enabled = b1
            Case gmDlgFile僗僀僗僀梡
                mn8僗僀僗僀夋憸傪愝掕.Enabled = b1
            Case gmDlg僎乕儉僇乕僪宆傪愝掕
                mn3opt僎乕儉梡僇乕僪宆傪愝掕.Enabled = b1
            Case gmDlg僗僀僗僀僇乕僪宆傪愝掕
                mn8僗僀僗僀梡僇乕僪宆傪愝掕.Enabled = b1
            Case gmDlg儐乕僓乕僇乕僪偺曇廤
                mn3opt儐乕僓乕僇乕僪偺曇廤.Enabled = b1
        End Select
    End Sub
#End Region

#Region "僀儀儞僩 from 僎乕儉梡僇乕僪宆愝掕Dlg ( 巐frmDlgUseCardSelect )"
    Friend Sub aa僎乕儉梡僇乕僪宆傪愝掕Dlg_Load_1_Disposed_2(ByVal op As Integer, ByVal rOwner As Form)
        Try
            Select Case op
                Case 1 'New Load
                    If gm傾僾儕廔椆偡傞 Then Return
                    If 1 = GMCOM_僟僀傾儘僌儌乕僪儗僗昞帵僠僃僢僋(僎乕儉梡僇乕僪宆愝掕Dlg) Then
                        僎乕儉梡僇乕僪宆愝掕Dlg = New 巐frmDlgUseCardSelect
                        僎乕儉梡僇乕僪宆愝掕Dlg.Owner = rOwner
                        僎乕儉梡僇乕僪宆愝掕Dlg.Show()
                    End If
                Case 2 'after Disposed
                    僎乕儉梡僇乕僪宆愝掕Dlg = Nothing
            End Select
        Catch
            MsgBox(ErrorToString)
        End Try
    End Sub
    Private Sub 僎乕儉梡僇乕僪宆愝掕Dlg_僂僀儞僪僂偺弶婜壔僨乕僞乕傪偔偩偝偄(ByRef wIsOK As Boolean, ByRef wMe_gmDlgID As Integer, ByRef w僟僀傾儘僌僥僉僗僩 As String, ByRef w巊梡栚揑儊僢僙乕僕 As String, ByRef w僞僥屄悢 As Integer, ByRef w巊梡屄悢_0_to_max As Integer, ByRef w傾僾儕宆_max As Integer, ByRef w僙儖暆 As Integer, ByRef w僙儖崅 As Integer, ByRef wCell娫僞僥儓僐 As Integer, ByRef w恾宍奜墢榞暆 As Integer, ByRef w恾宍奜墢榞怓 As Integer, ByRef w儕僗僩攚宨怓 As Integer, ByRef w慖戰怓 As Integer) Handles 僎乕儉梡僇乕僪宆愝掕Dlg.僂僀儞僪僂偺弶婜壔僨乕僞乕傪偔偩偝偄
        wIsOK = True
        wMe_gmDlgID = gmDlg僎乕儉僇乕僪宆傪愝掕
        w僟僀傾儘僌僥僉僗僩 = "僎乕儉偵巊梡偡傞僇乕僪宆偺慖戰"
        w巊梡栚揑儊僢僙乕僕 = "僎乕儉偵巊梡偡傞" & vbCrLf & "僇乕僪宆傪慖戰偟傑偡"
        w僞僥屄悢 = 5
        w巊梡屄悢_0_to_max = gm傾僾儕屌桳僋儔僗.ppc僇乕僪宆Allmax  '29
        w傾僾儕宆_max = gm傾僾儕屌桳僋儔僗.ppc僇乕僪宆APPmax '19
        w僙儖暆 = 60
        w僙儖崅 = 60
        wCell娫僞僥儓僐 = 20
        w恾宍奜墢榞暆 = 1
        w恾宍奜墢榞怓 = p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓僇乕僪榞)
        w慖戰怓 = p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓僇乕僪)
        w儕僗僩攚宨怓 = p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓攚宨)
    End Sub
    Private Sub 僎乕儉梡僇乕僪宆愝掕Dlg_僇乕僪僨乕僞乕傪偔偩偝偄(ByRef wIsOK As Boolean, ByVal r僇乕僪宆IDX As Integer, ByVal r僙儖暆 As Integer, ByVal r僙儖崅 As Integer, ByRef w僇乕僪RGN_屇傃弌偟尦偱嶍彍偡傞 As Integer, ByRef w僇乕僪傪巊梡偟偰偄傞 As Boolean) Handles 僎乕儉梡僇乕僪宆愝掕Dlg.僇乕僪僨乕僞乕傪偔偩偝偄
        w僇乕僪傪巊梡偟偰偄傞 = gm傾僾儕屌桳僋儔僗.p僎乕儉僇乕僪宆_巊梡拞偱偡(r僇乕僪宆IDX)
        Dim Rgn榞 As Integer = 0
        Dim 榞暆幚悺 As Integer = 0
        wIsOK = gm傾僾儕屌桳僋儔僗.aa僇乕僪宆儕乕僕儑儞傪嶌傞(r僇乕僪宆IDX, (r僙儖暆 + r僙儖崅) \ 2, 榞暆幚悺, w僇乕僪RGN_屇傃弌偟尦偱嶍彍偡傞, Rgn榞, r僙儖暆, r僙儖崅)
        If Rgn榞 <> 0 Then DeleteObject(Rgn榞)
        Rgn榞 = 0
    End Sub
    Private Sub 僎乕儉梡僇乕僪宆愝掕Dlg_僇乕僪宆偺慖戰忬懺傪曄峏偟偰壓偝偄(ByRef wIsOK As Boolean, ByRef r僇乕僪慖戰僨乕僞乕() As Boolean) Handles 僎乕儉梡僇乕僪宆愝掕Dlg.僇乕僪宆偺慖戰忬懺傪曄峏偟偰壓偝偄
        wIsOK = gm傾僾儕屌桳僋儔僗.p僎乕儉僇乕僪宆_巊梡曄峏(r僇乕僪慖戰僨乕僞乕)
    End Sub
    Private Sub 僎乕儉梡僇乕僪宆愝掕Dlg_僇乕僪宆慖戰僟僀傾儘僌偐傜僐儅儞僪幚峴偺梫惪(ByRef wIsOK As Boolean, ByRef r僐儅儞僪 As Integer, ByRef r捛壛僨乕僞乕 As Integer) Handles 僎乕儉梡僇乕僪宆愝掕Dlg.僇乕僪宆慖戰僟僀傾儘僌偐傜僐儅儞僪幚峴偺梫惪
        wIsOK = True
        Select Case r僐儅儞僪
            Case gccom僇乕僪枃悢巜掕Do_1_2_3_4_5
                Dim mnuIDX As Integer = r捛壛僨乕僞乕
                If gm傾僾儕屌桳僋儔僗.p尰嵼偺僇乕僪枃悢MenuIndex = mnuIDX Then
                    If Not pp僎乕儉幚峴拞 Then
                        Call mn1game僇乕僪枃悢巜掕Do_ClickCOM(-1)
                    Else
                        Call gm傾僾儕屌桳僋儔僗.aa僇乕僪偺攝抲偲嵞昤夋(3, 1)
                    End If
                Else
                    Call mn1game僇乕僪枃悢巜掕Do_ClickCOM(mnuIDX)
                End If
            Case gccom傾僾儕廔椆
                Call mn1game偙偺傾僾儕傪廔椆_Click(Nothing, Nothing)
            Case gccom尰嵼偺僎乕儉傪尰嵼偺僇乕僪枃悢偱嵞僗僞乕僩
                Call mn1game僇乕僪枃悢巜掕Do_ClickCOM(-1)
            Case gccom尰嵼偺僎乕儉偺幚峴忬嫷偺傑傑_aa僇乕僪偺攝抲偲嵞昤夋
                Call gm傾僾儕屌桳僋儔僗.aa僇乕僪偺攝抲偲嵞昤夋(3, 1)
            Case Else
                wIsOK = False
        End Select
    End Sub
    Private Sub 僎乕儉梡僇乕僪宆愝掕Dlg_僇乕僪枃悢偲僗僀僗僀儊僯儏乕傪巊梡偟傑偡偐(ByRef wIsOK As Boolean, ByRef w僇乕僪枃悢儊僯儏乕傪巊梡偡傞 As Boolean, ByRef w僗僀僗僀儊僯儏乕傪巊梡偡傞 As Boolean) Handles 僎乕儉梡僇乕僪宆愝掕Dlg.僇乕僪枃悢偲僗僀僗僀儊僯儏乕傪巊梡偟傑偡偐
        wIsOK = True
        w僇乕僪枃悢儊僯儏乕傪巊梡偡傞 = True
        w僗僀僗僀儊僯儏乕傪巊梡偡傞 = False
    End Sub
    Private Sub 僎乕儉梡僇乕僪宆愝掕Dlg_僇乕僪枃悢巜掕Checked愝掕(ByRef wIsOK As Boolean, ByRef mnu僇乕僪枃悢_1 As System.Windows.Forms.ToolStripMenuItem, ByRef mnu僇乕僪枃悢_2 As System.Windows.Forms.ToolStripMenuItem, ByRef mnu僇乕僪枃悢_3 As System.Windows.Forms.ToolStripMenuItem, ByRef mnu僇乕僪枃悢_4 As System.Windows.Forms.ToolStripMenuItem, ByRef mnu僇乕僪枃悢_5 As System.Windows.Forms.ToolStripMenuItem) Handles 僎乕儉梡僇乕僪宆愝掕Dlg.僇乕僪枃悢巜掕Checked愝掕
        wIsOK = True
        Dim a As Integer = gm傾僾儕屌桳僋儔僗.p尰嵼偺僇乕僪枃悢MenuIndex
        mnu僇乕僪枃悢_1.Checked = (a = 1)
        mnu僇乕僪枃悢_2.Checked = (a = 2)
        mnu僇乕僪枃悢_3.Checked = (a = 3)
        mnu僇乕僪枃悢_4.Checked = (a = 4)
        mnu僇乕僪枃悢_5.Checked = (a = 5)
    End Sub
    Private Sub 僎乕儉梡僇乕僪宆愝掕Dlg_僇儔乕偑曄峏偝傟傑偟偨(ByVal rIndex As Integer, ByVal rColor As Integer) Handles 僎乕儉梡僇乕僪宆愝掕Dlg.僇儔乕偑曄峏偝傟傑偟偨
        p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓(rIndex) = rColor
    End Sub
    Private Sub 僎乕儉梡僇乕僪宆愝掕Dlg_僇儔乕傪偡傋偰尦偵栠偟側偝偄(ByVal rColor1stt As Integer, ByVal rColor2stt As Integer, ByVal rColor3stt As Integer, ByRef w儕僗僩攚宨怓 As Integer, ByRef w慖戰怓 As Integer, ByRef w僼儗乕儉儔僀儞怓 As Integer) Handles 僎乕儉梡僇乕僪宆愝掕Dlg.僇儔乕傪偡傋偰尦偵栠偟側偝偄
        p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓攚宨) = rColor1stt
        p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓僇乕僪) = rColor2stt
        p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓僇乕僪榞) = rColor3stt
        w儕僗僩攚宨怓 = p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓攚宨)
        w慖戰怓 = p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓僇乕僪)
        w僼儗乕儉儔僀儞怓 = p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓僇乕僪榞)
    End Sub
    Private Sub 僎乕儉梡僇乕僪宆愝掕Dlg_僇儔乕傪婯掕抣偵儕僙僢僩偟側偝偄(ByRef w儕僗僩攚宨怓 As Integer, ByRef w慖戰怓 As Integer, ByRef w僼儗乕儉儔僀儞怓 As Integer) Handles 僎乕儉梡僇乕僪宆愝掕Dlg.僇儔乕傪婯掕抣偵儕僙僢僩偟側偝偄
        p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓攚宨) = p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓DEF(c儕僗僩偺怓攚宨)
        p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓僇乕僪) = p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓DEF(c儕僗僩偺怓僇乕僪)
        p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓僇乕僪榞) = p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓DEF(c儕僗僩偺怓僇乕僪榞)
        w儕僗僩攚宨怓 = p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓攚宨)
        w慖戰怓 = p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓僇乕僪)
        w僼儗乕儉儔僀儞怓 = p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓僇乕僪榞)
    End Sub
    Private Sub 僎乕儉梡僇乕僪宆愝掕Dlg_儊僯儏乕偺Enabled僨乕僞乕傪偔偩偝偄(ByRef w尦偵栠偡 As Boolean, ByRef w婯掕抣偵儕僙僢僩 As Boolean, ByVal rColor1stt As Integer, ByVal rColor2stt As Integer, ByVal rColor3stt As Integer) Handles 僎乕儉梡僇乕僪宆愝掕Dlg.儊僯儏乕偺Enabled僨乕僞乕傪偔偩偝偄
        w尦偵栠偡 = Not ((p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓攚宨) = rColor1stt) And (p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓僇乕僪) = rColor2stt) And (p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓僇乕僪榞) = rColor3stt))
        w婯掕抣偵儕僙僢僩 = Not ((p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓攚宨) = p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓DEF(c儕僗僩偺怓攚宨)) And (p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓僇乕僪) = p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓DEF(c儕僗僩偺怓僇乕僪)) And (p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓僇乕僪榞) = p僎乕儉梡僇乕僪宆傪愝掕僟僀傾儘僌偺怓DEF(c儕僗僩偺怓僇乕僪榞)))
    End Sub
    Private Sub 僎乕儉梡僇乕僪宆愝掕Dlg_懠偺僂僀儞僪僂偑昞帵偁傞偄偼旕昞帵偵側傝傑偟偨(ByVal rMe_gmDlgID As Integer, ByVal r昞帵曄峏僂僀儞僪僂ID As Integer, ByVal r昞帵True徚嫀False As Boolean, ByRef wRet_rMe_gmDlgID僂僀儞僪僂傪徚嫀偟側偝偄 As Boolean) Handles 僎乕儉梡僇乕僪宆愝掕Dlg.懠偺僂僀儞僪僂偑昞帵偁傞偄偼旕昞帵偵側傝傑偟偨
        wRet_rMe_gmDlgID僂僀儞僪僂傪徚嫀偟側偝偄 = GMCOM_Dlgs懠偺僂僀儞僪僂偺昞帵_旕昞帵僀儀儞僩偱_rMe_僂僀儞僪僂傪徚嫀偟側偝偄(rMe_gmDlgID, r昞帵曄峏僂僀儞僪僂ID, r昞帵True徚嫀False)
    End Sub
#End Region

#Region "僀儀儞僩 from 僗僀僗僀僇乕僪宆愝掕Dlg ( 巐frmDlgUseCardSelect )"
    Friend Sub aa僗僀僗僀僇乕僪宆愝掕Dlg_Load_1_Disposed_2(ByVal op As Integer, ByVal rOwner As Form)
        Try
            Select Case op
                Case 1 'New Load
                    If gm傾僾儕廔椆偡傞 Then Return
                    If 1 = GMCOM_僟僀傾儘僌儌乕僪儗僗昞帵僠僃僢僋(僗僀僗僀僇乕僪宆愝掕Dlg) Then
                        僗僀僗僀僇乕僪宆愝掕Dlg = New 巐frmDlgUseCardSelect
                        僗僀僗僀僇乕僪宆愝掕Dlg.Owner = rOwner
                        僗僀僗僀僇乕僪宆愝掕Dlg.Show()
                    End If
                Case 2 'after Disposed
                    僗僀僗僀僇乕僪宆愝掕Dlg = Nothing
            End Select
        Catch
            MsgBox(ErrorToString)
        End Try
    End Sub
    Private Sub 僗僀僗僀僇乕僪宆愝掕Dlg_僂僀儞僪僂偺弶婜壔僨乕僞乕傪偔偩偝偄(ByRef wIsOK As Boolean, ByRef wMe_gmDlgID As Integer, ByRef w僟僀傾儘僌僥僉僗僩 As String, ByRef w巊梡栚揑儊僢僙乕僕 As String, ByRef w僞僥屄悢 As Integer, ByRef w巊梡屄悢_0_to_max As Integer, ByRef w傾僾儕宆_max As Integer, ByRef w僙儖暆 As Integer, ByRef w僙儖崅 As Integer, ByRef wCell娫僞僥儓僐 As Integer, ByRef w恾宍奜墢榞暆 As Integer, ByRef w恾宍奜墢榞怓 As Integer, ByRef w儕僗僩攚宨怓 As Integer, ByRef w慖戰怓 As Integer) Handles 僗僀僗僀僇乕僪宆愝掕Dlg.僂僀儞僪僂偺弶婜壔僨乕僞乕傪偔偩偝偄
        wIsOK = True
        wMe_gmDlgID = gmDlg僗僀僗僀僇乕僪宆傪愝掕
        w僟僀傾儘僌僥僉僗僩 = "僗僀僗僀偵巊梡偡傞僇乕僪宆偺慖戰"
        w巊梡栚揑儊僢僙乕僕 = "僗僀僗僀偵巊梡偡傞" & vbCrLf & "僇乕僪宆傪慖戰偟傑偡"
        w僞僥屄悢 = 5
        w巊梡屄悢_0_to_max = gm傾僾儕屌桳僋儔僗.ppc僇乕僪宆Allmax  '29
        w傾僾儕宆_max = gm傾僾儕屌桳僋儔僗.ppc僇乕僪宆APPmax '19
        w僙儖暆 = 60
        w僙儖崅 = 60
        wCell娫僞僥儓僐 = 20
        w恾宍奜墢榞暆 = 1
        w恾宍奜墢榞怓 = p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓僇乕僪榞)
        w慖戰怓 = p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓僇乕僪)
        w儕僗僩攚宨怓 = p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓攚宨)
    End Sub
    Private Sub 僗僀僗僀僇乕僪宆愝掕Dlg_僇乕僪僨乕僞乕傪偔偩偝偄(ByRef wIsOK As Boolean, ByVal r僇乕僪宆IDX As Integer, ByVal r僙儖暆 As Integer, ByVal r僙儖崅 As Integer, ByRef w僇乕僪RGN_屇傃弌偟尦偱嶍彍偡傞 As Integer, ByRef w僇乕僪傪巊梡偟偰偄傞 As Boolean) Handles 僗僀僗僀僇乕僪宆愝掕Dlg.僇乕僪僨乕僞乕傪偔偩偝偄
        w僇乕僪傪巊梡偟偰偄傞 = gm傾僾儕屌桳僋儔僗.p僗僀僗僀僇乕僪宆_巊梡拞偱偡(r僇乕僪宆IDX)
        Dim Rgn榞 As Integer = 0
        Dim 榞暆幚悺 As Integer = 0
        wIsOK = gm傾僾儕屌桳僋儔僗.aa僇乕僪宆儕乕僕儑儞傪嶌傞(r僇乕僪宆IDX, (r僙儖暆 + r僙儖崅) \ 2, 榞暆幚悺, w僇乕僪RGN_屇傃弌偟尦偱嶍彍偡傞, Rgn榞, r僙儖暆, r僙儖崅)
        If Rgn榞 <> 0 Then DeleteObject(Rgn榞)
        Rgn榞 = 0
    End Sub
    Private Sub 僗僀僗僀僇乕僪宆愝掕Dlg_僇乕僪宆偺慖戰忬懺傪曄峏偟偰壓偝偄(ByRef wIsOK As Boolean, ByRef r僇乕僪慖戰僨乕僞乕() As Boolean) Handles 僗僀僗僀僇乕僪宆愝掕Dlg.僇乕僪宆偺慖戰忬懺傪曄峏偟偰壓偝偄
        wIsOK = gm傾僾儕屌桳僋儔僗.p僗僀僗僀僇乕僪宆_巊梡曄峏(r僇乕僪慖戰僨乕僞乕)
    End Sub
    Private Sub 僗僀僗僀僇乕僪宆愝掕Dlg_僇乕僪宆慖戰僟僀傾儘僌偐傜僐儅儞僪幚峴偺梫惪(ByRef wIsOK As Boolean, ByRef r僐儅儞僪 As Integer, ByRef r捛壛僨乕僞乕 As Integer) Handles 僗僀僗僀僇乕僪宆愝掕Dlg.僇乕僪宆慖戰僟僀傾儘僌偐傜僐儅儞僪幚峴偺梫惪
        wIsOK = True
        Select Case r僐儅儞僪
            Case gccom僗僀僗僀偲儐儔儐儔傪幚峴
                Call mn8僗僀僗僀偲儐儔儐儔傪幚峴_Click(Nothing, Nothing)
            Case gccom僗僀僗僀偲儐儔儐儔偡傋偰掆巭
                Call mn8僗僀僗僀偲儐儔儐儔偡傋偰掆巭_Click(Nothing, Nothing)
            Case gccom僗僀僗僀幚峴
                Call mn8僗僀僗僀幚峴_Click(Nothing, New System.EventArgs())
            Case gccom僗僀僗僀掆巭
                Call mn8僗僀僗僀掆巭_Click(Nothing, New System.EventArgs())
            Case gccom儐儔儐儔幚峴
                Call mn8儐儔儐儔幚峴_Click(Nothing, New System.EventArgs())
            Case gccom儐儔儐儔掆巭
                Call mn8儐儔儐儔掆巭_Click(Nothing, New System.EventArgs())
            Case gccom僗僀僗僀偲儐儔儐儔傪昞帵
                gggstr = gAppEventMaker.MakeEventDlg僗僀僗僀偲儐儔儐儔傪昞帵徚嫀(True)
            Case gccom僗僀僗僀夋憸傪愝掕
                Call mn8僗僀僗僀夋憸傪愝掕_Click(Nothing, Nothing)
            Case gccom傾僾儕廔椆
                Call mn1game偙偺傾僾儕傪廔椆_Click(Nothing, Nothing)
            Case Else
                wIsOK = False
        End Select
    End Sub
    Private Sub 僗僀僗僀僇乕僪宆愝掕Dlg_僇乕僪枃悢偲僗僀僗僀儊僯儏乕傪巊梡偟傑偡偐(ByRef wIsOK As Boolean, ByRef w僇乕僪枃悢儊僯儏乕傪巊梡偡傞 As Boolean, ByRef w僗僀僗僀儊僯儏乕傪巊梡偡傞 As Boolean) Handles 僗僀僗僀僇乕僪宆愝掕Dlg.僇乕僪枃悢偲僗僀僗僀儊僯儏乕傪巊梡偟傑偡偐
        wIsOK = True
        w僇乕僪枃悢儊僯儏乕傪巊梡偡傞 = False
        w僗僀僗僀儊僯儏乕傪巊梡偡傞 = True
    End Sub
    Private Sub 僗僀僗僀僇乕僪宆愝掕Dlg_僇儔乕偑曄峏偝傟傑偟偨(ByVal rIndex As Integer, ByVal rColor As Integer) Handles 僗僀僗僀僇乕僪宆愝掕Dlg.僇儔乕偑曄峏偝傟傑偟偨
        p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓(rIndex) = rColor
    End Sub
    Private Sub 僗僀僗僀僇乕僪宆愝掕Dlg_僇儔乕傪偡傋偰尦偵栠偟側偝偄(ByVal rColor1stt As Integer, ByVal rColor2stt As Integer, ByVal rColor3stt As Integer, ByRef w儕僗僩攚宨怓 As Integer, ByRef w慖戰怓 As Integer, ByRef w僼儗乕儉儔僀儞怓 As Integer) Handles 僗僀僗僀僇乕僪宆愝掕Dlg.僇儔乕傪偡傋偰尦偵栠偟側偝偄
        p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓攚宨) = rColor1stt
        p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓僇乕僪) = rColor2stt
        p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓僇乕僪榞) = rColor3stt
        w儕僗僩攚宨怓 = p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓攚宨)
        w慖戰怓 = p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓僇乕僪)
        w僼儗乕儉儔僀儞怓 = p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓僇乕僪榞)
    End Sub
    Private Sub 僗僀僗僀僇乕僪宆愝掕Dlg_僇儔乕傪婯掕抣偵儕僙僢僩偟側偝偄(ByRef w儕僗僩攚宨怓 As Integer, ByRef w慖戰怓 As Integer, ByRef w僼儗乕儉儔僀儞怓 As Integer) Handles 僗僀僗僀僇乕僪宆愝掕Dlg.僇儔乕傪婯掕抣偵儕僙僢僩偟側偝偄
        p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓攚宨) = p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓DEF(c儕僗僩偺怓攚宨)
        p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓僇乕僪) = p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓DEF(c儕僗僩偺怓僇乕僪)
        p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓僇乕僪榞) = p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓DEF(c儕僗僩偺怓僇乕僪榞)
        w儕僗僩攚宨怓 = p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓攚宨)
        w慖戰怓 = p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓僇乕僪)
        w僼儗乕儉儔僀儞怓 = p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓僇乕僪榞)
    End Sub
    Private Sub 僗僀僗僀僇乕僪宆愝掕Dlg_儊僯儏乕偺Enabled僨乕僞乕傪偔偩偝偄(ByRef w尦偵栠偡 As Boolean, ByRef w婯掕抣偵儕僙僢僩 As Boolean, ByVal rColor1stt As Integer, ByVal rColor2stt As Integer, ByVal rColor3stt As Integer) Handles 僗僀僗僀僇乕僪宆愝掕Dlg.儊僯儏乕偺Enabled僨乕僞乕傪偔偩偝偄
        w尦偵栠偡 = Not ((p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓攚宨) = rColor1stt) And (p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓僇乕僪) = rColor2stt) And (p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓僇乕僪榞) = rColor3stt))
        w婯掕抣偵儕僙僢僩 = Not ((p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓攚宨) = p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓DEF(c儕僗僩偺怓攚宨)) And (p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓僇乕僪) = p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓DEF(c儕僗僩偺怓僇乕僪)) And (p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓(c儕僗僩偺怓僇乕僪榞) = p僗僀僗僀僇乕僪宆傪愝掕僟僀傾儘僌偺怓DEF(c儕僗僩偺怓僇乕僪榞)))
    End Sub
    Private Sub 僗僀僗僀僇乕僪宆愝掕Dlg_懠偺僂僀儞僪僂偑昞帵偁傞偄偼旕昞帵偵側傝傑偟偨(ByVal rMe_gmDlgID As Integer, ByVal r昞帵曄峏僂僀儞僪僂ID As Integer, ByVal r昞帵True徚嫀False As Boolean, ByRef wRet_rMe_gmDlgID僂僀儞僪僂傪徚嫀偟側偝偄 As Boolean) Handles 僗僀僗僀僇乕僪宆愝掕Dlg.懠偺僂僀儞僪僂偑昞帵偁傞偄偼旕昞帵偵側傝傑偟偨
        wRet_rMe_gmDlgID僂僀儞僪僂傪徚嫀偟側偝偄 = GMCOM_Dlgs懠偺僂僀儞僪僂偺昞帵_旕昞帵僀儀儞僩偱_rMe_僂僀儞僪僂傪徚嫀偟側偝偄(rMe_gmDlgID, r昞帵曄峏僂僀儞僪僂ID, r昞帵True徚嫀False)
    End Sub
#End Region

#Region "仭仭  屲cls僗僀僗僀  巐frmDlg僗僀僗僀儐儔儐儔丂 傪嫟梡偡傞偨傔偺僟儈乕娭悢"
    Friend Property p僗僀僗僀僇乕僪僀儊乕僕() As Integer
        '僇僫偐側愱梡
        Get
        End Get
        Set(ByVal Value As Integer)
        End Set
    End Property
#End Region

End Class