C# Class Nexus.Client.ModManagement.Scripting.XmlScript.UI.HeaderPanel

A panel that displays an image and title.
Inheritance: System.Windows.Forms.UserControl
Show file Open project: NexusMods/NexusModManager-4.5

Private Properties

Property Type Description
Fade void
loadImage void
updateLayout void

Public Methods

Method Description
HeaderPanel ( ) : System

The default constructor.

Protected Methods

Method Description
OnFontChanged ( EventArgs e ) : void

Raises the Control.FontChanged event.

This method updates the font of the label.

OnResize ( EventArgs e ) : void

Raises the Control.Reszie event.

This forces the label to refresh if it hasn't already done so.

resize ( Image p_imgSource, Size p_szeSize ) : Bitmap

Resizes the source image to fit into the header.

The piture box automatically sizes the image to fit; however, resizing ourselves gives us a significant performance advantage when creating the fade effect.

Private Methods

Method Description
Fade ( ) : void

Generates the fade effect.

loadImage ( ) : void

Loads the image into the header, and adjust the picture box to display the image correctly.

updateLayout ( ) : void

Positions the controls per the properties.

Method Details

HeaderPanel() public method

The default constructor.
public HeaderPanel ( ) : System
return System

OnFontChanged() protected method

Raises the Control.FontChanged event.
This method updates the font of the label.
protected OnFontChanged ( EventArgs e ) : void
e System.EventArgs An describing the event arguments.
return void

OnResize() protected method

Raises the Control.Reszie event.
This forces the label to refresh if it hasn't already done so.
protected OnResize ( EventArgs e ) : void
e System.EventArgs An describing the event arguments.
return void

resize() protected method

Resizes the source image to fit into the header.
The piture box automatically sizes the image to fit; however, resizing ourselves gives us a significant performance advantage when creating the fade effect.
protected resize ( Image p_imgSource, Size p_szeSize ) : Bitmap
p_imgSource Image The image to resize.
p_szeSize System.Drawing.Size The size to which to resize the image.
return System.Drawing.Bitmap