PageRenderTime 45ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/Source Code/SongDatabase/ProjectletStyle.vb

#
Visual Basic | 115 lines | 29 code | 21 blank | 65 comment | 0 complexity | 29d37224e76bf3d55b99fe63c4ba3201 MD5 | raw file
  1. Imports System.Drawing
  2. Imports PowerSong.SongDatabase.Style
  3. ''' <summary>
  4. ''' Represents style details applied to a projectlet.
  5. ''' </summary>
  6. Public Class ProjectletStyle
  7. ''' <summary>
  8. ''' The name of the tag, representing the current date.
  9. ''' </summary>
  10. Public Const DATE_TAG As String = "{Date}"
  11. ''' <summary>
  12. ''' The name of the tag representing the current time.
  13. ''' </summary>
  14. Public Const TIME_TAG As String = "{Time}"
  15. ''' <summary>
  16. ''' The name of the tag representing the title of the item being projected.
  17. ''' </summary>
  18. Public Const TITLE_TAG As String = "{Title}"
  19. ''' <summary>
  20. ''' The name of the tag representing the verse of the item being projected.
  21. ''' </summary>
  22. Public Const VERSE_TAG As String = "{Verse}"
  23. ''' <summary>
  24. ''' The name of the tag representing the list of authors of the item being projected.
  25. ''' </summary>
  26. Public Const AUTHORS_TAG As String = "{Authors}"
  27. ''' <summary>
  28. ''' The name of the tag representing simple copyright details.
  29. ''' </summary>
  30. Public Const SIMPLE_COPYRIGHT_TAG As String = "{SimpleCopyright}"
  31. Private FCategory As String = "Verse"
  32. ''' <summary>
  33. ''' Gets the name of the category.
  34. ''' </summary>
  35. ''' <value>The category name.</value>
  36. Public ReadOnly Property Category() As String
  37. Get
  38. Return FCategory
  39. End Get
  40. End Property
  41. ''' <summary>
  42. ''' Gets or sets the name of the font.
  43. ''' </summary>
  44. ''' <value>The name of the font.</value>
  45. Public Property FontName() As String = "Verdana"
  46. ''' <summary>
  47. ''' Gets or sets the font style.
  48. ''' </summary>
  49. ''' <value>The font style.</value>
  50. Public Property FontStyle() As FontStyle = FontStyle.Regular
  51. ''' <summary>
  52. ''' Gets or sets the size of the font.
  53. ''' </summary>
  54. ''' <value>The size of the font.</value>
  55. Public Property FontSize() As Integer = 48
  56. ''' <summary>
  57. ''' Gets or sets the font colour.
  58. ''' </summary>
  59. ''' <value>The font colour.</value>
  60. Public Property FontColour() As Color = color.White
  61. ''' <summary>
  62. ''' Gets or sets the font effect.
  63. ''' </summary>
  64. ''' <value>The font effect.</value>
  65. Public Property FontEffect() As ETextEffect = ETextEffect.Shadow
  66. ''' <summary>
  67. ''' Gets or sets the colour of the font effect.
  68. ''' </summary>
  69. ''' <value>The colour of the font effect.</value>
  70. Public Property FontEffectColour() As Color = Color.Black
  71. ''' <summary>
  72. ''' Gets or sets the text alignment.
  73. ''' </summary>
  74. ''' <value>The text alignment.</value>
  75. Public Property Alignment() As ETextAlignment = ETextAlignment.TopMiddle
  76. ''' <summary>
  77. ''' Gets or sets the area covered by the projectlet.
  78. ''' </summary>
  79. ''' <value>The area of the projectlet. Each value should be between 0 and 1.</value>
  80. Public Property Area() As RectangleF = New RectangleF(0.05, 0.05, 0.9, 0.9)
  81. ''' <summary>
  82. ''' Gets or sets the display option.
  83. ''' </summary>
  84. ''' <value>The display option.</value>
  85. Public Property DisplayOption() As EDisplayOption = EDisplayOption.Always
  86. ''' <summary>
  87. ''' Gets or sets the content details of this projectlet.
  88. ''' </summary>
  89. ''' <value>The content details. Variables covered in curly braces are replaced with actual text. Valid values include {Date}, {Time}, {Title}, {Verse}, {Authors}, {SimpleCopyright}.</value>
  90. Public Property Content() As String = String.Empty
  91. Friend Sub New(ByVal category As String)
  92. FCategory = category
  93. End Sub
  94. End Class