PageRenderTime 19ms CodeModel.GetById 14ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/Source Code/SongDatabase/ProjectletStyle.vb

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