C# Class KeePass.UI.BannerFactory

Mostrar archivo Open project: amiryal/keepass2 Class Usage Examples

Public Methods

Method Description
CreateBanner ( int nWidth, int nHeight, BannerStyle bs, Image imgIcon, string strTitle, string strLine ) : Image
CreateBanner ( int nWidth, int nHeight, BannerStyle bs, Image imgIcon, string strTitle, string strLine, bool bNoCache ) : Image
CreateBannerEx ( Form f, PictureBox picBox, Image imgIcon, string strTitle, string strLine ) : void
CreateBannerEx ( Form f, PictureBox picBox, Image imgIcon, string strTitle, string strLine, bool bNoCache ) : void
UpdateBanner ( Form f, PictureBox picBox, Image imgIcon, string strTitle, string strLine, int &nOldWidth ) : void

Update/create a dialog banner. This method is intended for updating banners in resizable dialogs. The created banner images bypass the cache of the factory and are disposed when the dialog is resized (i.e. the caller shouldn't do anything with the banner images).

Private Methods

Method Description
DpiScaleFloat ( float x, int nBaseHeight ) : float
DpiScaleInt ( int x, int nBaseHeight ) : int
DrawText ( Graphics g, string strText, Font font, Point pt, Color clrForeground, TextFormatFlags tff, int nWidth, int nHeight ) : void

Method Details

CreateBanner() public static method

public static CreateBanner ( int nWidth, int nHeight, BannerStyle bs, Image imgIcon, string strTitle, string strLine ) : Image
nWidth int
nHeight int
bs BannerStyle
imgIcon Image
strTitle string
strLine string
return Image

CreateBanner() public static method

public static CreateBanner ( int nWidth, int nHeight, BannerStyle bs, Image imgIcon, string strTitle, string strLine, bool bNoCache ) : Image
nWidth int
nHeight int
bs BannerStyle
imgIcon Image
strTitle string
strLine string
bNoCache bool
return Image

CreateBannerEx() public static method

public static CreateBannerEx ( Form f, PictureBox picBox, Image imgIcon, string strTitle, string strLine ) : void
f System.Windows.Forms.Form
picBox System.Windows.Forms.PictureBox
imgIcon Image
strTitle string
strLine string
return void

CreateBannerEx() public static method

public static CreateBannerEx ( Form f, PictureBox picBox, Image imgIcon, string strTitle, string strLine, bool bNoCache ) : void
f System.Windows.Forms.Form
picBox System.Windows.Forms.PictureBox
imgIcon Image
strTitle string
strLine string
bNoCache bool
return void

UpdateBanner() public static method

Update/create a dialog banner. This method is intended for updating banners in resizable dialogs. The created banner images bypass the cache of the factory and are disposed when the dialog is resized (i.e. the caller shouldn't do anything with the banner images).
public static UpdateBanner ( Form f, PictureBox picBox, Image imgIcon, string strTitle, string strLine, int &nOldWidth ) : void
f System.Windows.Forms.Form
picBox System.Windows.Forms.PictureBox
imgIcon Image
strTitle string
strLine string
nOldWidth int
return void