/Source Code/Projection/Notice.vb
Visual Basic | 118 lines | 96 code | 22 blank | 0 comment | 0 complexity | a2f73b45c28275f24319c4d98a691d85 MD5 | raw file
- Public Class Notice
-
- Private FText As String = String.Empty
-
- Public Property Text() As String
- Get
- Return FText
- End Get
- Set(ByVal value As String)
- FText = value
- End Set
- End Property
-
- Private FSpeed As Double = 0.05
-
- Public Property Speed() As Double
- Get
- Return FSpeed
- End Get
- Set(ByVal value As Double)
- FSpeed = value
- End Set
- End Property
-
- Private FBackgroundColour As Color = Color.White
-
- Public Property BackgroundColour() As Color
- Get
- Return FBackgroundColour
- End Get
- Set(ByVal value As Color)
- FBackgroundColour = value
- End Set
- End Property
-
- Private FTextColour As Color = Color.Black
-
- Public Property TextColour() As Color
- Get
- Return FTextColour
- End Get
- Set(ByVal value As Color)
- FTextColour = value
- End Set
- End Property
-
- Private FStartTime As Date = Now
-
- Public Property StartTime() As Date
- Get
- Return FStartTime
- End Get
- Set(ByVal value As Date)
- FStartTime = value
- End Set
- End Property
-
- Private FEndTime As Date = Now.AddSeconds(30)
-
- Public Property EndTime() As Date
- Get
- Return FEndTime
- End Get
- Set(ByVal value As Date)
- FEndTime = value
- End Set
- End Property
-
- Public ReadOnly Property TimeLeft() As TimeSpan
- Get
- Return FEndTime.Subtract(Now)
- End Get
- End Property
-
- Public ReadOnly Property TimePassed() As TimeSpan
- Get
- Return Now.Subtract(FStartTime)
- End Get
- End Property
-
- Private FFont As Font = Nothing
-
- Public Property Font() As Font
- Get
- Return FFont
- End Get
- Set(ByVal value As Font)
- FFont = value
- End Set
- End Property
-
- Private FProjectingFont As Font = SystemFonts.DefaultFont
-
- Friend Property ProjectingFont() As Font
- Get
- Return FProjectingFont
- End Get
- Set(ByVal value As Font)
- FProjectingFont = value
- End Set
- End Property
-
- Public Sub New(ByVal text As String, _
- ByVal speed As Double, _
- ByVal lengthInSeconds As Integer, _
- ByVal backgroundColour As Color, _
- ByVal textColour As Color)
-
- FText = text
- FSpeed = speed
- FStartTime = Now
- FEndTime = FStartTime.AddSeconds(lengthInSeconds)
- FBackgroundColour = backgroundColour
- FTextColour = textColour
-
- End Sub
-
- End Class