16 using System.Collections.Generic;
19 using erminas.SmartAPI.CMS.Converter;
20 using erminas.SmartAPI.CMS.Project.Folder;
22 namespace erminas.SmartAPI.CMS.Project.ContentClasses.Elements
28 string AltText {
get;
set; }
29 int? AutomaticMaximumScalingHeight {
get;
set; }
30 int? AutomaticMaximumScalingWidth {
get;
set; }
31 string Border {
get;
set; }
32 int? ColorDepthInBit {
get;
set; }
37 string EligibleSuffixes {
get;
set; }
42 string HSpace {
get;
set; }
43 string HtmlHeight {
get;
set; }
44 string HtmlWidth {
get;
set; }
45 bool IsBorderAutomaticallyInsertedIntoPage {
get;
set; }
46 bool IsDragAndDropActivated {
get;
set; }
47 bool IsHeightAutomaticallyInsertedIntoPage {
get;
set; }
48 bool IsOnlyPathAndFilenameInserted {
get;
set; }
49 bool IsScaledOrConverted {
get;
set; }
50 bool IsWidthAutomaticallyInsertedIntoPage {
get;
set; }
51 int? MaxFileSizeInKB {
get;
set; }
52 string Quality {
get;
set; }
53 string RequiredNamePattern {
get;
set; }
54 int? RequiredPictureHeight {
get;
set; }
55 int? RequiredPictureWidth {
get;
set; }
56 ILanguageDependentValue<IFile> SampleImage {
get; }
57 ILanguageDependentValue<IFile> SrcFile {
get; }
58 string Supplement {
get;
set; }
60 string Usemap {
get;
set; }
61 string VSpace {
get;
set; }
65 internal class Image : ExtendedContentClassContentElement, IImage
67 internal Image(
IContentClass contentClass, XmlElement xmlElement) : base(contentClass, xmlElement)
71 [RedDot(
"eltalign", ConverterType = typeof (StringEnumConverter<ImageAlignment>))]
74 get {
return GetAttributeValue<ImageAlignment>(); }
75 set { SetAttributeValue(value); }
78 [RedDot(
"eltpresetalt", ConverterType = typeof (EnumConverter<AltType>))]
81 get {
return GetAttributeValue<AltType>(); }
82 set { SetAttributeValue(value); }
88 get {
return GetAttributeValue<string>(); }
89 set { SetAttributeValue(value); }
92 [RedDot(
"eltmaxpicheight")]
93 public int? AutomaticMaximumScalingHeight
95 get {
return GetAttributeValue<int?>(); }
96 set { SetAttributeValue(value); }
99 [RedDot(
"eltmaxpicwidth")]
100 public int? AutomaticMaximumScalingWidth
102 get {
return GetAttributeValue<int?>(); }
103 set { SetAttributeValue(value); }
106 [RedDot(
"eltborder")]
109 get {
return GetAttributeValue<string>(); }
110 set { SetAttributeValue(value); }
113 [RedDot(
"eltpicdepth")]
114 public int? ColorDepthInBit
116 get {
return GetAttributeValue<int?>(); }
117 set { SetAttributeValue(value); }
120 [RedDot(
"eltsuffixes")]
121 public string EligibleSuffixes
123 get {
return GetAttributeValue<string>(); }
124 set { SetAttributeValue(value); }
127 public IList<string> EligibleSuffixesList
131 var suffixes = EligibleSuffixes;
132 if (
string.IsNullOrEmpty(suffixes))
134 return new List<string>();
136 return suffixes.Split(
';').Where(s => !
string.IsNullOrEmpty(s)).ToList();
138 set { EligibleSuffixes = value == null ? null :
string.Join(
";", value); }
141 [RedDot(
"eltfolderguid", ConverterType = typeof (FolderConverter))]
144 get {
return GetAttributeValue<IFolder>(); }
145 set { SetAttributeValue(value); }
148 [RedDot(
"elthspace")]
151 get {
return GetAttributeValue<string>(); }
152 set { SetAttributeValue(value); }
155 [RedDot(
"eltheight")]
156 public string HtmlHeight
158 get {
return GetAttributeValue<string>(); }
159 set { SetAttributeValue(value); }
163 public string HtmlWidth
165 get {
return GetAttributeValue<string>(); }
166 set { SetAttributeValue(value); }
169 [RedDot(
"eltautoborder")]
170 public bool IsBorderAutomaticallyInsertedIntoPage
172 get {
return GetAttributeValue<bool>(); }
173 set { SetAttributeValue(value); }
176 [RedDot(
"eltdragdrop")]
177 public bool IsDragAndDropActivated
179 get {
return GetAttributeValue<bool>(); }
180 set { SetAttributeValue(value); }
183 [RedDot(
"eltautoheight")]
184 public bool IsHeightAutomaticallyInsertedIntoPage
186 get {
return GetAttributeValue<bool>(); }
187 set { SetAttributeValue(value); }
190 [RedDot(
"eltonlyhrefvalue")]
191 public bool IsOnlyPathAndFilenameInserted
193 get {
return GetAttributeValue<bool>(); }
194 set { SetAttributeValue(value); }
197 [RedDot(
"eltconvert")]
198 public bool IsScaledOrConverted
200 get {
return GetAttributeValue<bool>(); }
201 set { SetAttributeValue(value); }
204 [RedDot(
"eltautowidth")]
205 public bool IsWidthAutomaticallyInsertedIntoPage
207 get {
return GetAttributeValue<bool>(); }
208 set { SetAttributeValue(value); }
211 [RedDot(
"eltmaxsize")]
212 public int? MaxFileSizeInKB
214 get {
return GetAttributeValue<int?>(); }
215 set { SetAttributeValue(value); }
218 [RedDot(
"eltcompression")]
219 public string Quality
221 get {
return GetAttributeValue<string>(); }
222 set { SetAttributeValue(value); }
225 [RedDot(
"eltfilename")]
226 public string RequiredNamePattern
228 get {
return GetAttributeValue<string>(); }
229 set { SetAttributeValue(value); }
232 [RedDot(
"eltpicheight")]
233 public int? RequiredPictureHeight
235 get {
return GetAttributeValue<int?>(); }
236 set { SetAttributeValue(value); }
239 [RedDot(
"eltpicwidth")]
240 public int? RequiredPictureWidth
242 get {
return GetAttributeValue<int?>(); }
243 set { SetAttributeValue(value); }
246 [RedDot(
"__examplefile", ConverterType = typeof (ExampleFileConverter), DependsOn =
"eltfolderguid")]
247 public ILanguageDependentValue<IFile> SampleImage
249 get {
return GetAttributeValue<ILanguageDependentValue<IFile>>(); }
252 [RedDot(
"__srcfile", ConverterType = typeof (SrcFileConverter))]
253 public ILanguageDependentValue<IFile> SrcFile
255 get {
return GetAttributeValue<ILanguageDependentValue<IFile>>(); }
258 [RedDot(
"eltsupplement")]
259 public string Supplement
261 get {
return GetAttributeValue<string>(); }
262 set { SetAttributeValue(value); }
265 [RedDot(
"elttargetformat", ConverterType = typeof (StringEnumConverter<TargetFormat>))]
268 get {
return GetAttributeValue<TargetFormat>(); }
269 set { SetAttributeValue(value); }
272 [RedDot(
"eltusermap")]
275 get {
return GetAttributeValue<string>(); }
276 set { SetAttributeValue(value); }
279 [RedDot(
"eltvspace")]
282 get {
return GetAttributeValue<string>(); }
283 set { SetAttributeValue(value); }