PageRenderTime 24ms CodeModel.GetById 14ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 1ms

/Source Code/Plugins/PluginSupport/PluginContextBase.vb

#
Visual Basic | 45 lines | 14 code | 7 blank | 24 comment | 0 complexity | 0fc7812979540d02fbcd60a746548204 MD5 | raw file
 1Imports System.Windows.Forms
 2
 3Public MustInherit Class PluginContextBase
 4
 5    ''' <summary>
 6    ''' Names of items present in the main menu of the primary form.
 7    ''' </summary>
 8    Public Enum EMainMenuItem
 9        File = 0
10        Projection = 1
11        PlayList = 2
12        Tools = 3
13        Help = 4
14    End Enum
15
16    ''' <summary>
17    ''' Adds an item to the main menu.
18    ''' </summary>
19    ''' <param name="text">The text of the item added to the menu.</param>
20    ''' <param name="onClick">An event handler which handles users clicking the menu item.</param>
21    ''' <returns>The menu item added to the interface.</returns>
22    Public MustOverride Function AddMainMenuItem(ByVal text As String, ByVal onClick As EventHandler) As ToolStripItem
23
24    ''' <summary>
25    ''' Adds an item to the specified sub menu.
26    ''' </summary>
27    ''' <param name="mainMenuItem">The main menu item to add the item to.</param>
28    ''' <param name="text">The text of the item added to the specified menu.</param>
29    ''' <param name="onClick">An event handler which handles users clicking the menu item.</param>
30    ''' <returns>The menu item added to the interface.</returns>
31    Public MustOverride Function AddSubMenuItem(ByVal mainMenuItem As EMainMenuItem, ByVal text As String, ByVal onClick As EventHandler) As ToolStripItem
32
33    ''' <summary>
34    ''' Returns a Boolean value indicating whether or not a database is loaded.
35    ''' </summary>
36    ''' <returns>True if a database is loaded.</returns>
37    Public MustOverride Function IsDatabaseLoaded() As Boolean
38
39    ''' <summary>
40    ''' Returns the version of the database.
41    ''' </summary>
42    ''' <returns>The version of the database.</returns>
43    Public MustOverride Function GetDatabaseVersion() As String
44
45End Class