-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathThemeModel.vb
89 lines (82 loc) · 2.26 KB
/
ThemeModel.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
Option Infer On
Imports System
Imports System.Xml.Serialization
Imports System.Collections.Generic
Imports System.Web.UI
Imports System.Drawing
Public Class ThemeModel
Inherits ThemeModelBase
Private _baseColor As String
Private _fontFamily As String
Private _fontSize As String
Private _showAsTop As Boolean
Private _previewColor As String
<XmlAttribute> _
Public Property BaseColor() As String
Get
If String.IsNullOrEmpty(_baseColor) Then
Return ""
End If
Return _baseColor
End Get
Set(ByVal value As String)
_baseColor = value.ToUpper()
End Set
End Property
<XmlAttribute> _
Public Property IsNew() As Boolean
<XmlAttribute> _
Public Property FontFamily() As String
Get
If String.IsNullOrEmpty(_fontFamily) Then
Return ""
End If
Return _fontFamily
End Get
Set(ByVal value As String)
_fontFamily = value
End Set
End Property
<XmlAttribute> _
Public Property FontSize() As String
Get
If String.IsNullOrEmpty(_fontSize) Then
Return ""
End If
Return _fontSize
End Get
Set(ByVal value As String)
_fontSize = value
End Set
End Property
Public ReadOnly Property Font() As String
Get
Dim result = String.Empty
If Not String.IsNullOrEmpty(FontSize) AndAlso Not String.IsNullOrEmpty(FontFamily) Then
result = String.Format("{0} {1}", FontSize, FontFamily)
End If
Return result
End Get
End Property
<XmlAttribute> _
Public Property ShowAsTop() As Boolean
Get
Return _showAsTop
End Get
Set(ByVal value As Boolean)
_showAsTop = value
End Set
End Property
<XmlAttribute> _
Public Property PreveiwColor() As String
Get
If String.IsNullOrEmpty(_previewColor) Then
Return ""
End If
Return _previewColor
End Get
Set(ByVal value As String)
_previewColor = value.ToUpper()
End Set
End Property
End Class