Méthode | Description | |
---|---|---|
GenValidateCode ( ) : string |
生成默认长度(5位字符)的验证码
|
|
GenValidateCode ( int len ) : string |
生成指定长度的验证码
|
|
GenValidateCode ( int len, bool isOnlyNumber ) : string |
生成指定长度的验证码
|
|
OutputValidateCodeImage ( string code, int width, int height, Color bgcolor, int textcolor ) : byte[] |
生成验证码图片
|
|
OutputValidateCodeImage ( System response, string validateCode ) : void |
输出验证码图片,默认图片宽度是80,高度30,文字大小是18号
|
|
OutputValidateCodeImage ( System response, string validateCode, float fontSize ) : void |
输出验证码图片,默认图片宽度是80,高度30,文字大小是18号
|
|
OutputValidateCodeImage ( System response, string validateCode, float fontSize, int height ) : void |
输出验证码图片
|
|
OutputValidateCodeImage ( System response, string validateCode, float fontSize, int width, int height ) : void |
输出验证码图片
|
|
OutputValidateCodeImage ( System response, string validateCode, float fontSize, int width, int height, Color bgcolor, Color txcolor, FontStyle fontStyle, string contentType ) : void |
输出验证码图片,支持png和jpeg
|
Méthode | Description | |
---|---|---|
Next ( int max ) : int |
获得下一个随机数
|
|
Next ( int min, int max ) : int |
获得下一个随机数
|
public static GenValidateCode ( int len ) : string | ||
len | int | 验证码的长度 |
Résultat | string |
public static GenValidateCode ( int len, bool isOnlyNumber ) : string | ||
len | int | 验证码的长度 |
isOnlyNumber | bool | |
Résultat | string |
public static OutputValidateCodeImage ( string code, int width, int height, Color bgcolor, int textcolor ) : byte[] | ||
code | string | 要显示的验证码 |
width | int | 宽度 |
height | int | 高度 |
bgcolor | Color | 背景色 |
textcolor | int | 文字颜色 |
Résultat | byte[] |
public static OutputValidateCodeImage ( System response, string validateCode ) : void | ||
response | System | HttpResponse对象 |
validateCode | string | 验证码字符串 |
Résultat | void |
public static OutputValidateCodeImage ( System response, string validateCode, float fontSize ) : void | ||
response | System | HttpResponse对象 |
validateCode | string | 验证码字符串 |
fontSize | float | 字体大小 |
Résultat | void |
public static OutputValidateCodeImage ( System response, string validateCode, float fontSize, int height ) : void | ||
response | System | HttpResponse对象 |
validateCode | string | 验证码字符串 |
fontSize | float | 字体大小 |
height | int | 图片高度 |
Résultat | void |
public static OutputValidateCodeImage ( System response, string validateCode, float fontSize, int width, int height ) : void | ||
response | System | HttpResponse对象 |
validateCode | string | 验证码字符串 |
fontSize | float | 字体大小 |
width | int | 图片宽度 |
height | int | 图片高度 |
Résultat | void |
public static OutputValidateCodeImage ( System response, string validateCode, float fontSize, int width, int height, Color bgcolor, Color txcolor, FontStyle fontStyle, string contentType ) : void | ||
response | System | HttpResponse对象 |
validateCode | string | 验证码字符串 |
fontSize | float | 字体大小 |
width | int | 图片宽度 |
height | int | 图片高度 |
bgcolor | Color | |
txcolor | Color | |
fontStyle | FontStyle | |
contentType | string | |
Résultat | void |