Tham khảo giá trị của LanapBotDetect::TextStyleEnum
LanapBotDetect::TextStyleEnum là thành viên của BotDetect ASP CAPTCHA bao gồm tất cả các giá trị hợp lệ của kiểu dữ liệu TextStyle của LanapBotDetect component. Nó thể hiện các giải thuật làm biến dạng được sử dụng để tạo hình ảnh CAPTCHA.
- Thành viên của TextStyleEnum
- Trị mặc định của TextStyleEnum
- Cách dùng TextStyleEnum
- Ghi chú TextStyleEnum
- Hình ảnh ví dụ TextStyleEnum
Thành viên
[VB] Public Enum CodeTypeEnum Chess = 0 Distortion = 1 Jail = 2 Negative = 3 Snow = 4 Split = 5 Wave = 6 WantedCircular = 7 Stitch = 8 Chess3D = 9 Circles = 10 Corrosion = 11 Chipped = 12 Flash = 13 Mass = 14 Rough = 15 BlackOverlap = 16 Overlap = 17 Overlap2 = 18 Halo = 19 ThickThinLines = 20 ThickThinLines2 = 21 SunRays = 22 SunRays2 = 23 Darts = 24 FingerPrints = 25 CrossShadow = 26 CrossShadow2 = 27 Lego = 28 Strippy = 29 ThinWavyLetters = 30 Chalkboard = 31 WavyColorLetters = 32 AncientMosaic = 33 Vertigo = 34 WavyChess = 35 MeltingHeat = 36 SunAndWarmAir = 37 Graffiti = 38 Graffiti2 = 39 Cut = 40 SpiderWeb = 41 Collage = 42 InBandages = 43 Ghostly = 44 PaintMess = 45 CaughtInTheNet = 46 CaughtInTheNet2 = 47 Bullets = 48 Bullets2 = 49 End Enum
[C++]
typedef enum TextStyleEnum
{
Chess = 0,
Distortion = 1,
Jail = 2,
Negative = 3,
Snow = 4,
Split = 5,
Wave = 6,
WantedCircular = 7,
Stitch = 8,
Chess3D = 9,
Circles = 10,
Corrosion = 11,
Chipped = 12,
Flash = 13,
Mass = 14,
Rough = 15,
BlackOverlap = 16,
Overlap = 17,
Overlap2 = 18,
Halo = 19,
ThickThinLines = 20,
ThickThinLines2 = 21,
SunRays = 22,
SunRays2 = 23,
Darts = 24,
FingerPrints = 25,
CrossShadow = 26,
CrossShadow2 = 27,
Lego = 28,
Strippy = 29,
ThinWavyLetters = 30,
Chalkboard = 31,
WavyColorLetters = 32,
AncientMosaic = 33,
Vertigo = 34,
WavyChess = 35,
MeltingHeat = 36,
SunAndWarmAir = 37,
Graffiti = 38,
Graffiti2 = 39,
Cut = 40,
SpiderWeb = 41,
Collage = 42,
InBandages = 43,
Ghostly = 44,
PaintMess = 45,
CaughtInTheNet = 46,
CaughtInTheNet2 = 47,
Bullets = 48,
Bullets2 = 49
} TextStyleEnum;
Giá trị mặc định
Nếu thuộc tính TextStyle không được xác định, 31 (Chalkboard) được sử dụng như giá trị mặc định.
Cách sử dụng
[ASP] ' Assume we are using the LanapBotDetectHandler.asp helper ' Example 1: simple assignment <img src= "LanapBotDetectHandler.asp?Command=CreateImage&TextStyle=4" alt="CAPTCHA image" /> ' Example 2: randomization <% Function RandomFromRange(lowerLimit, upperLimit) Dim num Randomize num = CInt((upperlimit - lowerlimit)*Rnd() + lowerlimit) RandomFromRange = num End Function Function RandomFromValues(values) Dim num Randomize num = RandomFromRange(0, UBound(values)) RandomFromValues = values(num) End Function Dim algorithms(5) algorithms(0) = 28 algorithms(1) = 36 algorithms(2) = 44 algorithms(3) = 25 algorithms(4) = 39 algorithms(5) = 48 Dim style style = RandomFromValues(algorithms) %> <img src= "LanapBotDetectHandler.asp?Command= CreateImage&TextStyle=<%=style%>" alt="CAPTCHA image" />
Ví dụ về truy cập trực tiếp:
[VB]
Set objCaptcha = CreateObject("LanapBotDetect")
objCaptcha.TextStyle = 4
[PHP]
$objCaptcha = new COM('LanapBotDetect');
$objCaptcha->TextStyle = 4;
[Ruby]
require 'win32ole'
objCaptcha = WIN32OLE.new('LanapBotDetect')
objCaptcha.TextStyle = 4
Ghi chú
Trong khi một số giải thuật luôn luôn đổi thành chữ in hoa trước khi tạo ảnh CAPTCHA, một số khác luôn đổi thành chữ in thường, việc xác thực CAPTCHA không phân biệt hoa thường.
Bạn có thể thông báo điều này tới người dùng bằng cách tự động đổi thành chữ in hoa (hay in thường) trong textbox nhập câu trả lời khi người dùng nhập. Bạn có thể dùng JavaScript, và tránh nhầm lẫn đối với người sử dụng.
Hình ảnh ví dụ
0 - Chess
1 - Distortion
2 - Jail
3 - Negative
4 - Snow
5 - Split
6 - Wave
7 - WantedCircular
8 - Stitch
9 - Chess3D
10 - Circles
11 - Corrosion
12 - Chipped
13 - Flash
14 - Mass
15 - Rough
16 - BlackOverlap
17 - Overlap
18 - Overlap2
19 - Halo
20 - ThickThinLines
21 - ThickThinLines2
22 - SunRays
23 - SunRays2
24 - Darts
25 - FingerPrints
26 - CrossShadow
27 - CrossShadow2
28 - Lego
29 - Strippy
30 - ThinWavyLetters
31 - Chalkboard
32 - WavyColorLetters
33 - AncientMosaic
34 - Vertigo
35 - WavyChess
36 - MeltingHeat
37 - SunAndWarmAir
38 - Graffiti
39 - Graffiti2
40 - Cut
41 - SpiderWeb
42 - Collage
43 - InBandages
44 - Ghostly
45 - PaintMess
46 - CaughtInTheNet
47 - CaughtInTheNet2
48 - Bullets
49 - Bullets2
Phiên bản hiện tại của BotDetect
- BotDetect ASP.NET CAPTCHA v2.0.152009–11–23
- BotDetect ASP CAPTCHA v2.0.92009–02–12
Xin lưu ý
Trang này là bản dịch tiếng Việt không chính thức của trang gốc tiếng Anh: LanapBotDetect::TextStyleEnum Reference và có thể không chính xác, không đầy đủ hoặc không cập nhật.
Cập nhật ngày 2009-11-30. Áp dụng cho BotDetect ASP.NET CAPTCHA v2.0.15 và BotDetect ASP CAPTCHA v2.0.9.





