-
Notifications
You must be signed in to change notification settings - Fork 0
/
BaseTabHandlerDescendant.vb
52 lines (44 loc) · 2.38 KB
/
BaseTabHandlerDescendant.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Imports System
Imports DevExpress.XtraTab.ViewInfo
Imports DevExpress.XtraTab
Imports System.Windows.Forms
Imports DevExpress.Utils
Imports DevExpress.Utils.Controls
Namespace XtraTabWithButtons
Public Class BaseTabHandlerDescendant
Inherits BaseTabHandler
Public Sub New(ByVal tabControl As IXtraTab)
MyBase.New(tabControl)
End Sub
Protected Overrides Function OnMouseMove(ByVal e As MouseEventArgs) As Boolean
Dim result As Boolean = MyBase.OnMouseMove(e)
Dim ee As DXMouseEventArgs = DXMouseEventArgs.GetMouseArgs(e)
If ViewInfo IsNot Nothing Then
Dim infodes As BaseTabPageViewInfoDescendant = TryCast(ViewInfo.SelectedTabPageViewInfo, BaseTabPageViewInfoDescendant)
infodes.PagePanel.ProcessEvent(New ProcessEventEventArgs(EventType.MouseMove, ee))
End If
Return result
End Function
Protected Overrides Function OnMouseDown(ByVal e As MouseEventArgs) As Boolean
Dim result As Boolean = MyBase.OnMouseDown(e)
Dim ee As DXMouseEventArgs = DXMouseEventArgs.GetMouseArgs(e)
Dim infodes As BaseTabPageViewInfoDescendant = TryCast(ViewInfo.SelectedTabPageViewInfo, BaseTabPageViewInfoDescendant)
If infodes.PagePanel.Bounds.Contains(e.Location) Then infodes.PagePanel.ProcessEvent(New ProcessEventEventArgs(EventType.MouseDown, ee))
Return result
End Function
Protected Overrides Function OnMouseUp(ByVal e As MouseEventArgs) As Boolean
Dim result As Boolean = MyBase.OnMouseUp(e)
Dim ee As DXMouseEventArgs = DXMouseEventArgs.GetMouseArgs(e)
Dim infodes As BaseTabPageViewInfoDescendant = TryCast(ViewInfo.SelectedTabPageViewInfo, BaseTabPageViewInfoDescendant)
infodes.PagePanel.ProcessEvent(New ProcessEventEventArgs(EventType.MouseUp, ee))
Return result
End Function
Protected Overrides Sub OnMouseLeave(ByVal e As EventArgs)
MyBase.OnMouseLeave(e)
If ViewInfo IsNot Nothing Then
Dim infodes As BaseTabPageViewInfoDescendant = TryCast(ViewInfo.SelectedTabPageViewInfo, BaseTabPageViewInfoDescendant)
infodes.PagePanel.ProcessEvent(New ProcessEventEventArgs(EventType.MouseLeave, EventArgs.Empty))
End If
End Sub
End Class
End Namespace