Search Results for

    Show / Hide Table of Contents

    Class LabelView

    • C#
    • Visual Basic
    public sealed class LabelView : AbstractView
    Public NotInheritable Class LabelView
        Inherits AbstractView
    Inheritance
    System.Object
    AbstractView
    LabelView
    Inherited Members
    AbstractView.Id
    AbstractView.Name
    AbstractView.Type
    AbstractView.HtmlIndent
    AbstractView.NonAllowedCharactersForId
    AbstractView.Update(AbstractView)
    AbstractView.UpdateValue(String)
    AbstractView.GetIndentStringFromNumber(Int32)
    AbstractView.IdContainsNonAllowedCharacters()
    AbstractView.ShallowCopy()
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    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 Source

    LabelView(String, String)

    Create a new instance of a Label with an ID and text value

    Declaration
    • C#
    • Visual Basic
    [JsonConstructor]
    public LabelView(string id, string name)
    <JsonConstructor>
    Public Sub New(id As String, name As String)
    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

    View Source

    LabelView(String, String, String)

    Create a new instance of a Label with an ID, Name, and text value

    Declaration
    • C#
    • Visual Basic
    public LabelView(string id, string name, string value)
    Public Sub New(id As String, name As String, value As String)
    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 Source

    LabelType

    The type of the label

    Declaration
    • C#
    • Visual Basic
    [JsonProperty("label_type")]
    public ELabelType LabelType { get; set; }
    <JsonProperty("label_type")>
    Public Property LabelType As ELabelType
    Property Value
    Type Description
    ELabelType
    View Source

    Value

    The value displayed; leave blank to just show the name

    Declaration
    • C#
    • Visual Basic
    [JsonProperty("value")]
    public string Value { get; set; }
    <JsonProperty("value")>
    Public Property Value As String
    Property Value
    Type Description
    System.String

    Methods

    View Source

    GetStringValue()

    Get the value associated with this view as a string if there is one.

    Declaration
    • C#
    • Visual Basic
    public override string GetStringValue()
    Public Overrides Function GetStringValue As String
    Returns
    Type Description
    System.String

    The value stored in this view as a string or NULL if there is no value stored.

    Overrides
    AbstractView.GetStringValue()
    View Source

    ToHtml(Int32)

    Get a string representation of this view converted into HTML

    Declaration
    • C#
    • Visual Basic
    public override string ToHtml(int indent = 0)
    Public Overrides Function ToHtml(indent As Integer = 0) As String
    Parameters
    Type Name Description
    System.Int32 indent
    Returns
    Type Description
    System.String

    An HTML representation of the view as a string

    Overrides
    AbstractView.ToHtml(Int32)
    • View Source
    In This Article
    Back to top HomeSeer Technologies