feat(ModEvent): 支持一个按钮执行多个事件
没给 HelpEntry 加这个功能,其他控件都加了
This commit is contained in:
@@ -47,7 +47,7 @@
|
||||
IsMouseDown = False
|
||||
Log("[Control] 按下文本按钮:" & Text)
|
||||
RaiseEvent Click(Me, Nothing)
|
||||
ModEvent.TryStartEvent(EventType, EventData)
|
||||
ModEvent.ProcessCustomEvents(EventType, EventData, _CustomEvents)
|
||||
e.Handled = True
|
||||
End If
|
||||
End Sub
|
||||
@@ -106,5 +106,17 @@
|
||||
End Property
|
||||
Public Shared ReadOnly EventDataProperty As DependencyProperty = DependencyProperty.Register(
|
||||
"EventData", GetType(String), GetType(MyTextButton), New PropertyMetadata(Nothing))
|
||||
Public Property CustomEvents As CustomEventCollection
|
||||
Get
|
||||
If _CustomEvents Is Nothing Then
|
||||
_CustomEvents = New CustomEventCollection
|
||||
End If
|
||||
Return _CustomEvents
|
||||
End Get
|
||||
Set(value As CustomEventCollection)
|
||||
_CustomEvents = value
|
||||
End Set
|
||||
End Property
|
||||
Private _CustomEvents As CustomEventCollection = Nothing
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user