Repository navigation
Expand file tree
/
Copy pathDataType.cs
More file actions
102 lines (88 loc) · 2.76 KB
/
Copy pathDataType.cs
File metadata and controls
102 lines (88 loc) · 2.76 KB
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
// --------------------------------------------------------------------------------------------------------------------
// <summary>
// 11.08.2011 - Created [Ove Andersen]
// </summary>
// --------------------------------------------------------------------------------------------------------------------
using System;
using umbraco.editorControls;
using umbraco.interfaces;
namespace uComponents.DataTypes.DataTypeGrid
{
/// <summary>
/// The dtg data type.
/// </summary>
public class DataType : umbraco.cms.businesslogic.datatype.BaseDataType, IDataType
{
#region Declarations
/// <summary>
/// The m_ data.
/// </summary>
private IData m_Data;
/// <summary>
/// The Data Editor for the data-type.
/// </summary>
private IDataEditor m_DataEditor;
/// <summary>
/// The PreValue Editor for the datatype.
/// </summary>
private PrevalueEditor m_PreValueEditor;
#endregion
#region Overrides
/// <summary>
/// Gets the id of the data-type.
/// </summary>
/// <value>The id of the data-type.</value>
public override Guid Id
{
get
{
return new Guid(DataTypeConstants.DataTypeGridId);
}
}
/// <summary>
/// Gets the name of the data type.
/// </summary>
/// <value>The name of the data type.</value>
public override string DataTypeName
{
get
{
return "uComponents: DataType Grid";
}
}
/// <summary>
/// Gets the prevalue editor.
/// </summary>
/// <value>The prevalue editor.</value>
public override IDataPrevalue PrevalueEditor
{
get
{
return m_PreValueEditor ?? (m_PreValueEditor = new PrevalueEditor(this));
}
}
/// <summary>
/// Lazy load the associated DataEditor,
/// this is constructed supplying the data value stored by the PreValueEditor, and also the configuration settings of the PreValueEditor
/// </summary>
public override IDataEditor DataEditor
{
get
{
return m_DataEditor ?? (m_DataEditor = new DataEditor(this.Data, ((PrevalueEditor)PrevalueEditor).Settings, this.DataTypeDefinitionId, Guid.NewGuid().ToString("N")));
}
}
/// <summary>
/// Gets the data.
/// </summary>
/// <value>The data.</value>
public override IData Data
{
get
{
return m_Data ?? (m_Data = new XmlData(this));
}
}
#endregion
}
}