Class LabelView
public sealed class LabelView : AbstractView
Inherited Members
Namespace: HomeSeer.Jui.Views
Assembly: PluginSdk.dll
Labels define static text displayed to the user. This can either be as a single set of text or as a combination of a name and value to indicate that a particular property is set to a given value.
Constructors
View SourceLabelView(String, String)
Create a new instance of a Label with an ID and text value
Declaration
[JsonConstructor]
public LabelView(string id, string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | The unique ID for the View |
System.String | name | The name of the View; the text displayed by the label |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if a view is created with an invalid ID |
LabelView(String, String, String)
Create a new instance of a Label with an ID, Name, and text value
Declaration
public LabelView(string id, string name, string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | The unique ID for the View |
System.String | name | The name of the View; the title of the label |
System.String | value | The text displayed by the label |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if both the name and value are empty |
Properties
View SourceLabelType
The type of the label
Declaration
[JsonProperty("label_type")]
public ELabelType LabelType { get; set; }
Property Value
Type | Description |
---|---|
ELabelType |
Value
The value displayed; leave blank to just show the name
Declaration
[JsonProperty("value")]
public string Value { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
View SourceGetStringValue()
Get the value associated with this view as a string if there is one.
Declaration
public override string GetStringValue()
Returns
Type | Description |
---|---|
System.String | The value stored in this view as a string or NULL if there is no value stored. |
Overrides
View SourceToHtml(Int32)
Get a string representation of this view converted into HTML
Declaration
public override string ToHtml(int indent = 0)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | indent |
Returns
Type | Description |
---|---|
System.String | An HTML representation of the view as a string |