PageRenderTime 44ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/Source Code/Plugins/PluginSupport/PluginContextBase.vb

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