C# Class Open.Core.ViewBase

Base for classes that represent, manage and construct views ("UI").
Inheritance: ModelBase, IView, ISize
显示文件 Open project: philcockfield/Open.TestHarness.SL Class Usage Examples

Public Methods

Method Description
GetAttribute ( string attribute ) : string
GetCss ( string attribute ) : string
Insert ( string cssSeletor, InsertMode mode ) : void
SetAttribute ( string attribute, string value ) : void
SetCss ( string attribute, string value ) : void
SetSize ( int width, int height ) : void
UpdateLayout ( ) : void

Protected Methods

Method Description
ChangeFocusElement ( jQueryObject element ) : void

Changes the element that is used for focus control.

By default this is the 'Container', however if a child element within the control is the primary reciever of focus use this method to assign it as such.

FireIsEnabledChanged ( ) : void
FireIsVisibleChanged ( ) : void
FireLoaded ( ) : void
FireSizeChanged ( ) : void
OnAfterInsert ( InsertMode mode ) : void

Invoked immediately after the insertion occurs via the 'Insert' method.

OnBeforeInsert ( jQueryObject targetElement, InsertMode mode ) : void

Invoked immediately before the insertion occurs via the 'Insert' method.

Use this to extract any meta-data from the original element before it is removed from the DOM.

OnDisposed ( ) : void

Destructor.

OnIsEnabledChanged ( ) : void
OnIsVisibleChanged ( ) : void
OnIsVisibleChanging ( bool isVisible ) : bool

Invoked when the 'IsVisible' property is causing the visibility to change.

Override this method to intercept the visibility value which is ultmately used to chance the CSS value. For instance, this is useful when you want to retain the 'IsVisible' property value as a logical value, but cause the control to be hidden like when a tab should be shown (logically), but is overflowing off the screen so should be hidden.

OnSizeChanged ( ) : void
OnUpdateLayout ( ) : void
RetrieveHtml ( string url, System.Action onComplete ) : void

Inserts the HTML from the specified URL.

ViewBase ( jQueryObject container ) : System

Constructor.

Private Methods

Method Description
FireGotFocus ( ) : void
FireLostFocus ( ) : void
GetInsertException ( string cssSeletor, string message ) : Exception
SetSizeInternal ( int value, SizeDimension dimension, bool withEvent ) : void
SyncVisibility ( bool isVisible ) : void
ViewBase ( ) : System

Method Details

ChangeFocusElement() protected method

Changes the element that is used for focus control.
By default this is the 'Container', however if a child element within the control is the primary reciever of focus use this method to assign it as such.
protected ChangeFocusElement ( jQueryObject element ) : void
element jQueryObject The child element that is the primary reciever of focus.
return void

FireIsEnabledChanged() protected method

protected FireIsEnabledChanged ( ) : void
return void

FireIsVisibleChanged() protected method

protected FireIsVisibleChanged ( ) : void
return void

FireLoaded() protected method

protected FireLoaded ( ) : void
return void

FireSizeChanged() protected method

protected FireSizeChanged ( ) : void
return void

GetAttribute() public method

public GetAttribute ( string attribute ) : string
attribute string
return string

GetCss() public method

public GetCss ( string attribute ) : string
attribute string
return string

Insert() public method

public Insert ( string cssSeletor, InsertMode mode ) : void
cssSeletor string
mode InsertMode
return void

OnAfterInsert() protected method

Invoked immediately after the insertion occurs via the 'Insert' method.
protected OnAfterInsert ( InsertMode mode ) : void
mode InsertMode The strategy used for the insertion.
return void

OnBeforeInsert() protected method

Invoked immediately before the insertion occurs via the 'Insert' method.
Use this to extract any meta-data from the original element before it is removed from the DOM.
protected OnBeforeInsert ( jQueryObject targetElement, InsertMode mode ) : void
targetElement jQueryObject The element being replaced.
mode InsertMode The strategy used for the insertion.
return void

OnDisposed() protected method

Destructor.
protected OnDisposed ( ) : void
return void

OnIsEnabledChanged() protected method

protected OnIsEnabledChanged ( ) : void
return void

OnIsVisibleChanged() protected method

protected OnIsVisibleChanged ( ) : void
return void

OnIsVisibleChanging() protected method

Invoked when the 'IsVisible' property is causing the visibility to change.
Override this method to intercept the visibility value which is ultmately used to chance the CSS value. For instance, this is useful when you want to retain the 'IsVisible' property value as a logical value, but cause the control to be hidden like when a tab should be shown (logically), but is overflowing off the screen so should be hidden.
protected OnIsVisibleChanging ( bool isVisible ) : bool
isVisible bool The IsVisible value.
return bool

OnSizeChanged() protected method

protected OnSizeChanged ( ) : void
return void

OnUpdateLayout() protected method

protected OnUpdateLayout ( ) : void
return void

RetrieveHtml() protected method

Inserts the HTML from the specified URL.
protected RetrieveHtml ( string url, System.Action onComplete ) : void
url string The URL of the HTML content to retrieve.
onComplete System.Action Action to invoke upon completion.
return void

SetAttribute() public method

public SetAttribute ( string attribute, string value ) : void
attribute string
value string
return void

SetCss() public method

public SetCss ( string attribute, string value ) : void
attribute string
value string
return void

SetSize() public method

public SetSize ( int width, int height ) : void
width int
height int
return void

UpdateLayout() public method

public UpdateLayout ( ) : void
return void

ViewBase() protected method

Constructor.
protected ViewBase ( jQueryObject container ) : System
container jQueryObject The root HTML element of the control (if null a
is generated).
return System