本文整理汇总了VB.NET中System.Workflow.ComponentModel.Design.WorkflowDesignerMessageFilter类的典型用法代码示例。如果您正苦于以下问题:VB.NET WorkflowDesignerMessageFilter类的具体用法?VB.NET WorkflowDesignerMessageFilter怎么用?VB.NET WorkflowDesignerMessageFilter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了WorkflowDesignerMessageFilter类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: New
Friend NotInheritable Class CustomMessageFilter
Inherits WorkflowDesignerMessageFilter
#Region "Members and Constructor"
Private mouseDown As Boolean
Private serviceProvider As IServiceProvider
Private workflowView As WorkflowView
Private loader As WorkflowDesignerLoader
Public Sub New(ByVal provider As IServiceProvider, ByVal workflowView As WorkflowView, ByVal loader As WorkflowDesignerLoader)
Me.serviceProvider = provider
Me.workflowView = workflowView
Me.loader = loader
End Sub
#End Region
#Region "WorkflowDesignerMessageFilter Overridables"
Protected Overrides Function OnMouseDown(ByVal eventArgs As System.Windows.Forms.MouseEventArgs) As Boolean
' Allow other components to process this event by not returning true.
mouseDown = True
Return False
End Function
Protected Overrides Function OnMouseMove(ByVal eventArgs As System.Windows.Forms.MouseEventArgs) As Boolean
' Allow other components to process this event by not returning true.
If mouseDown Then
workflowView.ScrollPosition = New Point(eventArgs.X, eventArgs.Y)
End If
Return False
End Function
Protected Overrides Function OnMouseUp(ByVal eventArgs As MouseEventArgs) As Boolean
' Allow other components to process this event by not returning true.
mouseDown = False
Return False
End Function
Protected Overrides Function OnMouseDoubleClick(ByVal eventArgs As MouseEventArgs) As Boolean
mouseDown = False
Return True
End Function
Protected Overrides Function OnMouseEnter(ByVal eventArgs As MouseEventArgs) As Boolean
' Allow other components to process this event by not returning true.
mouseDown = False
Return False
End Function
Protected Overrides Function OnMouseHover(ByVal eventArgs As MouseEventArgs) As Boolean
' Allow other components to process this event by not returning true.
mouseDown = False
Return False
End Function
Protected Overrides Function OnMouseLeave() As Boolean
' Allow other components to process this event by not returning true.
mouseDown = False
Return False
End Function
Protected Overrides Function OnMouseWheel(ByVal eventArgs As MouseEventArgs) As Boolean
mouseDown = False
Return True
End Function
Protected Overrides Function OnMouseCaptureChanged() As Boolean
' Allow other components to process this event by not returning true.
mouseDown = False
Return False
End Function
Protected Overrides Function OnDragEnter(ByVal eventArgs As DragEventArgs) As Boolean
Return True
End Function
Protected Overrides Function OnDragOver(ByVal eventArgs As DragEventArgs) As Boolean
Return True
End Function
Protected Overrides Function OnDragLeave() As Boolean
Return True
End Function
Protected Overrides Function OnDragDrop(ByVal eventArgs As DragEventArgs) As Boolean
Return True
End Function
Protected Overrides Function OnGiveFeedback(ByVal gfbevent As GiveFeedbackEventArgs) As Boolean
Return True
End Function
Protected Overrides Function OnQueryContinueDrag(ByVal qcdevent As QueryContinueDragEventArgs) As Boolean
Return True
End Function
Protected Overrides Function OnKeyDown(ByVal eventArgs As KeyEventArgs) As Boolean
If eventArgs.KeyCode = Keys.Delete Then
Dim selectionService As ISelectionService = CType(serviceProvider.GetService(GetType(ISelectionService)), ISelectionService)
If selectionService IsNot Nothing AndAlso TypeOf selectionService.PrimarySelection Is CodeActivity Then
Dim codeActivityComponent As CodeActivity = CType(selectionService.PrimarySelection, CodeActivity)
Dim parentActivity As CompositeActivity = codeActivityComponent.Parent
If parentActivity IsNot Nothing Then
parentActivity.Activities.Remove(codeActivityComponent)
Me.ParentView.Update()
End If
loader.RemoveActivityFromDesigner(codeActivityComponent)
End If
End If
Return True
End Function
Protected Overrides Function OnKeyUp(ByVal eventArgs As KeyEventArgs) As Boolean
Return True
End Function
Protected Overrides Function OnShowContextMenu(ByVal menuPoint As Point) As Boolean
Return True
End Function
#End Region
End Class
开发者ID:VB.NET开发者,项目名称:System.Workflow.ComponentModel.Design,代码行数:125,代码来源:WorkflowDesignerMessageFilter