Repository navigation
Expand file tree
/
Copy pathNotesDataEditor.cs
More file actions
75 lines (68 loc) · 2.1 KB
/
Copy pathNotesDataEditor.cs
File metadata and controls
75 lines (68 loc) · 2.1 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
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using umbraco.interfaces;
namespace uComponents.DataTypes.Notes
{
/// <summary>
/// The DataEditor for the Notes data-type.
/// </summary>
public class NotesDataEditor : Panel, IDataEditor
{
/// <summary>
/// The NotesOptions for the data-type.
/// </summary>
private NotesOptions m_options;
/// <summary>
/// Gets a value indicating whether to show a label or not.
/// </summary>
/// <value>
/// <c>true</c> if want to show label; otherwise, <c>false</c>.
/// </value>
public bool ShowLabel
{
get { return m_options.ShowLabel; }
}
/// <summary>
/// Gets a value indicating whether treat as rich text editor.
/// </summary>
/// <value>
/// <c>true</c> if treat as rich text editor; otherwise, <c>false</c>.
/// </value>
public bool TreatAsRichTextEditor
{
get { return false; }
}
/// <summary>
/// Gets the editor.
/// </summary>
public Control Editor
{
get { return this; }
}
/// <summary>
/// Initializes a new instance of the <see cref="NotesDataEditor"/> class.
/// </summary>
/// <param name="options">The options.</param>
public NotesDataEditor(NotesOptions options)
{
m_options = options;
}
/// <summary>
/// Saves this instance.
/// </summary>
public void Save()
{ }
/// <summary>
/// Raises the <see cref="E:System.Web.UI.Control.Init"/> event.
/// </summary>
/// <param name="e">An <see cref="T:System.EventArgs"/> object that contains the event data.</param>
protected override void OnInit(EventArgs e)
{
this.Controls.Add(new Literal { Text = m_options.Value });
this.Style.Add("padding-left", "10px");
this.Style.Add("padding-right", "10px");
base.OnInit(e);
}
}
}