forked from ventrian/News-Articles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathucHeader.ascx.vb
executable file
·104 lines (72 loc) · 3.12 KB
/
ucHeader.ascx.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
Imports DotNetNuke.Services.Exceptions
Imports Ventrian.NewsArticles.Components.Types
Imports Ventrian.NewsArticles.Base
Namespace Ventrian.NewsArticles
Partial Public Class ucHeader
Inherits NewsArticleControlBase
#Region " Private Members "
Private _selectedMenu As MenuOptionType = MenuOptionType.CurrentArticles
Private _menuPosition As MenuPositionType = MenuPositionType.Top
Private _processMenu As Boolean = False
#End Region
#Region " Public Properties "
Public WriteOnly Property MenuPosition() As String
Set(ByVal value As String)
Select Case value.ToLower()
Case "top"
_menuPosition = MenuPositionType.Top
Return
Case "bottom"
_menuPosition = MenuPositionType.Bottom
Return
End Select
End Set
End Property
Public WriteOnly Property SelectedMenu() As String
Set(ByVal value As String)
Select Case Value.ToLower()
Case "adminoptions"
_selectedMenu = MenuOptionType.AdminOptions
Return
Case "approvearticles"
_selectedMenu = MenuOptionType.ApproveArticles
Return
Case "approvecomments"
_selectedMenu = MenuOptionType.ApproveComments
Return
Case "categories"
_selectedMenu = MenuOptionType.Categories
Return
Case "currentarticles"
_selectedMenu = MenuOptionType.CurrentArticles
Return
Case "myarticles"
_selectedMenu = MenuOptionType.MyArticles
Return
Case "search"
_selectedMenu = MenuOptionType.Search
Return
Case "syndication"
_selectedMenu = MenuOptionType.Syndication
Return
Case "submitarticle"
_selectedMenu = MenuOptionType.SubmitArticle
Return
End Select
End Set
End Property
#End Region
#Region " Event Handlers "
Private Sub Page_PreRender(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.PreRender
Try
If (_processMenu = False And _menuPosition = ArticleModuleBase.ArticleSettings.MenuPosition) Then
TokenProcessor.ProcessMenu(plhControls.Controls, ArticleModuleBase, _selectedMenu)
_processMenu = True
End If
Catch exc As Exception 'Module failed to load
ProcessModuleLoadException(Me, exc)
End Try
End Sub
#End Region
End Class
End Namespace