• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 
7 #define IDD_JS_MSGBOX                   25600
8 #define IDD_RESPONSE                    25601
9 #define IDC_JS_MSG_TEXT                 25602
10 #define ID_JS_MSG_OK                    25603
11 #define ID_JS_MSG_CANCEL                25604
12 #define IDC_JS_MSG_ICON                 25605
13 #define ID_JS_MSG_YES                   25606
14 #define ID_JS_MSG_NO                    25607
15 #define IDC_JS_QUESTION                 25608
16 #define ID_JS_OK                        25609
17 #define ID_JS_CANCEL                    25610
18 #define IDC_JS_ANSWER                   25611
19 #define IDC_JS_EDIT                     25612
20 #define IDS_STRING_JSALERT              25613
21 #define IDS_STRING_JSPARAMERROR         25614
22 #define IDS_STRING_JSAFNUMBER_KEYSTROKE 25615
23 #define IDS_STRING_JSINPUTERROR         25616
24 #define IDS_STRING_JSPARAM_TOOLONG      25617
25 #define IDS_STRING_JSPARSEDATE          25618
26 #define IDS_STRING_JSRANGE1             25619
27 #define IDS_STRING_JSRANGE2             25620
28 #define IDS_STRING_JSRANGE3             25621
29 #define IDS_STRING_JSRANGE4             25622
30 #define IDS_STRING_FILEOPENFAIL         25623
31 #define IDS_STRING_JSATTENTION          25624
32 #define IDS_STRING_JSSUBMITS            25625
33 #define IDS_STRING_JSSUBMITF            25626
34 #define IDS_STRING_NOTSUPPORT           25627
35 #define IDS_STRING_JSBUSY               25628
36 #define IDS_STRING_JSEVENT              25629
37 #define IDS_STRING_RUN                  25630
38 #define IDS_STRING_UNHANDLED            25631
39 #define IDS_STRING_JSPRINT1             25632
40 #define IDS_STRING_JSPRINT2             25633
41 #define IDS_STRING_LAUNCHURL            25634
42 #define IDS_JSPARAM_INCORRECT           25635
43 #define IDD_JS_CONSOLE                  25636
44 #define IDS_STRING_SAFEMODEL            25636
45 #define IDC_EDTSCRIPT                   25637
46 #define IDC_BTNCLEAR                    25638
47 #define IDC_EDTOUTPUT                   25639
48 #define IDC_CHECK_TIPS                  25640
49 #define IDC_BTNRUN                      25641
50 
51 
52 
JSGetStringFromID(CJS_Context * pContext,FX_UINT ID)53 static CFX_WideString JSGetStringFromID(CJS_Context* pContext, FX_UINT ID)
54 {
55 	switch(ID)
56 	{
57 	case IDS_STRING_JSALERT:
58 		return L"Alert";
59 	case IDS_STRING_JSPARAMERROR:
60         return L"The amount of parameters is not correct !";
61 	case IDS_STRING_JSAFNUMBER_KEYSTROKE:
62 		return L"The input value is invalid.";
63 	case	IDS_STRING_JSINPUTERROR:
64         return L"Input error !";
65 	case	IDS_STRING_JSPARAM_TOOLONG:
66 		return L"The value you are going to input is too long.";
67 	case	IDS_STRING_JSPARSEDATE:
68 		return L"The input string can't be parsed to a valid date time (%s).";
69 	case	IDS_STRING_JSRANGE1:
70 		return L"Invalid value: must be greater or equal to %s and less than or equal to %s.";
71 	case	IDS_STRING_JSRANGE2:
72 		return L"Invalid value: must be greater or equal to %s.";
73 	case	IDS_STRING_JSRANGE3:
74 		return L"Invalid value: must be less than or equal to %s.";
75 	case	IDS_STRING_JSRANGE4:
76 		return L"Range Error";
77 	case	IDS_STRING_FILEOPENFAIL:
78         return L"Opening file failed.";
79 	case	IDS_STRING_JSATTENTION:
80 		return L"Attention";
81 	case	IDS_STRING_JSSUBMITS:
82 		return L"Submit form successfully!";
83 	case	IDS_STRING_JSSUBMITF:
84 		return L"Submit form failed!";
85 	case	IDS_STRING_NOTSUPPORT:
86 		return L"Not supported.";
87 	case	IDS_STRING_JSBUSY:
88 		return L"System is busy!";
89 	case	IDS_STRING_JSEVENT:
90 		return L"The event of the formfield exists!";
91 	case	IDS_STRING_RUN:
92 		return L"It runs successfully.";
93 	case	IDS_STRING_UNHANDLED:
94 		return L"An unhandled error!";
95 	case	IDS_STRING_JSPRINT1:
96 		return L"The second parameter can't convert to Date!";
97 	case	IDS_STRING_JSPRINT2:
98 		return L"The second parameter isn't a valid Date!";
99 	case	IDS_STRING_LAUNCHURL:
100 		return L"The Document is trying to connect to \r\n%s\r\nIf you trust the site, choose OK. If you don't trust the site, choose Cancel.";
101 	case	IDS_JSPARAM_INCORRECT:
102 		return L"The parameter you inputted is incorrect!";
103 	case	IDS_STRING_SAFEMODEL:
104 		return L"Secure reading mode";
105 	default:
106 		return L"";
107 
108 	}
109 }
110 
111