-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPopupContainerFormOkButton.vb
40 lines (33 loc) · 1.43 KB
/
PopupContainerFormOkButton.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
Imports DevExpress.XtraEditors.Popup
Imports System.Drawing
Namespace PopupContainerControlWithOKButton
Friend Class PopupContainerFormOkButton
Inherits PopupContainerForm
' constructor
Public Sub New(ByVal ownerEdit As PopupContainerEditOKButton)
MyBase.New(ownerEdit)
End Sub
' override methods
Protected Overrides Sub SetupButtons()
UpdatePopupButtons()
End Sub
Private Overloads ReadOnly Property Properties As RepositoryItemPopupContainerEditOKButton
Get
Dim edit As PopupContainerEditOKButton = TryCast(OwnerEdit, PopupContainerEditOKButton)
If edit Is Nothing Then Return Nothing
Return edit.Properties
End Get
End Property
Friend Sub UpdatePopupButtons()
If Properties Is Nothing Then Return
fShowOkButton = Properties.ShowOkButton
If Properties.ShowPopupCloseButton Then
fCloseButtonStyle = If(Properties.ShowOkButton, BlobCloseButtonStyle.Caption, BlobCloseButtonStyle.Glyph)
Else
fCloseButtonStyle = BlobCloseButtonStyle.None
End If
AllowSizing = Properties.PopupSizeable
If Not AllowSizing AndAlso Not fShowOkButton AndAlso fCloseButtonStyle = BlobCloseButtonStyle.None Then ViewInfo.ShowSizeBar = False
End Sub
End Class
End Namespace