Dim dr As DataRow
For Each f As WinForm.Form In forms
If f.Opened = False Then Continue For
dr = DataTables("Language").find("[中文] = '" & f.text & "'")
If dr IsNot Nothing
f.text = dr(getConfigValue("LangC", "英文"))
End If
dr = DataTables("Language").find("[英文] = '" & f.text & "'")
If dr IsNot Nothing
f.text = dr(getConfigValue("LangC", "中文"))
End If
For Each c As Winform.Control In f.Controls
If TypeOf c Is Winform.NavBar Then
Dim bar As WinForm.NavBar = f.Controls(c.name)
For Each nb As WinForm.NavPage In bar.NavPages
dr = DataTables("Language").find("[英文] = '" & nb.ButtonText & "'")
If dr IsNot Nothing
nb.Buttontext = dr(getConfigValue("LangC", "中文"))
End If
dr = DataTables("Language").find("[中文] = '" & nb.ButtonText & "'")
If dr IsNot Nothing
nb.Buttontext = dr(getConfigValue("LangC", "英文"))
End If
Next
Else If Typeof c Is WinForm.TopicBar Then
Dim trv As WinForm.TopicBar = f.Controls(c.name)
For Each page As WinForm.TopicPage In trv.Pages
For Each nd As WinForm.TopicLink In page.Links
dr = DataTables("Language").find("[英文] = '" & nd.Text & "'")
If dr IsNot Nothing
nd.text = dr(getConfigValue("LangC", "中文"))
End If
dr = DataTables("Language").find("[中文] = '" & nd.Text & "'")
If dr IsNot Nothing
nd.text = dr(getConfigValue("LangC", "英文"))
End If
Next
Next
Else If Typeof c Is WinForm.TreeView Then
Dim trv As WinForm.TreeView = f.Controls(c.name)
For Each nd As WinForm.TreeNode In trv.AllNodes
dr = DataTables("Language").find("[英文] = '" & nd.text & "'")
If dr IsNot Nothing
nd.text = dr(getConfigValue("LangC", "中文"))
End If
dr = DataTables("Language").find("[中文] = '" & nd.text & "'")
If dr IsNot Nothing
nd.text = dr(getConfigValue("LangC", "英文"))
End If
Next
Else If TypeOf c Is WinForm.TabControl Then
Dim tc As WinForm.TabControl = f.Controls(c.name)
For Each pg As WinForm.TabPage In tc.TabPages
dr = DataTables("Language").find("[英文] = '" & pg.Text & "'")
If dr IsNot Nothing
pg.text = dr(getConfigValue("LangC", "中文"))
End If
dr = DataTables("Language").find("[中文] = '" & pg.Text & "'")
If dr IsNot Nothing
pg.text = dr(getConfigValue("LangC", "英文"))
End If
Next
Else If TypeOf c Is WinForm.Panel OrElse TypeOf c Is WinForm.picturebox OrElse TypeOf c Is WinForm.Table OrElse TypeOf c Is WinForm.line _
OrElse TypeOf c Is WinForm.WebBrowser OrElse TypeOf c Is WinForm.FileManager OrElse TypeOf c Is WinForm.SplitContainer Then
Else
Dim ct As String = f.Controls(c.name).text
dr = DataTables("Language").find("[英文] = '" & ct & "'")
If dr IsNot Nothing
f.Controls(c.name).text = dr(getConfigValue("LangC", "中文"))
End If
dr = DataTables("Language").find("[中文] = '" & ct & "'")
If dr IsNot Nothing
f.Controls(c.name).text = dr(getConfigValue("LangC", "英文"))
End If
End If
Next
Next
在窗体 出现 有 FileManager 文件管理器的时候
提示 找不到 add open 等 的控件。