将上下文相关帮助添加到现有Windows窗体应用程序的好方法?

我必须将数据库驱动的工具提示添加到现有的WinForms应用程序中。 C#和.NET 3.5 我想避免为此删除新控件,用户必须能够编辑帮助工具提示。 我最好的猜测是将现有控件包装在一个包含新属性的新类型中,这样我就可以分配一个新的属性,如“FieldHelpName”,并且可以在管理模块中使用它,这样用户就可以清楚地识别该字段。我将为每个表单分配一个ScreenID,每个FieldHelpName记录将链接到一个ScreenID。在应用程序启动时,加载所有帮助内容,并在表单加载时,按其ScreenID过滤并使用反射添加相应的工具提示,最有可能。 我正在寻找关于如何最好地完成这个过程的建议,或者知道是否有关于如何做到这一点的最佳实践...所以任何帮助都非常感谢。谢谢。     
已邀请:
为什么要这么长? 你可以用更简单的东西完成同样的事情:
Private _ToolTipList As New List(Of ToolTip)

<Extension()> _
Public Function CreateForm(ByVal formType As Type) As Form
  If (formType Is Nothing) Then
    Throw New ArgumentNullException("formType")
  End If
  If (Not GetType(Form).IsAssignableFrom(formType)) Then
    Throw New InvalidOperationException _
        (String.Format("The type '{0}' is not a form.", formType.FullName))
  End If

  Dim ctor = formType.GetConstructor(New Type() {})
  If (ctor Is Nothing) Then
    Throw New InvalidOperationException _
        (String.Format _
            ("The type '{0}' does not have a public default constructor.", _
            formType.FullName))
  End If

  Dim frm As Form = ctor.Invoke(New Object() {})
  Dim toolTip As New ToolTip(New Container())
  LoadToolTipData(toolTip, frm)
  _ToolTipList.Add(toolTip)

  Return frm

End Function

Private Sub LoadToolTipData(ByVal toolTip As ToolTip, _
                            ByVal ctrl As Control, _
                   Optional ByVal parentHierarchy As String = "")

  Dim currentHierarchy = parentHierarchy & "." & ctrl.Name
  Dim toolTipText = LoadDataFromDb(currentHierarchy)
  If Not String.IsNullOrEmpty(toolTipText) Then
    toolTip.SetToolTip(ctrl, toolTipText)
  End If

  For Each c As Control In ctrl.Controls
    LoadToolTipData(toolTip, c, currentHierarchy)
  Next

End Sub

Private Function LoadDataFromDb(ByVal key As String) As String
  Return String.Empty
End Function
    
结束创建用于配置的数据库表并为每行指定控件名称,然后递归循环屏幕控件以在当前控件名称与数据库记录的控件名称匹配时添加工具提示。     

要回复问题请先登录注册