C# Class Argentini.Halide.H3Rollover

The H3Rollover class assigns images that are used for mouseovers and mouseouts to images, ImageButtons, etc. This is a better solution than subclassing an existing ImageButton because that would lead to a lot of duplicate code unless delegation is used. Using a combination of subclassing and delegation would also take away from the simplicity of the solution.
Show file Open project: argentini/Halide

Public Methods

Method Description
AssignRolloverImage ( System.Web.UI.HtmlControls.HtmlImage control, string imageUrlMouseOver ) : void

Add a rollover image to a control.

AssignRolloverImage ( System.Web.UI.HtmlControls.HtmlImage control, string imageUrlMouseOver, string imageUrlMouseOut ) : void

Add rollover and normal state images to a control.

AssignRolloverImage ( Image control, string imageUrlMouseOver ) : void

Add a rollover image to a control.

AssignRolloverImage ( Image control, string imageUrlMouseOver, string imageUrlMouseOut ) : void

Add rollover and normal state images to a control.

H3Rollover ( ) : System

Constructor.

H3Rollover ( String VariableName ) : System

Constructor allows the developer to customize the name of the image array for multiple uses of this class per page.

PreLoadImages ( System.Web.UI.HtmlControls.HtmlContainerControl container ) : void

Preloads the images (caching purposes only) into a container on the page; optional.

PreLoadImages ( System.Web.UI.WebControls.Literal container ) : void

Preloads the images (caching purposes only) into a literal control on the page; optional.

PreLoadImages ( Page webPage ) : void

Preloads the images (caching purposes only) into the body of the page; optional.

Private Methods

Method Description
AddAttribute ( System.Web.UI.AttributeCollection a, string eventName, string imageUrl ) : void
AddImage ( string imageURL ) : void
GenerateCacheCode ( Control control ) : String

Method Details

AssignRolloverImage() public method

Add a rollover image to a control.
public AssignRolloverImage ( System.Web.UI.HtmlControls.HtmlImage control, string imageUrlMouseOver ) : void
control System.Web.UI.HtmlControls.HtmlImage Control to which a rollover image should be applied.
imageUrlMouseOver string Path to the rollover image.
return void

AssignRolloverImage() public method

Add rollover and normal state images to a control.
public AssignRolloverImage ( System.Web.UI.HtmlControls.HtmlImage control, string imageUrlMouseOver, string imageUrlMouseOut ) : void
control System.Web.UI.HtmlControls.HtmlImage Control to which a rollover image should be applied.
imageUrlMouseOver string Path to the rollover image.
imageUrlMouseOut string Path to the default image.
return void

AssignRolloverImage() public method

Add a rollover image to a control.
public AssignRolloverImage ( Image control, string imageUrlMouseOver ) : void
control Image Control to which a rollover image should be applied.
imageUrlMouseOver string Path to the rollover image.
return void

AssignRolloverImage() public method

Add rollover and normal state images to a control.
public AssignRolloverImage ( Image control, string imageUrlMouseOver, string imageUrlMouseOut ) : void
control Image Control to which a rollover image should be applied.
imageUrlMouseOver string Path to the rollover image.
imageUrlMouseOut string Path to the default image.
return void

H3Rollover() public method

Constructor.
public H3Rollover ( ) : System
return System

H3Rollover() public method

Constructor allows the developer to customize the name of the image array for multiple uses of this class per page.
public H3Rollover ( String VariableName ) : System
VariableName String Name for the Javascript image array (defaults to "aImages").
return System

PreLoadImages() public method

Preloads the images (caching purposes only) into a container on the page; optional.
public PreLoadImages ( System.Web.UI.HtmlControls.HtmlContainerControl container ) : void
container System.Web.UI.HtmlControls.HtmlContainerControl Container object to use.
return void

PreLoadImages() public method

Preloads the images (caching purposes only) into a literal control on the page; optional.
public PreLoadImages ( System.Web.UI.WebControls.Literal container ) : void
container System.Web.UI.WebControls.Literal Literal control object to use.
return void

PreLoadImages() public method

Preloads the images (caching purposes only) into the body of the page; optional.
public PreLoadImages ( Page webPage ) : void
webPage System.Web.UI.Page Page object to use.
return void