Search Results for

    Show / Hide Table of Contents

    Class TimeSpanView

    • C#
    • Visual Basic
    public sealed class TimeSpanView : AbstractView
    Public NotInheritable Class TimeSpanView
        Inherits AbstractView
    Inheritance
    System.Object
    AbstractView
    TimeSpanView
    Inherited Members
    AbstractView.Id
    AbstractView.Name
    AbstractView.Type
    AbstractView.HtmlIndent
    AbstractView.NonAllowedCharactersForId
    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


    A time span allows user to enter a time interval in days, hours, minutes and seconds


    Constructors

    View Source

    TimeSpanView(String, String)

    Create a new instance of an TimeSpanView with an ID and a Name

    Declaration
    • C#
    • Visual Basic
    [JsonConstructor]
    public TimeSpanView(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

    Exceptions
    Type Condition
    System.ArgumentNullException

    Thrown if a view is created with an invalid ID

    View Source

    TimeSpanView(String, String, TimeSpan)

    Create a new instance of an InputView with an ID, a Name, and a value.

    Declaration
    • C#
    • Visual Basic
    public TimeSpanView(string id, string name, TimeSpan value)
    Public Sub New(id As String, name As String, value As TimeSpan)
    Parameters
    Type Name Description
    System.String id

    The unique ID for the View

    System.String name

    The name of the View

    System.TimeSpan value

    The time span value

    Properties

    View Source

    ShowDays

    Wether a number of days can be entered

    Declaration
    • C#
    • Visual Basic
    [JsonProperty("show_days")]
    public bool ShowDays { get; set; }
    <JsonProperty("show_days")>
    Public Property ShowDays As Boolean
    Property Value
    Type Description
    System.Boolean
    View Source

    ShowSeconds

    Wether a number of seconds can be entered

    Declaration
    • C#
    • Visual Basic
    [JsonProperty("show_seconds")]
    public bool ShowSeconds { get; set; }
    <JsonProperty("show_seconds")>
    Public Property ShowSeconds As Boolean
    Property Value
    Type Description
    System.Boolean
    View Source

    Value

    The current value of the field

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

    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()
    Remarks

    The same as Value

    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

    Update(AbstractView)

    Update the view to the new state. This will change the time span value

    Declaration
    • C#
    • Visual Basic
    public override void Update(AbstractView newViewState)
    Public Overrides Sub Update(newViewState As AbstractView)
    Parameters
    Type Name Description
    AbstractView newViewState

    The new state of the view being updated. This view's ID and Type must match the calling view exactly

    Overrides
    AbstractView.Update(AbstractView)
    Exceptions
    Type Condition
    ViewTypeMismatchException

    Thrown when the new view's class doesn't match the calling view

    View Source

    UpdateValue(String)

    Update the value of the view

    Declaration
    • C#
    • Visual Basic
    public override void UpdateValue(string value)
    Public Overrides Sub UpdateValue(value As String)
    Parameters
    Type Name Description
    System.String value

    The new value

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