-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathThemeModel.cs
80 lines (75 loc) · 1.75 KB
/
ThemeModel.cs
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
using System;
using System.Xml.Serialization;
using System.Collections.Generic;
using System.Web.UI;
using System.Drawing;
public class ThemeModel : ThemeModelBase {
string _baseColor;
string _fontFamily;
string _fontSize;
bool _showAsTop;
string _previewColor;
[XmlAttribute]
public string BaseColor {
get {
if(String.IsNullOrEmpty(_baseColor))
return "";
return _baseColor;
}
set {
_baseColor = value.ToUpper();
}
}
[XmlAttribute]
public bool IsNew { get; set; }
[XmlAttribute]
public string FontFamily {
get {
if(String.IsNullOrEmpty(_fontFamily))
return "";
return _fontFamily;
}
set {
_fontFamily = value;
}
}
[XmlAttribute]
public string FontSize {
get {
if(String.IsNullOrEmpty(_fontSize))
return "";
return _fontSize;
}
set {
_fontSize = value;
}
}
public string Font {
get {
var result = string.Empty;
if(!string.IsNullOrEmpty(FontSize) && !string.IsNullOrEmpty(FontFamily))
result = string.Format("{0} {1}", FontSize, FontFamily);
return result;
}
}
[XmlAttribute]
public bool ShowAsTop {
get {
return _showAsTop;
}
set {
_showAsTop = value;
}
}
[XmlAttribute]
public string PreveiwColor {
get {
if(String.IsNullOrEmpty(_previewColor))
return "";
return _previewColor;
}
set {
_previewColor = value.ToUpper();
}
}
}