代码拉取完成,页面将自动刷新
同步操作将从 刘元涛/tkinter-designer 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
Persistable = 0 'NotPersistable
DataBindingBehavior = 0 'vbNone
DataSourceBehavior = 0 'vbNone
MTSTransactionMode = 0 'NotAnMTSObject
END
Attribute VB_Name = "Dictionary"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Attribute VB_Ext_KEY = "SavedWithClassBuilder6" ,"Yes"
Attribute VB_Ext_KEY = "Top_Level" ,"Yes"
Option Explicit
'对SCRIPTING.DICTIONARY的简单封装
Private m_dic As Object
Public Sub Add(ByVal sK As String, sV As Variant)
m_dic.Add sK, sV
End Sub
Public Property Get Item(ByVal sK As String) As String
Attribute Item.VB_UserMemId = 0
Item = m_dic.Item(sK)
End Property
Public Property Let Item(ByVal sK As String, sV As String)
m_dic.Item(sK) = sV
End Property
Public Function Exists(ByVal sK As String) As Boolean
Exists = m_dic.Exists(sK)
End Function
Public Function Keys() As Collection
'Set Keys = m_Dic.Keys
Set Keys = New Collection
Dim k As Variant
For Each k In m_dic
Keys.Add k
Next
End Function
Public Function Items() As Collection
'Set Items = m_Dic.Items
Set Items = New Collection
Dim k As Variant
For Each k In m_dic
Items.Add m_dic.Item(k)
Next
End Function
Public Sub Remove(sKey As String)
If m_dic.Exists(sKey) Then m_dic.Remove sKey
End Sub
Public Sub RemoveAll()
m_dic.RemoveAll
End Sub
Public Property Get Count() As Long
Count = m_dic.Count
End Property
'对象序列化函数
Public Function Serializer(vSer As clsSerialization)
Dim k As Variant
vSer.Serializer m_dic.Count
For Each k In m_dic
vSer.Serializer k, m_dic(k)
Next
End Function
Public Function Deserializer(vSer As clsSerialization)
Dim nCount As Long, i As Long, k As Variant, v As Variant
m_dic.RemoveAll
vSer.Deserializer nCount
For i = 0 To nCount - 1
vSer.Deserializer k, v
m_dic.Add k, v
Next
End Function
Private Sub Class_Initialize()
Set m_dic = CreateObject("Scripting.Dictionary")
If m_dic Is Nothing Then
MsgBox L("l_msgCreateDictionaryFailed", "创建Scripting.Dictionary对象失败,程序无法继续执行。\n请确认scrrun.dll是否存在!"), vbCritical
End If
End Sub
Private Sub Class_Terminate()
Set m_dic = Nothing
End Sub
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。