Search Results for

    Show / Hide Table of Contents

    Class Page.Factory

    • C#
    • Visual Basic
    [Obsolete("Please use HomeSeer.Jui.Views.PageFactory now.", false)]
    public static class Factory
    <Obsolete("Please use HomeSeer.Jui.Views.PageFactory now.", False)>
    Public Module Factory
    Inheritance
    System.Object
    Page.Factory
    Inherited Members
    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 factory class for creating pages


    Methods

    View Source

    CreateDeviceConfigPage(String, String)

    Create a new device configuration page

    Declaration
    • C#
    • Visual Basic
    public static Page CreateDeviceConfigPage(string id, string name)
    Public Shared Function CreateDeviceConfigPage(id As String, name As String) As Page
    Parameters
    Type Name Description
    System.String id

    The ID for the page

    System.String name

    The name of the page

    Returns
    Type Description
    Page

    A new Page with its type set to EPageType.DeviceConfig

    View Source

    CreateDeviceIncPage(String, String)

    Create a new device inclusion page

    Declaration
    • C#
    • Visual Basic
    static Page CreateDeviceIncPage(string id, string name)
    Shared Function CreateDeviceIncPage(id As String, name As String) As Page
    Parameters
    Type Name Description
    System.String id

    The ID for the page

    System.String name

    The name of the page

    Returns
    Type Description
    Page

    A new Page with its type set to EPageType.DeviceInclude

    View Source

    CreateEventActionPage(String, String)

    Create a new, event action page

    Declaration
    • C#
    • Visual Basic
    public static Page CreateEventActionPage(string id, string name)
    Public Shared Function CreateEventActionPage(id As String, name As String) As Page
    Parameters
    Type Name Description
    System.String id

    The ID for the page

    System.String name

    The name of the page

    Returns
    Type Description
    Page

    A new Page with its type set to EPageType.EventAction

    View Source

    CreateEventTriggerPage(String, String)

    Create a new, event trigger page

    Declaration
    • C#
    • Visual Basic
    public static Page CreateEventTriggerPage(string id, string name)
    Public Shared Function CreateEventTriggerPage(id As String, name As String) As Page
    Parameters
    Type Name Description
    System.String id

    The ID for the page

    System.String name

    The name of the page

    Returns
    Type Description
    Page

    A new Page with its type set to EPageType.EventTrigger

    View Source

    CreateFeaturePage(String, String)

    Create a new feature page

    Declaration
    • C#
    • Visual Basic
    static Page CreateFeaturePage(string id, string name)
    Shared Function CreateFeaturePage(id As String, name As String) As Page
    Parameters
    Type Name Description
    System.String id

    The ID for the page

    System.String name

    The name of the page

    Returns
    Type Description
    Page

    A new Page with its type set to EPageType.Feature

    View Source

    CreateGenericPage(String, String)

    Create a new, generic page

    Declaration
    • C#
    • Visual Basic
    public static Page CreateGenericPage(string id, string name)
    Public Shared Function CreateGenericPage(id As String, name As String) As Page
    Parameters
    Type Name Description
    System.String id

    The ID for the page

    System.String name

    The name of the page

    Returns
    Type Description
    Page

    A new Page with its type set to EPageType.Generic

    View Source

    CreateGuidedProcessPage(String, String)

    Create a new guided process page

    Declaration
    • C#
    • Visual Basic
    static Page CreateGuidedProcessPage(string id, string name)
    Shared Function CreateGuidedProcessPage(id As String, name As String) As Page
    Parameters
    Type Name Description
    System.String id

    The ID for the page

    System.String name

    The name of the page

    Returns
    Type Description
    Page

    A new Page with its type set to EPageType.Guide

    View Source

    CreateHtmlFeaturePage(String, String)

    Create a new HTML feature page

    Declaration
    • C#
    • Visual Basic
    static Page CreateHtmlFeaturePage(string id, string name)
    Shared Function CreateHtmlFeaturePage(id As String, name As String) As Page
    Parameters
    Type Name Description
    System.String id

    The ID for the page

    System.String name

    The name of the page

    Returns
    Type Description
    Page

    A new Page with its type set to EPageType.FeatureHtml

    View Source

    CreateSettingPage(String, String)

    Create a new settings page

    Declaration
    • C#
    • Visual Basic
    [Obsolete("Please use CreateSettingsPage() now.", false)]
    public static Page CreateSettingPage(string id, string name)
    <Obsolete("Please use CreateSettingsPage() now.", False)>
    Public Shared Function CreateSettingPage(id As String, name As String) As Page
    Parameters
    Type Name Description
    System.String id

    The ID for the page

    System.String name

    The name of the page

    Returns
    Type Description
    Page

    A new Page with its type set to EPageType.Settings

    View Source

    CreateSettingsPage(String, String)

    Create a new settings page

    Declaration
    • C#
    • Visual Basic
    public static Page CreateSettingsPage(string id, string name)
    Public Shared Function CreateSettingsPage(id As String, name As String) As Page
    Parameters
    Type Name Description
    System.String id

    The ID for the page

    System.String name

    The name of the page

    Returns
    Type Description
    Page

    A new Page with its type set to EPageType.Settings

    View Source

    FromJsonString(String)

    Deserialize a JSON string to a page

    This should always be wrapped in a try/catch in case the data received is malformed

    Declaration
    • C#
    • Visual Basic
    [Obsolete("Please use Page.FromJsonString() instead", true)]
    public static Page FromJsonString(string jsonString)
    <Obsolete("Please use Page.FromJsonString() instead", True)>
    Public Shared Function FromJsonString(jsonString As String) As Page
    Parameters
    Type Name Description
    System.String jsonString

    The JSON string containing the page

    Returns
    Type Description
    Page

    A Page

    Exceptions
    Type Condition
    JsonDataException

    Thrown when there was a problem deserializing the page

    View Source

    JsonFromList(List<Page>)

    Serialize a list of pages to a JSON string

    Declaration
    • C#
    • Visual Basic
    [Obsolete]
    public static string JsonFromList(List<Page> pages)
    <Obsolete>
    Public Shared Function JsonFromList(pages As List(Of Page)) As String
    Parameters
    Type Name Description
    System.Collections.Generic.List<Page> pages

    the List of Pages to serialize

    Returns
    Type Description
    System.String

    A JSON string containing the serialized pages

    Exceptions
    Type Condition
    JsonDataException

    Thrown when there was a problem serializing the page

    View Source

    ListFromJson(String)

    Deserialize a JSON string to a List of Pages

    Declaration
    • C#
    • Visual Basic
    [Obsolete("Please use Page.ListFromJson() instead", true)]
    public static List<Page> ListFromJson(string jsonString)
    <Obsolete("Please use Page.ListFromJson() instead", True)>
    Public Shared Function ListFromJson(jsonString As String) As List(Of Page)
    Parameters
    Type Name Description
    System.String jsonString

    The JSON string containing the list of pages

    Returns
    Type Description
    System.Collections.Generic.List<Page>

    A List of Jui.Page objects

    Exceptions
    Type Condition
    JsonDataException

    Thrown when there was a problem deserializing the page

    View Source

    PageListToHtml(List<String>, Int32)

    Convert a list of JSON pages into a tabbed HTML page.

    Declaration
    • C#
    • Visual Basic
    [Obsolete("Please use a SettingsCollection instead", true)]
    public static string PageListToHtml(List<string> jsonPages, int selectedPage = 0)
    <Obsolete("Please use a SettingsCollection instead", True)>
    Public Shared Function PageListToHtml(jsonPages As List(Of String), selectedPage As Integer = 0) As String
    Parameters
    Type Name Description
    System.Collections.Generic.List<System.String> jsonPages

    A list of pages serialized as JSON strings

    System.Int32 selectedPage

    The index of the page that should be selected by default

    Returns
    Type Description
    System.String

    A string containing a tabbed HTML page

    Exceptions
    Type Condition
    System.ArgumentNullException

    Thrown if the supplied list of pages is null

    System.ArgumentException

    Thrown if the list of pages is empty

    • View Source
    In This Article
    Back to top HomeSeer Technologies