自动化立体仓库 - WCS系统
#
mrzhssss
2022-09-22 110f3977b399dd117ce1af49ca792d602e2ba9a9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows.Forms;
using System.Net;
using System.Net.Sockets;
using DevComponents.DotNetBar;
using System.Runtime.InteropServices;
using System.IO;
 
namespace WCS
{
    /// <summary>
    /// LED线程
    /// </summary>
    class LedThread
    {
        #region 初始化屏幕使用相关接口
        //指定五代控制器
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_Bx5G(uint* Bx5g);
 
        //指定六代控制器
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_Bx6G(uint* Bx6g);
 
        //创建客户端,适用于固定IP通讯
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_BxScreenClient(uint* screen);
 
        //创建客户端,适用于固定IP通讯
        //screenname - 屏幕名称
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_BxScreenClient2(uint* screen, string screenname);
 
        //创建客户端,适用于固定IP通讯
        // screenname - 屏幕名称
        // Bx - 指定Bx系列,可以是Bx5g或者Bx6g
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_BxScreenClient3(uint* screen, string screenname, uint Bx);
 
        //创建客户端,适用于串口通讯
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_BxScreenRS(uint* screen);
 
        //创建客户端,适用于串口通讯
        // screenname - 屏幕名称
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_BxScreenRS2(uint* screen, string screenname);
 
        //创建客户端,适用于服务器模式
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_BxServer(uint* server);
 
        //创建客户端,适用于服务器模式
        // aliasname - 名称
        // port - 端口号
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_BxServer2(uint* server, string alisaname, ushort port);
 
        //创建客户端,适用于服务器模式
        // aliasname - 名称
        // port - 端口号
        // Bx - 指定控制类型
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_BxServer3(uint* server, string aliasname, ushort port, uint Bx);
 
        //创建监听
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_BxServerListener(uint* listener);
 
        //设置8位访问密码
        // password - 8位访问密码
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ServerSetting_setAccessPassword(uint server, string password);
 
        //设置12位自定义ID
        // customid - 自定义ID
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ServerSetting_setCustomID(uint server, string custonid);
 
        //设置心跳时间间隔
        // time - 心跳时间间隔
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ServerSetting_setHeartBeatInterval(uint server, ushort time);
 
        //设置IP
        // ip - IP
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ServerSetting_setIP(uint server, byte* ip);
 
        //设置模式
        // mode - 模式
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ServerSetting_setMode(uint server, byte mode);
 
        //设置端口
        // port - 端口
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ServerSetting_setPort(uint server, ushort port);
 
        //创建连接相关接口
 
        // ledip - 控制器IP地址
        // ledport - 控制器端口号 5005
        // result - 是否为tcp通讯,true - tcp  false - udp
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreenClient_connect(uint screen, string ledip, int ledport, bool result);
 
        //取得控制器IP地址
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreenClient_getAddress(uint* ledip, uint screen);
 
        //取得控制器端口号
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreenClient_getPort(int* ledport, uint screen);
 
        //取得当前屏幕规格。屏幕规格在连线成功后自动从控制器上获取,若控制器未加载屏参时回复 NULL。
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_getProfile(uint* profile, uint screen);
 
        // comport - 串口号 例如:COM1
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreenRS_connect(uint screen, string comport);
 
        // conport - 串口号 例如:COM1
        // baudrate - 波特率 例如: 9600 ,57600
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreenRS_connect2(uint screen, string comport, int baudrate);
 
        //取得波特率
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreenRS_getBaudrate(int* baudrate, uint screen);
 
        //取得串口号
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreenRS_getComPort(uint* comport, uint screen);
 
        //节目相关接口
        //创建节目
        // programid - 节目编号组,0-999
        // screenprofile - 屏幕规格
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_ProgramBxFile(uint* program, int programid, uint screenprofile);
 
        //创建节目
        // programname - 节目名称,长度为四,第一码为P,后三位为数字,例如P001
        // screenprofile - 屏幕规格 
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_ProgramBxFile2(uint* program, string programname, uint screenprofile);
 
        //创建节目
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_ProgramDataBxFile(uint* programdata, string programname, uint srceenprofile);
 
        //创建节目
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_ProgramDataBxFile2(uint* programdata, string progamname, uint screenprofile, int programid);
 
        //锁定节目
        // programname - 节目名称
        // locked - 是否锁定 true : 锁定  false 解锁
        // lockduration - 锁定时间 以s为单位
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_ProgramLockCmd(uint* programlock, string programname, bool locked, uint lockduration);
 
        //锁定节目
        // programname - 节目名称
        // locked - 是否锁定 true: 锁定  false 解锁
        // lockduration - 锁定时间 以s为单位
        // nonvolatile - 掉电保存方式 0X00:掉电不保存  0X01:掉电保存
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_ProgramLockCmd2(uint* programlock, string progamname, bool locked, uint lockduration, byte nonvolatile);
 
        //节目播放的星期属性
        // mon -biy1到bit7依次代表周一到周日
        [DllImport("onbon.apo.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_ProgramWeek(uint* programweek, byte mon);
 
        //节目中添加区域
        // area - 区域
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ProgramBxFile_addArea(uint program, uint area);
 
        //增加节目播放时间段
        // starthour - 开始播放小时
        // startminute - 开始播放分钟
        // startsecond - 开始播放秒
        // endhour - 结束播放小时
        // endminute - 结束播放分钟
        // endsecond - 结束播放秒
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ProgramBxFile_addPlayPeriodSetting(uint program, byte strathour, byte startminute, byte startsecond, byte endhour, byte endminute, byte endsecond);
 
        //取得区域总数
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ProgramBxFile_getAreaCount(int* areacount, uint program);
 
        //取得播放结束日
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ProgramBxFile_getEndDay(int* endday, uint program);
 
        //取得结束播放月
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ProgramBxFile_getEndMonth(int* endmonth, uint program);
 
        //取得结束播放年
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ProgamBxFile_getEndYear(int* endyear, uint program);
 
        //取得文件名称
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ProgramBxFile_getFileName(uint program);
 
        //取得边框
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ProgramBxFile_getFrame(uint* frame, uint program);
 
        //取得节目等级 0:一般  1: 优先
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ProgramBxFile_getPriority(byte* programpriority, uint program);
 
        //取得播放重复次数
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ProgramBxFile_getProgramPlayTimes(int* times, uint progam);
 
        //取得节目播放时间长度,单位为s,当控制器上有多个节目时,会根据此设定控制节目被播放的时间长,当控制器上只有一个节目时,此设定没有效果。控制节目播放有效时间,可以利用addPlayPeriosSetting规划
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ProgramBxFile_getProgramTimeSpan(int* timespan, uint program);
 
        //取得播放周设定
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ProgramBxFile_getProgramWeek(uint* week, uint program);
 
        //取得开始播放日
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ProgramBxFile_getStartDay(int* startday, uint program);
 
        //取得开始播放月
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ProgramBxFile_getStartMonth(int* startmonth, uint program);
 
        //取得开始播放年
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ProgramBxFile_getStartYear(int* startyear, uint program);
 
        //设定结束播放日
        // endday - 结束播放日
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ProgramBxFile_setEndDay(uint program, byte endday);
 
        //设定结束播放月份
        // endmonth - 结束播放月份
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ProgramBxFile_setEndMonth(uint program, byte endmonth);
 
        //设定结束播放年
        // endyear - 结束播放年
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ProgramBxFile_setEndYear(uint program, ushort endyear);
 
        //设定节目等级
        // priority - 节目等级 0: 一般  1: 优先
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ProgramBxFile_setPriority(uint program, byte priority);
 
        //设定重复播放次数
        // programplaytiesm - 重复播放次数
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ProgramBxFile_setProgramPlayTimes(uint program, int programplaytimes);
 
        //设定节目播放时间长度,单位为s,0:循环播放。当控制器上有多个节目时,会根据此设定控制节目被播放的时间长
        //当控制器上只有一个节目时,此设定无效。
        //控制器节目播放有效时间,可利用addPlayPeriosSetting规划
        // programtimespan - 节目播放时间长度
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ProgramBxFile_setProgramTimeSpan(uint program, int programtimespan);
 
        //设置播放周
        // programweek - 播放周 在接口Create_ProgramWeek中创建
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ProgramBxFile_setProgramWeek(uint program, uint programweek);
 
        //设定开始播放日
        // startday - 开始播放日
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ProgramBxFile_setStartDay(uint program, byte startday);
 
        //设定开始播放月份
        // startmonth - 开始播放月份
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ProgramBxFile_setStartMonth(uint program, byte startmonth);
 
        //设定开始播放年
        // startyear - 开始播放年
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ProgramBxFile_setStartYear(uint program, ushort startyear);
 
        //取得当前偏移量
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ProgramDataBxFile_getCurrentOffset(int* currentoffset, uint programdata);
 
        //取得文件名称
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ProgramDataBxFile_getFileName(uint programdata);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ProgramDataBxFile_reset(uint programdata, int reset);
 
        //全周播放
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ProgramWeek_All(uint program);
 
        //全周取消播放
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ProgramWeek_Off(uint program);
 
        //区域相关接口
        //创建图文区域
        // x - x坐标
        // y - y坐标
        // width - 区域宽度
        // screenprofile - 屏幕规格
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_TextCaptionBxArea(uint* textarea, int x, int y, int width, int heigth, uint screenprofile);
 
        //取得图文区透明度
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TextCaptionBxArea_getTransparency(uint* transparency, uint textarea);
 
        //是否显示背景
        // isbackgroundflag - 背景是否显示 true: 显示  flase :不显示
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TextCaptionBxArea_isBackgroundFlag(bool* isbackgroundflag, uint textarea);
 
        //显示被背景遮罩的部分
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TextCaptionBxArea_maskByBackground(uint textarea);
 
        //与背景重叠显示
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TextCaptionBxArea_overlayWithBackfround(uint textarea);
 
        //设定是否显示背景
        // isbackgroundflag - 是否显示背景 true:显示 flase :不显示
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TextCaptionBxArea_setBackgroundFlag(uint textarea, bool isbackgroundflag);
 
        //设定透明度
        // transparency - 透明度 当该值大于等于0(不透明)小于等于100(全透明)时,以该北京区域为基准
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TextCaptionBxArea_setTransparency(uint textarea, int transparency);
 
        //增加图片
        // filepath - 图片的路径和图片名称 例如:"D:/a/图片.bmp"
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int AbstractTextCaptionBxArea_addImageFile(uint* imagefile, uint textarea, string filepath);
 
        //加入页面
        // page - 页面
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int AbstractTextCaptionBxArea_addPage(uint area, uint page);
 
        //增加文字内容
        // text - 文字内容
        // font - 字型
        // foreground - 文字颜色
        // background - 背景颜色
        // style - 图文区页面播放样式
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int AbstractTextCaptionBxArea_addText(uint* addedtext, uint textarea, string text, uint font, uint foreground, uint background, uint style);
 
        //增加文本
        // filepath - 纯文字文档
        // font - 字型
        // foreground - 文字颜色
        // background - 背景颜色
        // style - 图文区页面播放样式
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int AbstractTextCaptionBxArea_addTextFile(uint* addedtextfile, uint textarea, string filepath, uint font, uint foreground, uint background, uint style);
 
        // 清除所有页面
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int AbstractTextCaptionBxArea_clearPages(uint textarea);
 
        //创建区域
        // x - x坐标
        // y - y坐标
        // width - 区域宽度
        // heigth - 区域高度
        // screenprofile - 屏幕规格
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_BxArea(uint* area, int x, int y, int width, int heigth, uint screenprofile);
 
        //取得字型
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxArea_getFont(uint* font, uint area);
 
        //取得边框
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxArea_getFrame(uint* frame, uint area);
 
        //取得高度
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxArea_getHeigth(ushort* heigth, uint area);
 
        //取得屏幕规格
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxArea_getScreenProfile(uint* screenprofile, uint area);
 
        //取得屏幕宽度
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxArea_getWidth(ushort* width, uint area);
 
        //取得X坐标
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxArea_getX(ushort* X, uint area);
 
        //取得Y坐标
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxArea_getY(ushort* Y, uint area);
 
        //设定字型
        // font - 字型
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxArea_setFont(uint area, uint font);
 
        //
        //
        //
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxArea_validate(bool* validate, uint area, int p1, int p2, int p3);
 
        //创建时间区
        // x - x坐标
        // y - y坐标
        // width - 时间区宽度
        // heigth - 时间区高度
        // screenprofile - 屏幕规格
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_DateTimeBxArea(uint* datetimearea, int x, int y, int width, int heigth, uint profile);
 
        //创建时间区
        // x - x坐标
        // y - y坐标
        // screenprofile - 屏幕规格
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_DateTimeBxArea2(uint* datetimearea, int x, int y, uint profile);
 
        //创建天单元
        // x - x坐标
        // y - y坐标
        // profile - 屏幕规格
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_DayBxUnit(uint* dayunit, int x, int y, uint profile);
 
        //创建天单元
        // x - x坐标
        // y - y坐标
        // profile - 屏幕规格
        // mode - 显示内容类型
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_DayBxUnit2(uint* dayunit, int x, int y, uint profile, int mode);
 
        //取得显示类型
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int DayBxUnit_getMode(int* mode, uint dayunit);
 
        //设定显示类型
        // mode - 显示类型 0: 数字 1 - 30。 1: 农历初一 ~ 三十
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int DayBxUnit_setMode(uint dayunit, int mode);
 
        //创建月单元
        // x - x坐标
        // y - y坐标
        // profile - 屏幕规格
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_MonthBxUnit(uint* monthunit, int x, int y, uint profile);
 
        //创建月单元
        // x - x坐标
        // y - y坐标
        // profile - 屏幕规格
        // mode - 显示内容类型
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_MonthBxUnit2(uint* monthunit, int x, int y, uint profile, int mode);
 
        //取得显示类型
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int MonthBxUnit_getMode(int* mode, uint monthunit);
 
        //设定显示类型
        // mode - 显示类型 0: 数字。01 ~12。 1: 文字。一月 ~ 十二月。 2: 农历月。正月 ~ 腊月。
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int MonthBxUnit_setMode(uint monthunit, int mode);
 
        //创建年单元
        // x - x坐标
        // y - y坐标
        // profile - 屏幕规格
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_YearBxUnit(uint* yearunit, int x, int y, uint profile);
 
        //创建年单元
        // x - x坐标
        // y - y坐标
        // profile - 屏幕规格
        // mode - 显示内容类型
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_YearBxUnit2(uint* yearunit, int x, int y, uint profile, int mode);
 
        //取得显示类型
        [DllImport("onbon.apo.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int YearBxUnit_getMode(int* mode, uint yearunit);
 
        //设定显示类型
        // mode - 显示类型 0;四位西元年 1:两位西元年 2:天干地支 3:十二生肖
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int YearBxUnit_setMode(uint yearunit, int mode);
 
        //创建时单元
        // x - x坐标
        // y - y坐标
        // profile - 屏幕规格
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_HourBxUnit(uint* hourunit, int x, int y, uint profile);
 
        //创建时单元
        // x - x坐标
        // y - y坐标
        // profile - 屏幕规格
        // mode - 显示内容类型
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_HourBxUnit2(uint* hourunit, int x, int y, uint profile, int mode);
 
        //取得显示类型
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int HourBxUnit_getMode(int* mode, uint hourunit);
 
        //设定显示类型
        // mode - 显示类型 0 : 24 小时制。 1 : 12 小时制。 
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int HourBxUnit_setMode(uint hourunit, int mode);
 
        //创建分单元
        // x - x坐标
        // y - y坐标
        // profile - 屏幕规格
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_MinuteBxUnit(uint* minuteunit, int x, int y, uint profile);
 
        //创建秒单元
        // x - x坐标
        // y - y坐标
        // profile - 屏幕规格
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_SecondBxUnit(uint* secondunit, int x, int y, uint profile);
 
        //创建周单元
        // x - x坐标
        // y - y坐标
        // profile - 屏幕规格
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_WeekBxUnit(uint* weekunit, int x, int y, uint profile);
 
        //创建周单元
        // x - x坐标
        // y - y坐标
        // profile - 屏幕规格
        // abbreviate - 是否适用英文缩写
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_WeekBxUnit2(uint* weekunit, int x, int y, uint profile, bool abbreviate);
 
        //创建周单元
        // x - x坐标
        // y - y坐标
        // profile - 屏幕规格
        // lang - 显示语言
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_WeekBxUnit3(uint* weekunit, int x, int y, uint profile, int lang);
 
        //取得显示语言
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int WeekBxUnit_getLang(int* lang, uint weekunit);
 
        //设定显示语言
        // lang - 显示语言 0:中文上午下午 1: 英文AM/PM
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int WeekBxUnit_setLang(uint weekunit, int lang);
 
        //取得日期显示格式
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int DateTimeBxArea_getDateStyle(int* datestyle, uint datetimearea);
 
        //取得颜色
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int DateTimeBxArea_getForeground(uint* foreground, uint datetimearea);
 
        //取得时间显示格式
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int DateTimeBxArea_getTimeStyle(int* timestyle, uint datetimearea);
 
        //取得周显示格式
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int DateTimeBxArea_getWeekStyle(int* weekstyle, uint datetimearea);
 
        //是否多行显示
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int DateTimeBxArea_isMultiline(bool* ismultiline, uint datetimearea);
 
        //设定日期显示格式  NULL表示不显示日期
        // datestyle - 日期显示格式 NULL 表示不显示日期。 0 - 农历 1 - 日期格式:MM - DD 2 - 日期格式:MM / DD 3 - 日期格式:MM月DD日 4 - 日期格式:YYYY - MM - DD 5 - 日期格式:YYYY / MM / DD 6 - 日期格式:YYYY年MM月DD日 
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int DateTimeBxArea_setDateStyle(uint datetimearea, int datestyle);
 
        //设定字型
        // font - 字型
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int DateTimeBxArea_setFont(uint datetimearea, uint font);
 
        //设定颜色
        // foreground - 颜色
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int DateTimeBxArea_setForeground(uint datetimearea, uint foreground);
 
        //设定是否多行显示
        // multiline - 多行显示
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int DateTimeBxArea_setMultiline(uint datetimearea, bool multiline);
 
        //设置时间显示格式  NULL表示不显示时间
        // timestyle - 时间显示格式 NULL 表示不显示时间。 0 - 时间格式:AMPM HH:MM 1 - 时间格式:HH:MM 2 - 时间格式:HH时MM分 3 - 时间格式:HH:MM AMPM 4 - 时间格式:HH:MM:SS 5 - 时间格式:HH时MM分SS秒 
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int DateTimeBxArea_setTimeStyle(uint datetimearea, int timestyle);
 
        //设置想起显示格式  NULL表示不显示星期
        // weekstyle - 星期显示格式 NULL 表示不显示时间。 0: 星期格式:中文。 1: 星期格式:英文缩写。 2: 星期格式:英文。
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int DateTimeBxArea_setWeekStyle(uint datetimearea, int weekstyle);
 
        //
        //
        //
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int DateTimeBxArea_validate(bool* validate, uint area, int p1, int p2, int p3);
 
        //创建时钟区
        // x - x坐标
        // y - y坐标
        // widt - 宽度
        // heigth - 高度
        // screenprofile - 屏幕规格
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_ClockBxArea(uint* clockarea, int x, int y, int width, int heigth, uint screenprofile);
 
        //创建上午下午单元
        // x - x坐标
        // y - y坐标
        // screenprofile - 屏幕规格
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_AmPmBxUnit(uint* ampmunit, int x, int y, uint screenprofile);
 
        //创建上午下午单元
        // x - x 坐标
        // y - y坐标
        // screenprofile - 屏幕规格
        // lang - 显示语言 0 : 中文上下午。1 : 英文 AM/PM。 
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_AmPmBxUnit2(uint* ampmunit, int x, int y, uint screenprofiel, int lang);
 
        //取得显示语言
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int AmPmBxUnit_getLang(int* lang, uint unit);
 
        //设定显示语言
        // lang - 显示语言 0 : 中文上下午。1 : 英文 AM/PM
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int AmPmBxUnit_setLang(uint unit, int lang);
 
        //创建模拟时钟单元
        // x - x坐标
        // y - y坐标
        // screenprofile - 屏幕规格
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_AnalogClockBxUnit(uint* analogclockunit, int x, int y, uint screenprofile);
 
        //设定时钟的大小
        // size - 时钟的大小
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int AnalogClockBxUnit_setupSize(uint analogclockunit, ushort size);
 
        //取得开始年
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int AbstractTimeClockBxArea_getBattleStartYear(ushort* year, uint area);
 
        //取得开始月
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int AbstractTimeClockBxArea_getBattleStartMonth(byte* month, uint area);
 
        //取得开始日
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int AbstractTimeClockBxArea_getBattleStartDay(byte* day, uint area);
 
        //取得开始时
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int AbstractTimeClockBxArea_getBattleStartHour(byte* hour, uint area);
 
        //取得开始分
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int AbstractTimeClockBxArea_getBattleStartMinute(byte* minute, uint area);
 
        //取得开始秒
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int AbstractTimeClockBxArea_getBattleStartSecond(byte* second, uint area);
 
        //取得开始周
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int AbstractTimeClockBxArea_getBattleStartWeek(byte* week, uint area);
 
        //取得启动类型
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int AbstractTimeClockBxArea_getBattleStartupMode(byte* mode, uint area);
 
        //取得时间差
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int AbstractTimeClockBxArea_getTimeDifferent(ushort* timedifferent, uint area);
 
        //取得透明度
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int AbstractTimeClockBxArea_getTransparency(byte* transparency, uint area);
 
        //是否显示背景
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int AbstractTimeClockBxArea_isBackgroundFlag(bool* isbackground, uint area);
 
        //显示背景遮罩的部分
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int AbstractTimeClockBxArea_maskByBackground(uint area);
 
        //与背景重叠显示
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int AbstractTimeClockBxArea_overlayWithBackground(uint area);
 
        //设定是否显示背景背景
        // isbackgroundflag - 是否显示背景
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int AbstractTimeClockBxArea_setBackgroundFlag(uint area, bool isbackgroundflag);
 
        //设定开始年
        // year - 开始年
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int AbstractTimeClockBxArea_setBattleStartYear(uint area, ushort year);
 
        //设定开始月
        // month - 开始月
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int AbstractTimeClockBxArea_setBattleStartMonth(uint area, byte month);
 
        //设定开始日
        // day - 开始日
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int AbstractTimeClockBxArea_setBattleStartDay(uint area, byte day);
 
        //设定开始时
        // hour - 开始时
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int AbstractTimeClockBxArea_setBattleStartHour(uint area, byte hour);
 
        //设定开始分
        // minute - 开始分
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int AbstractTimeClockBxArea_setBattleStartMinute(uint area, byte minute);
 
        //设定开始秒
        // second - 开始秒
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int AbstractTimeClockBxArea_setBattleStartSecond(uint area, byte second);
 
        //设定开始周
        // week - 开始周
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int AbstractTimeClockBxArea_setBattleStartWeek(uint area, byte week);
 
        //设定启动类型
        // mode - 启动类型
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int AbstractTimeClockBxArea_setBattleStartupMode(uint area, byte mode);
 
        //设定时间差
        // timedifferent - 时间差
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int AbstractTimeClockBxArea_setTimeDifferent(uint area, ushort timedifferent);
 
        //设定透明度  当该值大于等于0小于等于100时,以该背景区域为基准
        // transparency - 透明度
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int AbstractTimeClockBxArea_setTransparency(uint area, byte transparency);
 
        //创建缺省时钟区
        // x - x坐标
        // y - y坐标
        // width - 宽度
        // heigth - 高度
        // screenprofile - 屏幕规格
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_DefaultTimeClockBxArea(uint* area, int x, int y, int width, int heigth, uint screenprofile);
 
        //添加时间单元
        // unit - 时间单元
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int DefaultTimeClockBxArea_addUnit(uint area, uint unit);
 
        //取得时间单元资讯
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int DefaultTimeClockBxArea_getUnit(uint* unit, uint area, uint p1);
 
        //取得时间单元资讯数量
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int DefaultTimeClockBxArea_getUnitSize(uint* unitszie, uint area);
 
        //创建计时区
        // x - x坐标
        // y - y 坐标
        // width - 计时区宽度
        // heigth - 计时区高度
        // p5 - 未知
        // screenprofile - 屏幕规格
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_TimerBxArea(uint* area, int x, int y, int width, int heigth, int p5, uint screenprofile);
 
        //创建计时单元
        // x - 相对于计时区X坐标的X坐标
        // y - 相对于计时区Y坐标的Y坐标
        // screenprofile - 屏幕规格
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_TimerBxUnit(uint* unit, int x, int y, uint screenprofile);
 
        //创建计时单元
        // x - 相对于计时区X坐标的X坐标
        // y - 相对于计时区Y坐标的Y坐标
        // profile - 屏幕规格
        // mode - 显示内容类型
        // counter - 计数值
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_TimerBxUnit2(uint* unit, int x, int y, uint profile, int mode, int counter);
 
        //创建计时区格式
        // hour - 时候显示小时
        // minute - 是否显示分钟
        // second - 是否显示秒
        // millisecond - 是否显示毫秒
        // phour - 是否显示[小时]文字
        // pminute - 是否显示[分钟]文字
        // psecond - 是否显示[秒]文字
        // pmillisecond - 是否显示[毫秒]文字
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_TimerBxUnitFormat(uint* format, bool hour, bool minute, bool second, bool millisecond, bool phour, bool pminute, bool psecond, bool pmillisecond);
 
        //获取组元
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TimerBxArea_getUnit(uint* unit, uint area);
 
        //获取计数值
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TimerBxUnit_getCounter(uint* counter, uint unit);
 
        //获取显示内容格式
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TimerBxUnit_getFormat(uint* format, uint unit);
 
        //取得秒表计算方式
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TimerBxUnit_getMode(int* mode, uint unit);
 
        //设定计数值
        // counter - 计数值  单位为毫秒
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TimerBxUnit_setCounter(uint unit, uint counter);
 
        //设定显示内容格式
        // format - 显示内容格式
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TimerBxUnit_setFormat(uint unit, uint format);
 
        //设定秒表计算方式
        // mode - 秒表计算方式 0:正计时累加 1:倒计时累加 2:正计时不累加 3:倒计时不累加
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TimerBxUnit_setMode(uint unit, int mode);
 
        //创建重整字单元
        // name - 重整单元名
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_CompositeBxUnit(uint* unit, string name);
 
        //重整计算各单元的坐标
        // container - 原区域大小
        // x - 此单元配置X坐标
        // y - 此单元配置Y坐标
        // center - 是否居中
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int CompositeBxUnit_arrange(uint arrange, uint unit, int x, int y, bool center);
 
        //取得字型
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int CompositeBxUnit_getFont(uint font);
 
        //取得前景色
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int CompositeBxUnit_getForeground(uint foreground);
 
        //取得相对于时间区域X坐标的X坐标
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int CompositeBxUnit_getX(uint x);
 
        //取得相对于时间区域Y坐标的Y坐标
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int CompositeBxUnit_getY(uint y);
 
        //偏移x坐标
        // x - x坐标
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int CompositeBxUnit_offsetX(uint unit, int x);
 
        //偏移Y坐标
        // y - Y坐标
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int CompositeBxUnit_offsetY(uint unit, int y);
 
        //设定字型
        // font - 字型
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int CompositeBxUnit_setFont(uint unit, uint font);
 
        //设定前景色
        // foreground - 前景色
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int CompositeBxUnit_setForeground(uint unit, uint forefround);
 
        //取得显示类型
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int CommonBxUnit_getUnitMode(byte* mode, uint unit);
 
        //设定显示类型
        // meod - 显示类型
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int CommonBxUnit_setUnitMode(uint unit, byte mode);
 
        //创建计时区
        // x - x坐标
        // y - y坐标
        // width - 计时区宽度
        // heigth - 计时区高度
        // desttime - 目标时间
        // screenprofiel - 屏幕规格
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_CounterBxArea(uint* area, int x, int y, int width, int heigth, uint srceenprofile);
 
        //创建计时单元
        // x - 相对于计时区X坐标的X坐标
        // y - 相对于计时区Y坐标的Y坐标
        // sceenprofile - 屏幕规格
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_CounterBxUnit(uint* unit, int x, int y, uint screenprofile);
 
        //创建计时单元
        // x - 相对于计时区X坐标的X坐标
        // y - 相对于计时区Y坐标的Y坐标
        // screenprofile - 屏幕规格
        // mode - 显示内容类型 0:正计时累加,1:倒计时累加,2:正计时不累加,3:倒计时不累加 
        // desttime - 目标时间
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_CounterBxUnit2(uint* unit, int x, int y, uint screenprofile, int mode, uint desttime);
 
        //创建计时单元格式
        // day - 是否显示天
        // hour - 是否显示时
        // minute - 是否显示分
        // second - 是否显示秒
        // pday - 是否显示[天]文字
        // phour - 是否显示[时]文字
        // pminute - 是否显示[分]文字
        // psecond - 是否显示[秒]文字
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_CounterBxUnitFormat(uint* unit, bool day, bool hour, bool minute, bool second, bool pday, bool phour, bool pminute, bool psecond);
 
        //取得元组
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int CounterBxArea_getUnit(uint* unit, uint area);
 
        //取得目标时间
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int CouterBxUnit_getDestTime(uint* desttime, uint unit);
 
        //取得显示内容格式
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int CounterBxUnit_getFormat(uint* format, uint unit);
 
        //取得计时器计算方式
        [DllImport("onbob.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int CounterBxUnit_getMode(uint* mode, uint unit);
 
        //设定慕白哦时间
        // desttime - 目标时间
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int CounterBxUnit_setDestTime(uint unit, uint desttime);
 
        //设定显示内容格式
        // format - 显示内容格式
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int CounterBxUnit_setFormat(uint unit, uint format);
 
        //设定计时器计算方式
        // mode - 计时器计算方式 0:正计时累加,1:倒计时累加,2:正计时不累加,3:倒计时不累加
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int CounterBxUnit_SetMode(uint unit, int mode);
 
        //创建温度区
        // x - X坐标
        // y - Y坐标
        // width - 温度去宽度
        // heigth - 温度区高度
        // screenprofile - 屏幕规格
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_TemperatureBxArea(uint* area, int x, int y, int width, int heigth, uint scrennprofile);
 
        //取得显示格式
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TemperatureBxArea_getDisplayUnitType(int* type, uint area);
 
        //设置显示格式
        // type - 显示格式 0-摄氏 1- 华氏
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TemperatureBxArea_setDisplayUnitType(uint area, int type);
 
        //创建湿度区
        // x - x坐标
        // y - y坐标
        // width - 宽度
        // heigth - 高度
        // screenprofile - 屏幕规格
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_HumidityBxArea(uint* area, int x, int y, int width, int heigth, uint screenprofile);
 
        //创建噪声区
        // x - X坐标
        // y - Y坐标
        // width - 区域宽度
        // heigth - 区域高度
        // screenprofile - 屏幕规格
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_NoiseBxArea(uint* area, int x, int y, int width, int heigth, uint screenprofile);
 
        //创建农历区
        // x - x坐标
        // y - y坐标
        // width - 宽度
        // heigth - 高度
        // screenprofile - 屏幕规格
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_FestivalBxArea(uint* area, int x, int y, int width, int heigth, uint screenprofile);
 
        //创建农历单元
        // x - x相对于农历区X坐标的X坐标
        // y - y相对于农历区Y坐标的Y坐标
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_FestivalBxUnit(uint* unit, int x, int y, uint screenprofile);
 
        //取得单元颜色
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int FestivalBxArea_getUnitColor(uint color);
 
        //设定单元颜色
        // unitcolor - 单元颜色
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int FestivalBxArea_setUnitColor(uint unit, uint unitcolor);
 
        //添加传感器区入口
        // alarmtype - 报警类型 0:低于临界值报警  1:高于临界值报警
        // value - 值
        // normal - 正常显示的颜色
        // alarm - 报警显示的颜色
        [DllImport("onbob.ap.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int SensorBxArea_addThreshold(uint area, int alarmtype, uint value, uint normalcolor, uint alarmcolor);
 
        //清除传感器入口
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int SensorBxArea_clearThresholds(uint area);
 
        //取得修正值
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int SensorBxArea_getCorrection(uint* correction, uint area);
 
        //取得修正极性
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int SensorBxArea_getCorrectionPolar(int* polar, uint area);
 
        //取得浮点数
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int SensorBxArea_getNumberFloat(byte* number, uint area);
 
        //取得整数
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int SensorBxArea_getNumberInt(byte* number, uint area);
 
        //取得传感器类型  0: 温度  1: 湿度  2:噪声  0xff:全能
        [DllImport("obnon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int SensorBxArea_getSensorMode(byte* mode, uint area);
 
        //取得传感器类型
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int SensorBxArea_getSensorType(byte* type, uint area);
 
        //取得传感器单元
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int SensorBxArea_getSensorUnit(byte* unit, uint area);
 
        //取得静态文字
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int SensorBxArea_getStaticText(uint* text, uint area);
 
        //取得透明度
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int SensorBxArea_getTransparency(uint area);
 
        //是否显示背景
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int SensorBxArea_isBackgroundFlag(bool* isbackground, uint area);
 
        //取得湿度是否显示小数位
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int SensorBxArea_isFractionPart(bool* isfractionpart, uint area);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int SensorBxArea_isSensorUnitFlag(bool* isunitflag, uint area);
 
        //显示背景遮罩的部分
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int SensorBxArea_maskByBackground(uint area);
 
        //与背景重叠显示
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int SensorBxArea_overlayWithBackground(uint area);
 
        //设定是否显示背景
        // isbackground - 是否显示背景
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int SensorBxArea_setBackgroundFlag(uint area, bool isbackground);
 
        //设定修正值
        // correction - 修正值
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int SensorBxArea_setCorrection(uint area, uint correction);
 
        //设定修正极性
        // correctionpolar - 修正极性
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int SensorBxArea_setCorrectionPolar(uint area, int correctionpolar);
 
        //设定湿度是否显示小数位
        // fractionalpart - 是否显示小数位
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int SensorBxArea_setFractionalPart(uint area, bool ispart);
 
        //设定浮点
        // float - 浮点
        [DllImport("onbon.ap.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int SensorBxArea_setNumberFloat(uint area, byte nunberfloat);
 
        //设定整型
        // numberint - 整型
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int SensorBxArea_setNumberInt(uint area, byte numberint);
 
        //设定传感器类型
        // type - 传感器类型 温度:0-DS18B20; 1-SHT11; 湿度:0-SHT11; 1-AM2301; 噪声:0-AWA5636-3; 1-HS5633T; 2-AZ8921 
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int SensorBxArea_setSensorType(uint area, byte type);
 
        //设定传感器单元
        // flag - 
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int SensorBxArea_setSensorUnitFlag(uint area, bool flag);
 
        //设定静态文字
        // text - 静态文字
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int SensorBxArea_setStaticText(uint area, string text);
 
        //设定透明度 当该值大于等0(不透明)小于等于100(全透明)时,以该背景区域为基准
        // transparency - 透明度
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int SensorBxArea_setTransparency(uint area, byte transparency);
 
        //创建二进制文本
        // width - 宽度
        // heigth - 高度
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_TextBinary(uint* binarytext, uint width, uint heigth);
 
        //取得背景色
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TextBinary_getBackground(uint textbinary);
 
        //取得字型
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TextBinary_getFont(uint textbinary);
 
        //取得前景色
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TextBinary_getForeground(uint textbinary);
 
        //取得高度
        // heigth - 高度
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TextBinary_getHeigth(int* heigth, uint textbinary);
 
        //取得宽度
        // width - 宽度
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TextBinary_getWidth(int* width, uint textbinary);
 
        //设定背景色
        // background - 背景色
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TextBinary_setBackground(uint textbinary, uint background);
 
        //设定字型
        // font - 字型
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TextBinary_setFont(uint binarytext, uint font);
 
        //设定前景色
        // foreground - 前景色
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TextBinary_setForeground(uint textbinary, uint foreground);
 
        //设定高度
        // heigth - 高度
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TextBinary_setHeigth(uint textbinary, int heigth);
 
        //设定款度
        // width - 宽度
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TextBinary_setWidth(uint textbinary, int width);
 
        //创建文本页
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_TextBxPage(uint* page);
 
        //创建文本页
        // text - 文字讯息
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_TextBxPage2(uint* page, string text);
 
        //创建文本页
        // text - 文字讯息
        // font - 字型
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_TextBxPage3(uint* page, string text, uint font);
 
        //创建文本页
        // text - 文字讯息
        // font - 字型
        // foreground - 文字颜色
        // backgroudn - 背景颜色
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_TextBxPage4(uint* page, string text, uint font, uint foreground, uint background);
 
        //创建文本页
        // text - 文字讯息
        // font - 字型
        // foreground - 文字颜色
        // baockground - 背景颜色
        // linebreak - 是否换行即换页
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_TextBxPage5(uint* page, string text, uint font, uint foreground, uint background, bool linebreak);
 
        //创建文本页
        // font - 字型
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_TextBxPage6(uint* page, uint font);
 
        //创建图片文件页
        // filepath - 图片文档
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_ImageFileBxPage(uint* page, string filepath);
 
        //创建纯文字档案
        // filepath - 纯文字档案
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_TextFileBxPage(uint* page, string filepath);
 
        //创建纯文字文档
        // filepath - 纯文字文档
        // font - 字型
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_TextFileBxPage2(uint* page, string filepath, uint font);
 
        //创建纯文字文档
        // filepath - 纯文字文档
        // font - 字型
        // foreground - 文字颜色
        // background - 背景颜色
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_TextFileBxPage3(uint* page, string filepath, uint font, uint foreground, uint background);
 
        //取得背景色
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TextBxPage_getBackground(uint page);
 
        //取得字型
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TextBxPage_getFont(uint page);
 
        //取得文字色
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TextBxpage_getForegroud(uint page);
 
        //取得首尾相连间隔
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TextBxPage_getHeadTailInterval(uint page);
 
        //取得水平对齐方式
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TextBxPage_getHorizontalAlignment(uint page);
 
        //取得文字讯息
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TextBxPage_getText(uint page);
 
        //取得垂直对齐方式
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TextBxPage_getVerticalAlignment(uint page);
 
        //取得是否换行即换页
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TextBxPage_isLineBreak(uint page);
 
        //新增一行文字
        // text - 文字
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TextBxPage_newLine(uint* page1, uint page, string text);
 
        //设定背景色
        // background - 背景色
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TextBxPage_setBackgroun(uint page, uint background);
 
        //设定字型
        // font - 字型
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TextBxPage_setFont(uint page, uint font);
 
        //设定文字色
        // foreground - 文字色
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TextBxPage_setForeground(uint page, uint foreground);
 
        //设定首尾相连间隔
        // headtaillnterval - 首尾相连间隔  >= 0:前后讯息间隔的像素   -2 :前后讯息被隔离
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TextBxPage_setHeadTaillnterval(uint page, int headtaillnterval);
 
        //设定水平对齐方式
        // horizontalalignment 0:居中 1:居左 2:居右
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TextBxPage_setHorizontalAlignment(uint page, int horizontalaligment);
 
        //设定是否换行即换页
        // linebreak - 换行即换页
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TextBxPage_setLineBreak(uint page, bool linebreak);
 
        //设定文字讯息
        // text - 文字讯息
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TextBxPage_setText(uint page, string text);
 
        //设定垂直对齐方式
        // verticalalignment - 垂直对齐方式 0:居中 1:居上 2:居下
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TextBxPage_setVerticalAlignment(uint page, int verticalalignment);
 
        //取得背景有效标记
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxPage_getValidFlag(byte* flag, uint page);
 
        //取得清屏方式
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxPage_getClearMode(byte* mode, uint page);
 
        //取得播放样式
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxPage_getDisplayStyle(uint* style, uint page);
 
        //取得边框速率
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxPage_getFrameRate(byte* rate, uint page);
 
        //取得重复次数
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxPage_getRepeatTime(byte* times, uint page);
 
        //取得声音标记
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxPage_getSoundFlag(byte* flag, uint page);
 
        //取得速度等级
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxPage_getSpeed(byte* speed, uint page);
 
        //取得停留时间
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxPage_getStayTime(ushort* staytime, uint page);
 
        //取得有效长度
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxPage_getValidLen(ushort* len, uint page);
 
        //设置背景有效标记
        // p1 - 
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxPage_setBgValidFlag(uint page, byte p1);
 
        //设定清屏方式
        // clearmode - 清屏方式
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxPage_setClearMode(uint page, byte clearmode);
 
        //设定播放样式
        // displaystyle - 播放样式 样式编号: 0:随机显示;1:静止显示;2:快速打出;3:向左移动;4:向左连移;5:向上移动; 6:向上连移;7:闪烁;8:飘雪;9:冒泡;10:中间移动; 11:左右移入;12:左右交叉移入;13:上下交叉移入;14:画卷闭合;15:画卷打开; 16:向左拉伸;17:向右拉伸;18:向上拉伸;19:向下拉伸;20:向左镭射; 21:向右镭射;22:向上镭射;23:向下镭射;24:左右交叉拉幕;25:上下交叉拉幕; 26:分散左拉;27:水平百叶;28:垂直百叶;29:向左拉幕;30:向右拉幕; 31:向上拉幕;32:向下拉幕;33:左右闭合;34:左右对开;35:上下闭合; 36:上下对开;37:向右移动;38:向右连移;39:向下移动;40:向下连移; 41:45度左旋;42:180度左旋;43:90度左旋;44:45度右旋;45:180度右旋; 46:90度右旋;47:菱形打开;48:菱形闭合 
        //若样式是向左连移或向上连移,stayTime 會设定為零。可在设定播放样式後再重新设定停留时间。
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxPage_setDisplayStyle(uint page, uint displaystyle);
 
        //设定边框速率
        // rate - 边框速率
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxPage_setFrameRate(uint page, byte rate);
 
        //设定重复次数
        // repeattimes - 重复次数
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxPage_setRepeatTime(uint page, byte times);
 
        //设定声音标记
        // p1
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxPage_setSoundFlag(uint page, byte p1);
 
        //设定速度等级
        // speed - 运行速度 0最快-63最慢
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxPage_setSpeed(uint page, uint speed);
 
        //设定停留时间
        // time - 停留时间 单位毫秒
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxPage_setStayTime(uint page, ushort time);
 
        //设定有效长度
        // len - 有效长度
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxPage_setValidLen(uint page, ushort len);
 
        //增加图片
        // image - 图片
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ImageBxPage_addImage(uint page, uint image);
 
        //清除所有图片
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ImageBxPage_clearImages(uint page);
 
        //取得图片文件
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ImageFileBxPage_getFilePath(uint page);
 
        //取得换行处理方式
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TextFileBxPage_getBreakType(uint page);
 
        //取得文字文档编码
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TextFileBxPage_getEncoding(uint page);
 
        //取得纯文字文档
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TextFileBxPage_getFilePath(uint page);
 
        //设定换行处理方式
        // breaktype - 换行处理方式 0:追加 1:换行 2:换页
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TextFileBxPage_setBreakType(uint page, int breaktype);
 
        //设定文字档案编码
        // encoding - 文字档案编码
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TextFileBxPage_setEncoding(uint page, string encoding);
 
        //设定纯文字档案
        // filepath - 纯文字档案
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int TextFileBxPage_setFilePath(uint page, string filepath);
 
        //创建标识文件
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_LogoBxFile(uint* file);
 
        //增加区域
        // area - 区域
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int LogoBxFile_addArea(uint logofile, uint area);
 
        //取得区域数量
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int LogoBxFile_getAreaCount(int* count, uint logofile);
 
        //取得文件名称
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int LogoBxFile_getFileName(uint logofile);
 
        //取得文件时间范围
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int LogoBxFile_getTimeSpan(int* span, uint logofile);
 
        //设置文件时间范围
        // span - 文件时间范围
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int LogoBxFile_setTimeSpan(uint logofile, int span);
 
        //取得单元显示内容字型
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxUnit_getFont(uint unit);
 
        //取得单元颜色
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxUnit_getUnitColor(uint* color, uint unit);
 
        //取得相对于时间区X坐标的X坐标
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxUnit_getUnitX(ushort* x, uint unit);
 
        //取得相对于时间区Y坐标的Y坐标
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxUnit_getUnitY(ushort* y, uint unit);
 
        //设定单元显示内容字型
        // font - 字型
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxUnit_setFont(uint unit, uint font);
 
        //设定对齐方式
        // align - 对齐方式 0:左对齐,1:居中,2:右对齐 
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxUnit_setUnitAlign(uint unit, byte align);
 
        //设定单位颜色
        // color - 单位颜色
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxUnit_setUnitColor(uint unit, uint color);
 
        //设定相对于时间区域X坐标的X坐标
        // x - x坐标
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxUnit_setUnitX(uint unit, ushort x);
 
        //设定相对于时间区域Y坐标的Y坐标
        // y - y坐标
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxUnit_setUnitY(uint unit, ushort y);
 
        //创建文本单元
        // x - 相对于时间区域X坐标的X坐标
        // y - 相对于时间区域Y坐标的Y坐标
        // screenprofile - 屏幕规格
        // text - 文字内容
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_StringBxUnit(uint* unit, int x, int y, uint screenprofile, string text);
 
        //取得文字内容
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int StringBxUnit_getText(uint unit);
 
        //创建动态区
        // x - x坐标
        // y - y坐标
        // width - 区域宽度
        // heigth - 区域高度
        // profile - 屏幕规格
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_DynamicBxArea(uint* area, int x, int y, int width, int heigth, uint profile);
 
        //创建动态区规则
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_DynamicBxAreaRule(uint* arearule);
 
        //新增动态区关联的异步节目。一旦关联了某个异步节目,则当改异步节目播放时允许播放该动态区
        // programid - 关联的节目编号 0 -999
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int DynamicBxAreaRule_addRelativeProgram(uint arearule, uint program);
 
        //取得动态区编号
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int DynamicBxAreaRule_getId(int* id, uint arearule);
 
        //取得是否立即播放
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int DynamicBxAreaRule_getImmediatePlay(byte* immediate, uint arearule);
 
        //取得运行模式
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int DynamicBxAreaRule_getRunMode(uint arearule);
 
        //取得动态区数据超时时间,单位为秒
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int DynamicBxAreaRule_getTimeout(uint arearule);
 
        //取得是否关联全部节目
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int DynamicBxAreaRule_isRelativeAllPrograms(uint arearule);
 
        //设定动态区编号
        // id - 动态区编号
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int DynamicBxAreaRule_setId(uint arearule, int id);
 
        //设定是否立即播放
        // immediateplay - 是否立即播放
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int DynamicBxAreaRule_setImmediatePlay(uint arearule, byte immediateplay);
 
        //设定是否关联全部节目
        // relativeallprograms - 是否关联全部节目
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int DynamicBxAreaRule_setRelativeAllPrograms(uint arearule, bool relativeallprograms);
 
        //设定动态区运行模式
        // runmode - 运行模式  0:循环显示。 1:显示完成后静止显示最后一页数据。 2:循环显示,超过设定时间后数据仍未更新时不再显示。 3:循环显示,超过设定时间后数据仍未更新时显示 Logo信息。 4:循环显示,显示完最后一页后就不再显示。
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int DynamicBxAreaRule_setRunMode(uint arearule, byte runmode);
 
        //设定动态区数据超时时间,单位为秒
        // timeout - 动态区数据超时时间
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int DynamicBxAreaRule_setTimeout(uint arearule, int timeout);
 
        //创建背景区
        // x - x坐标
        // y - y坐标
        // width - 区域宽度
        // heigth - 区域高度
        // profile - 屏幕规格
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_BackgroundBxArea(uint* area, int x, int y, int width, int heigth, uint profile);
 
        //创建梯度背景区
        // x - x坐标
        // y - y坐标
        // width - 区域宽度
        // heigth - 区域高度
        // profiel - 屏幕规格
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_GradientBackgroundBxArea(uint* area, int x, int y, int width, int heigth, uint profiel);
 
        //和控制器通讯的相关接口
        //同步方式将节目写入控制器
        // program - 节目
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_writeProgram(uint screen, uint program);
 
        //同步方式将节目写入控制器,本方法不做任何检查
        // program - 节目
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_writeProgramQuickly(uint screen, uint program);
 
        //同步方式将节目写入控制器
        // programarrary - 节目组数组
        // programcount - 节目组数量
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_writePrograms(uint screen, uint* programarray, uint programcount);
 
        //更新动态区
        //返回执行结果
        // rule - 动态区播放方式
        // area - 动态区
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_writeDynamic(uint* result, uint screen, uint rule, uint area);
 
        //更新控制器位址,此位址用于标识控制器,不等同于TCP位址(xxx.xxx.xxx.xxx)
        // p1 - 控制器位址,2bytes。
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_writeControllerAddress(uint* result, uint screen, ushort p1);
 
        //同步方式将屏幕参数写入控制器
        // ccf - 屏幕参数
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_writeConfig(uint screen, uint ccf);
 
        //解除锁定节目
        //返回执行结果
        // programname - 节目名称
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_unlockProgram2(uint* result, uint screen, string programname);
 
        //解除节目锁定
        //返回执行结果
        // programid - 节目id 0-999
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_unlockProgram(uint* result, uint screen, int programid);
 
        //解除屏幕锁定
        //返回执行结果
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_unlock(uint* result, uint screen);
 
        //强制开启屏幕
        //返回执行结果
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_turnOn(uint* result, uint screen);
 
        //强制关闭节目
        //返回执行结果
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_turnOff(uint* result, uint screen);
 
        //校正系统时钟
        //返回执行结果
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_syncTime(uint* result, uint screen);
 
        //切换至服务器模式,执行成功后,会将当前连线切断
        //返回执行结果
        // staticsetting - 网络位址设置
        // serversetting - 服务器应用程式设置
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_switch2ServerMode(uint* result, uint screen, uint staticsetting, uint serversetting);
 
        //切换至一般网络模式,执行成功后,会将当前连线切断
        //返回执行结果
        // staticsetting - 网路位址设置
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_switch2ClientMode(uint* result, uint screen, uint staticsetting);
 
        //设定定时开关机
        //返货执行结果
        // cmd - 定时开关机,利用createTimingOnOff方法产生并设定定时开关机区间
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_setupTimingOnOff(uint* result, uint screen, uint cmd);
 
        //设定屏幕名称
        // aliasname - 屏幕名称
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_setAliasName(uint screen, string aliasname);
 
        //修改传感器根据客制化传感器调整亮度
        //返回执行结果
        // env - 客制化传感器亮度条件
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_sensorBrightness2(uint* result, uint screen, uint env);
 
        //修改传感器自动调整亮度
        //返回执行结果
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_sensorBrightness(uint* result, uint screen);
 
        //系统复位,复位后需要重新加载屏幕参数
        //返回执行结果
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_reset2Factory(uint* result, uint screen);
 
        //查询目前控制器上的节目清单
        //返回节目清单
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_readProgramList(uint* programlist, uint screen);
 
        //同步方式读取控制上的档案并保存在本地
        //返回节目
        // programname - 节目名称
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_readProgram2(uint* progam, uint screen, string programname);
 
        //同步方式读取控制上的档案并保存在本地
        //返回节目
        // programid - 节目编号 0-999
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_readProgram(uint* program, uint screen, int programid);
 
        //读取控制器编号
        //返回执行结果
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_readControllerId(uint* result, uint screen);
 
        //同步方式读取控制器上的屏幕参数
        //返回屏幕参数
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_readConfig(uint* ccf, uint screen);
 
        //PING控制器
        //返回执行结果
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_ping(uint* result, uint screen);
 
        //修改亮度。亮度值 0x00-0x0f
        //返回执行结果
        // level - 亮度
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_manualBrightness(uint* result, uint screen, byte level);
 
        //锁定节目
        //返回执行结果
        // programname - 节目名称
        // lockduration - 锁定秒数
        // nonvolatile - 掉电保存方式。0x00:掉电不保存 0X01:掉电保存
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_lockProgram4(uint* result, uint screen, string programname, int lockduration, byte nonvolatile);
 
        //锁定节目
        //返回执行结果
        // programname - 节目名称
        // lockduration - 锁定秒数
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_lockProgram3(uint* result, uint screen, string programname, int lockduration);
 
        //锁定节目
        //返回执行结果
        // progamid - 节目id 0-999
        // lockduration - 锁定秒数
        // nonvolatile - 掉电保存方式。0x00:掉电不保存 0x01:掉电保存
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_lockProgram2(uint* result, uint screen, int programid, int lockduration, byte nonvolatile);
 
        //锁定节目
        //返回执行结果
        // programid - 节目编号 0-999
        // lockduration - 锁定秒数
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_lockProgram(uint* result, uint screen, int programid, int lockduration);
 
        //锁定屏幕
        //返回执行结果
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_lock(uint* result, uint screen);
 
        //是否已经连线
        //返回连线与否
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_isConnected(bool* isconnected, uint screen);
 
        //取得运行模式 
        //返回运行模式 0: CLIENT 1: SERVER, 2: RS232, 
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_getRunMode(int* mode, uint screen);
 
        //取得net编号,ONBON内部唯一识别码
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_getNetId(uint* netid, uint screen);
 
        //取得控制器类型
        //返回控制器类型
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_getControllerType(uint scrren);
 
        //取得控制器位址
        //返回控制器位址
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_getControllerAddress(ushort* address, uint screen);
 
        //取得控制器
        //返回控制器
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_getController(uint* controller, uint screen);
 
        //取得屏幕名称
        //返回屏幕名称
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_getAlisaName(uint screen);
 
        //discover控制器
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_discover(uint* result, uint screen);
 
        //删除控制器上的特定节目组
        //返回执行结果
        // programs - 控制器上的特定节目组
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_deletePrograms2(uint* result, uint screen, string programs);
 
        //删除控制器上的所有节目
        //返回执行结果
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_deletePrograms(uint* result, uint screen);
 
        //删除控制器上的特定节目
        //返回执行结果
        // program - 控制器上的特定节目
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_deleteProgram2(uint* result, uint screen, string program);
 
        //删除控制器上的特定节目
        //返回执行结果
        // programid - 节目编号
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_deleteProgram(uint* result, uint screen, int programid);
 
        //删除动态区
        //返回执行结果
        // p1
        // p2 
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_deleteDynamic(uint* result, uint screen, byte* p1, uint p2);
 
        //删除所有动态区
        //返回执行结果
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_deleteAllDynamic(uint* result, uint screen);
 
        //建立定时开关机。设定定时开关机区间后执行setupTimingOnOff将结果传送至控制器
        //返回定时开关机
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_createTimingOnOff(uint* onoff, uint screen);
 
        //修改根据时间调整亮度
        //返回执行结果
        // p1
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_clockBrightness(uint* result, uint screen, uint p1);
 
        //查询文件系统容量
        //返回执行结果
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_checkMemVolumes(uint* result, uint screen);
 
        //查询当前固件状态
        //返回执行结果
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_checkFirmware(uint* result, uint screen);
 
        //查询控制器状态
        //返回执行结果
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_checkControllerStatus(uint* result, uint screen);
 
        //改变输出缓存大小。有效范围512Bytes-65KB。注意:改变缓存大小前请确认控制卡可接受上限,超过会造成控制卡运作失败。
        // buffersize - 缓存大小
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_changeOutputBuffer(uint screen, int buffersize);
 
        //取消定时开关机
        //返回执行结果
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_cancelTimingOnOff(uint* result, uint screen);
 
        //是否逾时
        //返回 true:若命令回应逾时
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxResponseCmd_isTimeout(uint cmd);
 
        //判断命令是否被正确执行
        //返回 true:命令被正确执行并回应对应结果。false:回应为NACK或逾时
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxResponseCmd_isOK(uint cmd);
 
        //回应是否为NACK
        //返回true:若回应为NACK
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxResponseCmd_isNACK(uint cmd);
 
        //取得错误码
        //返回错误码
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxResponseCmd_getErrorType(uint cmd);
 
 
 
        //和控制器断开连接
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreen_disconnect(uint screen);
 
        //输出接口
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int FObject_dump(uint dump);
 
        //输出接口
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int FObject_dump(int dump);
 
        //输出接口
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int FObject_dump(bool dump);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int FObject_release(uint release);
 
        //颜色接口
        // reb - 红
        // green - 绿
        // blue - 蓝
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_FColor(uint* foreground, byte red, byte green, byte blue);
 
        //创建字体
        // fontname - 字体名称,比如“宋体”
        // fontsize - 字体高度,像素点
        // italic - 是否斜体
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_FFont(uint* font, string fongname, uint fontsize, bool italic);
 
        //创建显示特技
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_DisplayStyleFactory(uint* style);
 
        //其他接口
        //设定亮度条件
        // indexvalue - 半小时索引 0-47 (00:00 - 00:29)-(23:30-23:59)
        // brightness -  亮度 1-16
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxBrightnessClockEnv_setup(uint h, byte indexvalue, byte brightness);
 
        //设定亮度条件
        // brightnesslevel - 亮度等级 0-15
        // environment - 环境亮度值 0-65536
        // brightness - 亮度 1-16
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxBrightnessSensorEnv_setup(uint h, byte brightnesslevel, ushort environment, byte brightness);
 
        //得到当前传感器的亮度值
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ReturnBrightnessValue_Data(uint* data, uint brigthness);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ReturnControllerStatus_Brightness(byte* brightness, uint controller);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ReturnControllerStatus_BrightnessAdjMode(byte* mode, uint controller);
 
        //建立该控制器档案阅读程式
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxController_createFileReader(uint controller);
 
        //建立该控制器档案写入程式
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxController_createFileWriter(uint controller);
 
        //中断连线
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxController_disconnect(uint controller);
 
        //执行命令
        // cmd - 命令
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxController_execute(uint* result, uint controller, uint cmd);
 
        //获取BX信息
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxController_getBx(uint* bx, uint controller);
 
        //取得控制器位址
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxController_getControllerAddress(uint controller);
 
        //取得名称
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxController_getName(uint controller);
 
        //取得输出缓存大小
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxController_getOutputBuffer(uint controller);
 
        //取得运行模式
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxController_getRunMode(uint controller);
 
        //取得屏幕规格
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxController_getScreenProfile(uint* profile, uint controller);
 
        //取得控制器系列咨询
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxController_getSeries(uint controller);
 
        //取得是否连线
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxController_isConnected(uint controller);
 
        //设定控制器位址,此位址用于标识控制器,不等同于TCP位址(xxx.xxx.xxx.xxx)
        // addr - 控制器位址,2bytes
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxController_setControllerAddress(uint controller, ushort addr);
 
        //启动
        // p1 - 位址
        // p2 - 端口号
        // p3 - 是否为TCP
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxControllerClient_connect(bool* err, uint controller, string p1, int p2, bool p3);
 
        //取得名称
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxControllerClient_getName(uint controller);
 
        //取得运行模式
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxControllerClient_getRunMode(uint controller);
 
        //连线
        // comname - com名称
        // baudrate - 波特率
        // databits - 停止位元
        // parity - 同位检查
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxControllerRS_connect(uint controller, string comname, uint baudrate, byte databits, byte parity);
 
        //初始化
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxEnv_initial(uint env);
 
        //初始化
        // log4jfile - log4j配置档案
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxEnv_initial2(uint env, string log4jfile);
 
        //初始化
        // log4jfile - log4j配置档案
        // timeout - 通讯超时时间
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxEnv_initial3(uint env, string log4file, int timeout);
 
        //取得文件名称
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxFile_getFileName(uint file);
 
        //取得文件类型
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxFile_getFileType(uint file);
 
        //读取控制器上目前特定类型的文件清单
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxFileReader_browse(uint* browse, uint file);
 
        //读取控制器上目前特定类型的文件清单
        // filetype - NULL表示全部的文件重类
        // dirsize - 一次最多读取多少个文件目录
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxFileReader_browse2(uint* browse, uint file, uint filetype, byte dirsize);
 
        //同步读取控制器上的节目
        // programid - 节目编号 0-999
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxFileReader_readProgram(uint* program, uint file, int programid);
 
        //读取控制器上的节目并存档
        // programid - 节目编号 0-999
        // savepath - 本地存储完整的档案名称
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxFileReader_readProgram2(uint file, int programid, string savepath);
 
        //同步读取控制器上的节目
        // programfile - 节目名称
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxFileReader_readProgram3(uint* program, uint file, string programfile);
 
        //读取控制器上的节目并存档
        // programfile - 节目名称
        // savefile - 本地存储完整的档案名称
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxFileReader_readProgram4(uint file, string programfile, string savepath);
 
        //非同步读取空时期上的节目
        // programid - 节目编号 0-999
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxFileReader_readProgramAsync(uint file, int programid);
 
        //非同步读取控制器上的节目并存档
        // programid - 节目编号 0-999
        // savepath - 本地存储完整的档案名称
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxFileReader_readProgramAsync2(uint file, int programid, string savepath);
 
        //非同步读取控制器上的节目
        // programfile - 节目名称
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxFileReader_readProgramAsync3(uint file, string programfile);
 
        //非同步读取控制器上的节目并存档
        // programfile - 节目名称
        // savepath - 本地存储完整的档案名称
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxFileReader_readProgramAsync4(uint file, string programfile, string savepath);
 
        //同步读取控制器上的节目
        // programfile - 节目名称
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxFileReader_readProgramData(uint* program, uint file, string programfile);
 
        //同步将屏参写入控制器
        // ccf - 屏幕参数
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxFileWrite_writeConfig(uint file, uint ccf);
 
        //主循环回调
        // p1 - 回调函数
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxServerListener_setLoopCallback(uint h, ONBON_CALLBACK p1);
 
        //断线回调
        // p1 - 回调函数
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxServerListener_setDisconnectedCallback(uint h, ONBON_CALLBACK p1);
 
        //连线回调
        // p1 - 回调函数
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxServerListener_setConnectedCallback(uint h, ONBON_CALLBACK p1);
 
        //停止服务
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxServer_stop(uint server);
 
        //开启服务
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxServer_start(uint server);
 
        //移除监听器
        // listener - 监听器
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxServer_removeListener(uint server, uint listener);
 
        //服务器主循环
        // p1 
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxServer_loop(uint server, bool p1);
 
        //取得上线的屏幕控制程式
        // socketid - socket编号(识别编号)
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxServer_getOnlineScreenBySocketId(uint* id, uint server, string socketid);
 
        //根据net编号或是GPRS的DTU编号取得先上的屏幕控制程式
        // netid - 控制器net编号或是GPRS的DTU编号
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxServer_getOnlineScreenByNetId(uint* id, uint server, string netid);
 
        //清除所有监听器
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxServer_clearListeners(uint server);
 
        //增加监听器
        // listener - 监听器
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxServer_addListener(uint server, uint listener);
 
        //检查是否可进行工作
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreenServer_isReady(bool* isready, uint server);
 
        //取得TCP通讯端口
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreenServer_getPort(ushort* port, uint server);
 
        //取得识别编号,等于socket编号
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreenServer_getId(int* id, uint server);
 
        //取得TCP位址
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreenServer_getAddress(uint server);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreenServer_accept(uint server);
 
        //设定双击设点阵类型
        // matrixtype - 双击色点阵类型
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreenProfile_setMatrixType(uint screen, int matrixtype);
 
        //取得是否为全彩
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreenProfile_isFullColor(uint screen);
 
        //取得屏幕宽度
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreenProfile_getWidth(uint screen);
 
        //取得双基色点阵类型
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreenProfile_getMatrixType(uint screen);
 
        //取得屏幕高度
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreenProfile_getHeigth(uint screen);
 
        //取得基色类型
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreenProfile_getColorType(uint screen);
 
        //取得转换成色码
        // color - 颜色
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreenProfile_encodeColor(uint screen, uint color);
 
        //取得转换成颜色
        // color - 色码
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreenProfile_decodeColor(uint screen, uint color);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BxScreenProfile_createMessageConst(uint screen);
 
        //创建亮度
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_BxBrightnessClockEnv(uint* brightness);
 
        //创建亮度传感器
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_BxBrightnessSensorEnv(uint* brightnesssensor);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_BxEnv(uint* bxenv);
 
        //创建page页
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_BxPage(uint* page);
 
        //创建定时开关机命令
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_CancelScreenTimingOnOffCmd(uint* cmd);
 
        //创建检查控制器状态命令
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_CheckControllerStatusCmd(uint* cmd);
 
        //创建检查当前固件命令
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_CheckCurrentFirmwareCmd(uint* cmd);
 
        //创建检查FPGA状态命令
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_CheckFPGAStatusCmd(uint* cmd);
 
        //创建删除动态区命令
        // isall 是否全部删除
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_DeleteDynamicAreaCmd(uint* cmd, bool isall);
 
        //创建删除动态区命令
        // index - 动态区编号
        // size - 动态区大小
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_DeleteDynamicAreaCmd2(uint* cmd, byte* index, uint size);
 
        //创建删除密码命令
        // secret - 旧密码
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_DeleteSecretCmd(uint* cmd, byte* secret);
 
        //创建文件删除命令
        // ofs - 是否为节目类型档案
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_FileDeleteCmd(uint* cmd, bool ofs);
 
        //创建获取亮度值命令
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_GetBrightnessValueCmd(uint* cmd);
 
        //创建获取音量值命令
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_GetMemVolumeCmd(uint* cmd);
 
        //创建
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_GetTransStatusCmd(uint* cmd);
 
        //设定使用传感器自动检测亮度
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_ModifyBrightnessCmd(uint* cmd);
 
        //设定手动亮度
        // brightness - 亮度 0X00-0X0F
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_ModifyBrightnessCmd2(uint* cmd, byte brightness);
 
        //设定定时亮度
        // p1 - 亮度条件
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_ModifyBrightnessCmd3(uint* cmd, uint p1);
 
        //定制化传感器亮度。
        // env - 亮度条件
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_ModifyBrightnessCmd4(uint* cmd, uint env);
 
        //创建快速设置地址命令
        // screenno - 屏号
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_QuicklySetAddrCmd(uint* cmd, ushort screenno);
 
        //创建快速设置名称命令
        // name - 名称
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_QuicklySetNameCmd(uint* cmd, string name);
 
        //创建读取控制器ID命令
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_ReadControllerIDCmd(uint* cmd);
 
        //创建读取版权信息命令
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_ReadCopyrightInfoCmd(uint* cmd);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_ReadDirBlockCmd(uint* cmd, ushort p1);
 
        //
        // p1
        // p2
        // p3
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_ReadFileBlockCmd(uint* cmd, bool p1, string p2, uint p3);
 
        //创建锁屏命令
        // p1 - 是否断电保存
        // p2 - 是否锁定
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_ScreenLockCmd(uint* cmd, bool p1, bool p2);
 
        //创建定时开关屏命令
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_ScreenTimingOnOffCmd(uint* cmd);
 
        //创建设置条码命令
        // barcode - 条码
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_SetBarCodeCmd(uint* cmd, byte* barcode);
 
        //创建设置密码命令
        // p1 - 6字节旧密码
        // p2 - 6字节新密码
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_SetSecretCmd(uint* cmd, byte* p1, byte* p2);
 
        //创建设置地址命令
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_SetupAddressCmd(uint* cmd);
 
        //创建设置MAC地址命令
        // p1 - 
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_SetupMACCmd(uint* cmd, byte* p1);
 
        //创建开始读取目录命令
        // filetype - 文件类型
        // dirsize - 文件目录块大小
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_StartReadDirCmd(uint* cmd, byte filetype, byte dirsize);
 
        //创建开始读取文件命令
        // ofs - 是否为节目类型档案 
        // p2 - 
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_StartReadFileCmd(uint* cmd, bool ofs, string p2);
 
        //
        // p1 - 是否开启
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_SwitchOnOffScreenCmd(uint* cmd, bool p1);
 
        //创建系统锁定命令
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_SystemClockCorrectCmd(uint* cmd);
 
        //创建系统重置命令
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_SystemResetCmd(uint* cmd);
 
        //创建更新动态区命令
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_UpdateDynamicAreaCmd(uint* cmd);
 
        //创建控制卡配置文件
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_ControllerConfigBxFile(uint* file);
 
        //取得指定样式
        // styleid - 样式编号: 0:随机显示;1:静止显示;2:快速打出;3:向左移动;4:向左连移;5:向上移动; 6:向上连移;7:闪烁;8:飘雪;9:冒泡;10:中间移动; 11:左右移入;12:左右交叉移入;13:上下交叉移入;14:画卷闭合;15:画卷打开; 16:向左拉伸;17:向右拉伸;18:向上拉伸;19:向下拉伸;20:向左镭射; 21:向右镭射;22:向上镭射;23:向下镭射;24:左右交叉拉幕;25:上下交叉拉幕; 26:分散左拉;27:水平百叶;28:垂直百叶;29:向左拉幕;30:向右拉幕; 31:向上拉幕;32:向下拉幕;33:左右闭合;34:左右对开;35:上下闭合; 36:上下对开;37:向右移动;38:向右连移;39:向下移动;40:向下连移; 41:45度左旋;42:180度左旋;43:90度左旋;44:45度右旋;45:180度右旋; 46:90度右旋;47:菱形打开;48:菱形闭合 
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int DisplayStyleFactory_getStyle(uint* style, uint displaystyle, int styleid);
 
        //创建文件格式
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_FileType(uint* filetype);
 
        //取得边框移动步长,单位为pixel,范围 1-16
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int FFrame_getFrameMoveStep(uint* movestep, uint frame);
 
        //取得边框显示速度 速度 1-48
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int FFrame_getFrameSpeed(byte* speed, uint frame);
 
        //取得边框显示效果 0:闪烁。 1:顺时针转动。 2:逆时钟转动。 3:闪烁并顺时钟转动。 4:闪烁并逆时钟转动。 5:红绿交替闪烁。 6:红绿交替转动。 7:静止打出。
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int FFrame_getFrameStyle(byte* style, uint frame);
 
        //取得边框宽度
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int FFrame_getFrameWdith(byte* width, uint frame);
 
        //取得是否显示边框
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int FFrame_isFrameShow(bool* isshow, uint frame);
 
        //载入内建边框特效底图
        // styleindex - 内建效果编号,双基色1-18  单基色 1-14
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int FFrame_loadFrameImage(byte* image, uint frame, int styleindex);
 
        //设置边框移动步长。单位pixel,范围1-16
        // movestep - 边框移动步长
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int FFrame_setFrameMoveStep(uint frame, byte movestep);
 
        //设定是否显示边框
        // isshow - 是否显示边框
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int FFrame_setFrameShow(uint frame, bool isshow);
 
        //设定边框显示速度
        // speed - 边框显示速度 1-48
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int FFrame_setFrameSpeed(uint frame, byte speed);
 
        //设置边框显示效果
        // framestyle - 边框显示效果 0:闪烁。 1:顺时针转动。 2:逆时钟转动。 3:闪烁并顺时钟转动。 4:闪烁并逆时钟转动。 5:红绿交替闪烁。 6:红绿交替转动。 7:静止打出。 
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int FFrame_setFrameStyle(uint frame, byte framestyle);
 
        //添加需要删除的文件名
        // filename - 文件名
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int FileDeleteCmd_addFileNames(uint cmd, string filename);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_ServerSetting(uint* setting);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_StaticSetting(uint* staticsetting);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int FColor_A(uint h);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int FColor_B(uint h);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int FColor_G(uint h);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int FColor_R(uint h);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int FDate_GetYear(uint h);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int FDate_GetMonth(uint h);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int FDate_GetDay(uint h);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int FDate_GetHour(uint h);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int FDate_GetMinute(uint h);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int FDate_GetSecond(uint h);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int FDate_SetYear(uint h, byte year);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int FDate_SetMonth(uint h, byte month);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int FDate_SetDay(uint h, byte day);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int FDate_SetHour(uint h, byte hour);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int FDate_SetMinuet(uint h, byte minute);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int FDate_SetSecond(uint h, byte second);
 
        //
        // p1
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Fstrarr_add(uint h, string p1);
 
        //
        // p1
        // p2 
        // p3
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Fstrarr_get(uint h, uint p1, byte* p2, int p3);
 
        //获取字符串
        // p1
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int FString_GetBuff(uint h, byte* p1);
 
        //获取字符串长度
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int FString_Size(uint* result, uint h);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Response_getError(uint h);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Response_isACK(uint h);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Response_isNACK(uint h);
 
        //得到控制器ID值
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ReturnControllerID_Data(uint* data, uint controller);
 
        //得到控制器barcode
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ReturnControllerStatus_BarCode(uint* barcode, uint controller);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ReturnControllerStatus_curProgram(uint* program, uint controller);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ReturnControllerStatus_CustomID(uint* id, uint controller);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ReturnControllerStatus_Humidity(byte* humidity, uint controller);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ReturnControllerStatus_Noise(ushort* noise, uint controller);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ReturnControllerStatus_OnOffStatus(byte* status, uint controller);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ReturnControllerStatus_ProgramLockStatus(byte* status, uint controller);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ReturnControllerStatus_ProgramNumber(ushort* number, uint controller);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ReturnControllerStatus_RtcDate(byte* rtcdate, uint controller);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ReturnControllerStatus_RtcHour(byte* hour, uint controller);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ReturnControllerStatus_RtcMinute(byte* minute, uint controller);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ReturnControllerStatus_RtcMonth(byte* momth, uint controller);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ReturnControllerStatus_RtcSecond(byte* second, uint controller);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ReturnControllerStatus_RtcStatus(byte* status, uint controller);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ReturnControllerStatus_RtcWeek(byte* week, uint controller);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ReturnControllerStatus_RtcYear(byte* year, uint controller);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ReturnControllerStatus_RunningMode(byte* mode, uint controller);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int RetturnControllerStatus_ScreenLockStatus(byte* status, uint controller);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ReturnControllerStatus_SwithMode(byte* mode, uint controller);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ReturnControllerStatus_Temperature1(uint* temperature, uint controller);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ReturnControllerStatus_Temperature2(uint* temperature, uint controller);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ReturnControllerStatus_TimingOnOff(byte* onoff, uint controller);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ReturnCopyrightInfo_Data(uint* data, uint copyrightinfo);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ReturnMemVolume_TotalMemVolume(uint* volume, uint memvolume);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ReturnPingStatus_Address(ushort* address, uint status);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ReturnPingStatus_Barcode(uint* barcode, uint status);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ReturnPingStatus_Baudrate(uint* baudrate, uint status);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ReturnPingStatus_ControllerType(ushort* type, uint status);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ReturnPingStatus_CurrentBright(byte* bright, uint status);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ReturnPingStatus_CurrentOnOffStatus(byte* onoff, uint status);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ReturnPingStatus_Firmware(uint* firmware, uint status);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ReturnPingStatus_Heigth(ushort* heigth, uint status);
 
        //
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ReturnPingStatus_Width(ushort* width, uint status);
 
        //增加定时开关机时间区段
        // onhour - 开机小时
        // onminute - 开机分钟
        // offhour - 关机小时
        // offminute - 关机分钟
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int ScreenTimingOnOffCmd_addTime(uint cmd, byte onhour, byte onminute, byte offhour, byte offminute);
 
        //取得控制器连接模式 0:单机直连(PC 与控制器直接连接)。 1:自动获取(DHCP)。 2:手动设置(Static IP)。 3:服务器模式(动态IP)。 
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int SetupAddressCmd_getMode(int* mode, uint cmd);
 
        //取得服务器墨水位址组态
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int SetupAddressCmd_getServerSetting(uint cmd);
 
        //取得静态位址组态
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int SetupAddressCmd_getStaticSetting(uint cmd);
 
        //设置控制器连接模式
        // mode - 控制器连接模式 1: 自动获取IP(DHCP),2: 手动设置IP(static IP),3: 服务器模式(动态IP)
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int SetupAddressCmd_setMode(uint cmd, byte mode);
 
        //设定服务器模式位址组态
        // serversetting - 服务器模式位址组态
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int SetupAddressCmd_setServerSetting(uint cmd, uint serversetting);
 
        //设定静态位址组态
        // staticsetting - 静态位址组态
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int SetupAddressCmd_setStaticSetting(uint cmd, uint staticsetting);
 
        //设置网关
        // gateway - 网关
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int StaticSetting_setGateway(uint setting, byte* gateway);
 
        //设置IP
        // ip - ip地址
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int StaticSetting_setIP(uint setting, byte* ip);
 
        //设置端口
        // port - 端口
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int StaticSetting_setPort(uint setting, ushort prot);
 
        //设置子网掩码
        // mask - 子网掩码
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int StaticSetting_setSubNetMask(uint setting, byte* mask);
 
        //
        //addarea - 动态区
        // runmode - 动态区播放方式
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int UpdateDynamicAreaCmd_addArea(uint cmd, uint addarea, uint runmode);
 
        //创建串口控制器
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_BxControllerRS(uint* controller);
 
        //创建串口控制器
        // alias - 别名
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_BxControllerRS2(uint* controller, string alias);
 
        //创建串口控制器
        // alias - 别名
        // bx - 指定bx控制器系列
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int Create_BxControllerRS3(uint* controller, string alias, uint bx);
 
        //设定透明度。 1.当该值大于等于 0(不透明) 小于等于100(全透明) 时,以该背景区域为基准。 2.当该值为101时,采用如下算法:前景灰度不为0时,显示前景值,否则为背景值。 3.当该值为102时,采用如下算法:前景灰度不为0时,显示背景值,否则为前景值
        // p1 - 透明度
        [DllImport("onbon.api.dll", CallingConvention = CallingConvention.Cdecl)]
        public unsafe static extern int BackgroundBxArea_setTransparency(uint area, uint p1);
 
        #endregion
 
        #region BX_IV调用
        /*-------------------------------------------------------------------------------
          过程名:    AddScreen
          向动态库中添加显示屏信息;该函数不与显示屏通讯,只用于动态库中的指定显示屏参数信息配置。
          参数:
            nControlType    :显示屏的控制器型号;详见宏定义“控制器型号定义”              
            nScreenNo       :显示屏屏号;该参数与LedshowTW 2013软件中"设置屏参"模块的"屏号"参数一致。
            nWidth          :显示屏宽度 16的整数倍;最小64;BX-5E系列最小为80
            nHeight         :显示屏高度 16的整数倍;最小16;
            nScreenType     :显示屏类型;1:单基色;2:双基色;
              3:双基色;注意:该显示屏类型只有BX-4MC支持;同时该型号控制器不支持其它显示屏类型。
              4:全彩色;注意:该显示屏类型只有BX-5Q系列支持;同时该型号控制器不支持其它显示屏类型。
              5:双基色灰度;注意:该显示屏类型只有BX-5QS支持;同时该型号控制器不支持其它显示屏类型。
            nPixelMode      :点阵类型;1:R+G;2:G+R;该参数只对双基色屏有效 ;默认为2;
            nDataDA         :数据极性;,0x00:数据低有效,0x01:数据高有效;默认为0;
            nDataOE         :OE极性;  0x00:OE 低有效;0x01:OE 高有效;默认为0;
            nRowOrder       :行序模式;0:正常;1:加1行;2:减1行;默认为0;
            nFreqPar        :扫描点频;0~6;默认为0;
            pCom            :串口名称;串口通讯模式时有效;例:COM1
            nBaud           :串口波特率:目前支持9600、57600;默认为57600;
            pSocketIP       :控制卡IP地址,网络通讯模式时有效;例:192.168.0.199;
              本动态库网络通讯模式时只支持固定IP模式,单机直连和网络服务器模式不支持。
            nSocketPort     :控制卡网络端口;网络通讯模式时有效;例:5005
            pWiFiIP         :控制器WiFi模式的IP地址信息;WiFi通讯模式时有效;例:192.168.100.1
            nWiFiPort       :控制卡WiFi端口;WiFi通讯模式时有效;例:5005
            pScreenStatusFile:用于保存查询到的显示屏状态参数保存的INI文件名;
              只有执行查询显示屏状态GetScreenStatus时,该参数才有效
          返回值            :详见返回状态代码定义。
        -------------------------------------------------------------------------------*/
        [DllImport("BX_IV.dll")]
        public static extern int AddScreen(int nControlType, int nScreenNo,
        int nWidth, int nHeight, int nScreenType, int nPixelMode, int nDataDA,
           int nDataOE, int nRowOrder, int nFreqPar, string pCom, int nBaud,
           string pSocketIP, int nSocketPort, string pWiFiIP, int nWiFiPort, string pScreenStatusFile); //添加屏显
 
        /*-------------------------------------------------------------------------------
          过程名:    DeleteScreen
          删除指定显示屏信息,删除显示屏成功后会将该显示屏下所有节目信息从动态库中删除。
          该函数不与显示屏通讯,只用于动态库中的指定显示屏参数信息配置。
          参数:
            nScreenNo       :显示屏屏号;该参数与AddScreen函数中的nScreenNo参数对应。
          返回值            :详见返回状态代码定义。
        -------------------------------------------------------------------------------}*/
        [DllImport("BX_IV.dll")]
        public static extern int DeleteScreen(int nScreenNo);//删除屏显
        /*-------------------------------------------------------------------------------
          过程名:    SendScreenInfo
          通过指定的通讯模式,发送相应信息、命令到显示屏。该函数与显示屏进行通讯
          参数:
            nScreenNo       :显示屏屏号;该参数与AddScreen函数中的nScreenNo参数对应。
            nSendMode       :与显示屏的通讯模式;
              0:串口模式、BX-5A2&RF、BX-5A4&RF等控制器为RF串口无线模式;
              2:网络模式;
              4:WiFi模式
            nSendCmd        :通讯命令值
              SEND_CMD_PARAMETER =41471;  加载屏参数。
              SEND_CMD_SENDALLPROGRAM = 41456;  发送所有节目信息。
              SEND_CMD_POWERON =41727; 强制开机
              SEND_CMD_POWEROFF = 41726; 强制关机
              SEND_CMD_TIMERPOWERONOFF = 41725; 定时开关机
              SEND_CMD_CANCEL_TIMERPOWERONOFF = 41724; 取消定时开关机
              SEND_CMD_RESIVETIME = 41723; 校正时间。
              SEND_CMD_ADJUSTLIGHT = 41722; 亮度调整。
            nOtherParam1    :保留参数;0
          返回值            :详见返回状态代码定义。
        -------------------------------------------------------------------------------*/
        [DllImport("BX_IV.dll")]
        public static extern int SendScreenInfo(int nScreenNo, int nSendMode, int nSendCmd, int nOtherParam1);//发送相应命令到显示屏。 
 
        /*-------------------------------------------------------------------------------
          过程名:    AddScreenProgram
          向动态库中指定显示屏添加节目;该函数不与显示屏通讯,只用于动态库中的指定显示屏节目信息配置。
          参数:
            nScreenNo       :显示屏屏号;该参数与AddScreen函数中的nScreenNo参数对应。
            nProgramType    :节目类型;0正常节目。
            nPlayLength     :0:表示自动顺序播放;否则表示节目播放的长度;范围1~65535;单位秒
            nStartYear      :节目的生命周期;开始播放时间年份。如果为无限制播放的话该参数值为65535;如2010
            nStartMonth     :节目的生命周期;开始播放时间月份。如11
            nStartDay       :节目的生命周期;开始播放时间日期。如26
            nEndYear        :节目的生命周期;结束播放时间年份。如2011
            nEndMonth       :节目的生命周期;结束播放时间月份。如11
            nEndDay         :节目的生命周期;结束播放时间日期。如26
            nMonPlay        :节目在生命周期内星期一是否播放;0:不播放;1:播放.
            nTuesPlay       :节目在生命周期内星期二是否播放;0:不播放;1:播放.
            nWedPlay        :节目在生命周期内星期二是否播放;0:不播放;1:播放.
            nThursPlay      :节目在生命周期内星期二是否播放;0:不播放;1:播放.
            bFriPlay        :节目在生命周期内星期二是否播放;0:不播放;1:播放.
            nSatPlay        :节目在生命周期内星期二是否播放;0:不播放;1:播放.
            nSunPlay        :节目在生命周期内星期二是否播放;0:不播放;1:播放.
            nStartHour      :节目在当天开始播放时间小时。如8
            nStartMinute    :节目在当天开始播放时间分钟。如0
            nEndHour        :节目在当天结束播放时间小时。如18
            nEndMinute      :节目在当天结束播放时间分钟。如0
          返回值            :详见返回状态代码定义。
        -------------------------------------------------------------------------------*/
        [DllImport("BX_IV.dll")]
        public static extern int AddScreenProgram(int nScreenNo, int nProgramType, int nPlayLength,
            int nStartYear, int nStartMonth, int nStartDay, int nEndYear, int nEndMonth, int nEndDay,
            int nMonPlay, int nTuesPlay, int nWedPlay, int nThursPlay, int bFriPlay, int nSatPlay, int nSunPlay,
            int nStartHour, int nStartMinute, int nEndHour, int nEndMinute); //向指定显示屏添加节目; 
 
        /*-------------------------------------------------------------------------------
          过程名:    DeleteScreenProgram
          删除指定显示屏指定节目,删除节目成功后会将该节目下所有区域信息删除。
          该函数不与显示屏通讯,只用于动态库中的指定显示屏指定节目信息配置。
          参数:
            nScreenNo       :显示屏屏号;该参数与AddScreen函数中的nScreenNo参数对应。
            nProgramOrd     :节目序号;该序号按照节目添加顺序,从0顺序递增,如删除中间的节目,后面的节目序号自动填充。
          返回值            :详见返回状态代码定义。
        -------------------------------------------------------------------------------*/
        [DllImport("BX_IV.dll")]
        public static extern int DeleteScreenProgram(int nScreenNo, int nProgramOrd); //删除节目
 
        /*-------------------------------------------------------------------------------
          过程名:    DeleteScreenProgramArea
          删除指定显示屏指定节目的指定区域,删除区域成功后会将该区域下所有信息删除。
          该函数不与显示屏通讯,只用于动态库中指定显示屏指定节目中指定的区域信息配置。
          参数:
            nScreenNo       :显示屏屏号;该参数与AddScreen函数中的nScreenNo参数对应。
            nProgramOrd     :节目序号;该序号按照节目添加顺序,从0顺序递增,如删除中间的节目,后面的节目序号自动填充。
            nAreaOrd        :区域序号;该序号按照区域添加顺序,从0顺序递增,如删除中间的区域,后面的区域序号自动填充。
          返回值            :详见返回状态代码定义。
        -------------------------------------------------------------------------------*/
        [DllImport("BX_IV.dll")]
        public static extern int DeleteScreenProgramArea(int nScreenNo, int nProgramOrd, int nAreaOrd);//删除区域
 
        /*-------------------------------------------------------------------------------
          过程名:    AddScreenProgramBmpTextArea:
          向动态库中指定显示屏的指定节目添加图文区域;该函数不与显示屏通讯,只用于动态库中的指定显示屏指定节目中的图文区域信息配置。
          参数:
            nScreenNo       :显示屏屏号;该参数与AddScreen函数中的nScreenNo参数对应。
            nProgramOrd     :节目序号;该序号按照节目添加顺序,从0顺序递增,如删除中间的节目,后面的节目序号自动填充。
            nX              :区域的横坐标;显示屏的左上角的横坐标为0;最小值为0
            nY              :区域的纵坐标;显示屏的左上角的纵坐标为0;最小值为0
            nWidth          :区域的宽度;最大值不大于显示屏宽度-nX
            nHeight         :区域的高度;最大值不大于显示屏高度-nY
          返回值            :详见返回状态代码定义。
        -------------------------------------------------------------------------------*/
        [DllImport("BX_IV.dll")]
        public static extern int AddScreenProgramBmpTextArea(int nScreenNo, int nProgramOrd, int nX, int nY,
            int nWidth, int nHeight);//向指定显示屏指定节目添加图文区;
 
        /*-------------------------------------------------------------------------------
          过程名:    AddScreenProgramAreaBmpTextFile
          向动态库中指定显示屏的指定节目的指定图文区域添加文件;
              该函数不与显示屏通讯,只用于动态库中的指定显示屏指定节目中指定图文区域的文件信息配置。
          参数:
            nScreenNo       :显示屏屏号;该参数与AddScreen函数中的nScreenNo参数对应。
            nProgramOrd     :节目序号;该序号按照节目添加顺序,从0顺序递增,如删除中间的节目,后面的节目序号自动填充。
            nAreaOrd        :区域序号;该序号按照区域添加顺序,从0顺序递增,如删除中间的区域,后面的区域序号自动填充。
            pFileName       :文件名称  支持.bmp,jpg,jpeg,rtf,txt等文件类型。
            nShowSingle     :单、多行显示;1:单行显示;0:多行显示;该参数只有在pFileName为txt类型文件时该参数才有效。
            pFontName       :字体名称;支持当前操作系统已经安装的矢量字库;该参数只有pFileName为txt类型文件时该参数才有效。
            nFontSize       :字体字号;支持当前操作系统的字号;该参数只有pFileName为txt类型文件时该参数才有效。
            nBold           :字体粗体;支持1:粗体;0:正常;该参数只有pFileName为txt类型文件时该参数才有效。
            nFontColor      :字体颜色;该参数只有pFileName为txt类型文件时该参数才有效。
            nStunt          :显示特技。
              0x00:随机显示
              0x01:静态
              0x02:快速打出
              0x03:向左移动
              0x04:向左连移
              0x05:向上移动            3T类型控制卡无此特技
              0x06:向上连移            3T类型控制卡无此特技
              0x07:闪烁                3T类型控制卡无此特技
              0x08:飘雪
              0x09:冒泡
              0x0A:中间移出
              0x0B:左右移入
              0x0C:左右交叉移入
              0x0D:上下交叉移入
              0x0E:画卷闭合
              0x0F:画卷打开
              0x10:向左拉伸
              0x11:向右拉伸
              0x12:向上拉伸
              0x13:向下拉伸            3T类型控制卡无此特技
              0x14:向左镭射
              0x15:向右镭射
              0x16:向上镭射
              0x17:向下镭射
              0x18:左右交叉拉幕
              0x19:上下交叉拉幕
              0x1A:分散左拉
              0x1B:水平百页            3T、3A、4A、3A1、3A2、4A1、4A2、4A3、4AQ类型控制卡无此特技
              0x1C:垂直百页            3T、3A、4A、3A1、3A2、4A1、4A2、4A3、4AQ、3M、4M、4M1、4MC类型控制卡无此特技
              0x1D:向左拉幕            3T、3A、4A类型控制卡无此特技
              0x1E:向右拉幕            3T、3A、4A类型控制卡无此特技
              0x1F:向上拉幕            3T、3A、4A类型控制卡无此特技
              0x20:向下拉幕            3T、3A、4A类型控制卡无此特技
              0x21:左右闭合            3T类型控制卡无此特技
              0x22:左右对开            3T类型控制卡无此特技
              0x23:上下闭合            3T类型控制卡无此特技
              0x24:上下对开            3T类型控制卡无此特技
              0x25:向右连移
              0x26:向右连移
              0x27:向下移动            3T类型控制卡无此特技
              0x28:向下连移            3T类型控制卡无此特技
            nRunSpeed       :运行速度;0~63;值越大运行速度越慢。
            nShowTime       :停留时间;0~65525;单位0.5秒
 
          返回值:           :详见返回状态代码定义。
        -------------------------------------------------------------------------------*/
        [DllImport("BX_IV.dll")]
        public static extern int AddScreenProgramAreaBmpTextFile(int nScreenNo, int nProgramOrd, int nAreaOrd,
        string pFileName, int nShowSingle, string pFontName, int nFontSize, int nBold, int nFontColor,
            int nStunt, int nRunSpeed, int nShowTime); //向指定显示屏指定节目指定区域添加文件
 
        /*-------------------------------------------------------------------------------
          过程名:    DeleteScreenProgramAreaBmpTextFile
          删除指定显示屏指定节目指定图文区域的指定文件,删除文件成功后会将该文件信息删除。
          该函数不与显示屏通讯,只用于动态库中的指定显示屏指定节目指定区域中的指定文件信息配置。
          参数:
            nScreenNo       :显示屏屏号;该参数与AddScreen函数中的nScreenNo参数对应。
            nProgramOrd     :节目序号;该序号按照节目添加顺序,从0顺序递增,如删除中间的节目,后面的节目序号自动填充。
            nAreaOrd        :区域序号;该序号按照区域添加顺序,从0顺序递增,如删除中间的区域,后面的区域序号自动填充。
            nFileOrd        :文件序号;该序号按照文件添加顺序,从0顺序递增,如删除中间的文件,后面的文件序号自动填充。
          返回值            :详见返回状态代码定义。
        -------------------------------------------------------------------------------*/
        [DllImport("BX_IV.dll")]
        public static extern int DeleteScreenProgramAreaBmpTextFile(int nScreenNo, int nProgramOrd, int nAreaOrd, int nFileOrd); //删除指定显示屏指定节目指定图文区域的指定文件,删除文件成功后会将该文件信息删除
 
        [DllImport("BX_IV.dll")]
        public static extern int AddScreenProgramTimeArea(int nScreenNo, int nProgramOrd, int nX, int nY, int nWidth, int nHeight);//向指定显示屏指定节目添加日期时间区;
 
        [DllImport("BX_IV.dll")]
        public static extern int AddScreenProgramTimeAreaFile(int nScreenNo, int nProgramOrd, int nAreaOrd,
            string pInputtxt, string pFontName, int nSingal, int nAlign, int nFontSize,
            int nBold, int nItalic, int nUnderline, int nUsetxt, int nTxtcolor,
            int nUseymd, int nYmdstyle, int nYmdcolor, int nUseweek, int nWeekstyle, int nWeekcolor,
            int nUsehns, int nHnsstyle, int nHnscolor, int nAutoset); //向指定显示屏指定节目指定区域添加时间文件
 
        #endregion
 
        #region 画面上同步显示控件
        public ListBox responseled;
        public DevComponents.DotNetBar.Controls.TextBoxX tb_sendtoled;
        //public LabelX lb_led;
        delegate void displayresponse(string text);
        delegate void SetTextCallback(string ledText);
        #endregion
 
        Thread trd = null;
        string ledip = "";
        int ledno = 0;
        int portno = 0;
 
        /// <summary>
        /// 初始化成功标记
        /// </summary>
        bool flag = false;
        //private IPEndPoint ServerInfo;
        //private Socket socket;
        //private Byte[] MsgBuffer = new Byte[65535];
        //private Byte[] MsgSend = new Byte[65535];
 
        public LedThread(int led_no, string led_ip, int port)
        {
            try
            {
                ledno = led_no;
                ledip = led_ip;
                this.portno = port;
 
                flag = true;// InitScreen();
                if (flag)
                {
                    trd = new Thread(new ThreadStart(this.ThreadTask));
                    trd.IsBackground = true;
                    trd.Start();
                }
                else
                {
                    Common.WriteLogFile("WcsError", "LedThread/InitScreen--初始化LED" + ledno + "失败");
                }
            }
            catch (Exception em)
            {
                Common.WriteLogFile("WcsError", "LedThread/LedThread--LED线程启动出错(" + ledno + "):" + em.Message);
            }
        }
 
        /// <summary>
        /// 销毁
        /// </summary>
        public void Destroy()
        {
            try
            {
                //DeleteScreen(ledno);
            }
            catch (Exception)
            { 
            }
        }
 
        /// <summary>        
        /// 初始化LED屏幕数据,增加设置屏显,添加节目,添加图文区域        
        /// </summary>
        private bool InitScreen()
        {
            bool ret = false;
            try
            {
                int result = 0;
                result = AddScreen(Common.CONTROLLER_TYPE, ledno, Common.SCREEN_WIDTH, Common.SCREEN_HEIGHT, Common.SCREEN_TYPE, Common.SCREEN_PIXELMODE,
                    Common.SCREEN_DATADA, Common.SCREEN_DATAOE, Common.SCREEN_ROWORDER, Common.SCREEN_FREQPAR, Common.SCREEN_COMM, Common.SCREEN_BAUD,
                    ledip, portno, "", 5005, Common.SCREEN_STATUSFILE);
                //DisplayInfo("【" + DateTime.Now.ToString() + "】" + GetErrorMessage("AddScreen", result, ledno + "号屏"));
 
                result = AddScreenProgram(ledno, 0, 0, 65535, 1, 1, 2050, 12, 31, 1, 1, 1, 1, 1, 1, 1, 0, 0, 23, 59);
                //DisplayInfo("【" + DateTime.Now.ToString() + "】" + GetErrorMessage("AddScreenProgram", result, ledno + "号屏"));
 
                for (int i = 0; i < 2; i++)
                {
                    string fileName = Application.StartupPath + "\\data\\led" + ledno + "_area" + (i + 1) + ".txt";
                    //UpdateDataFile(fileName,"自动化立体仓储系统");
                    result = AddScreenProgramBmpTextArea(ledno, 0, 0, i * 32, Common.SCREEN_WIDTH, Common.SCREEN_HEIGHT / 2);
                    result = AddScreenProgramAreaBmpTextFile(ledno, 0, i, fileName, 0,
                                                "宋体", 20, 1, 255, 1, 40, 0);
                }
                if (result == 0)
                {
                    ret = true;
                }
            }
            catch (Exception em)
            {
                Common.WriteLogFile("WcsError", "LedThread/InitScreen--初始化LED" + ledno + "失败:" + em.Message);
            }
            return ret;
        }
 
        /// <summary>
        /// 发送数据到LED
        /// </summary>
        private void SendLedData()
        {
            string[] data = Common.gs_led_data[ledno - 1].Split(';');
            //if (data.Length > 7)
            //if ((data.Length == 4 && Common.gi_led_Pages[ledno - 1] == 4)
            //    || (data.Length == 8 && Common.gi_led_Pages[ledno - 1] == 8))
            if (data.Length == 3)
            {
                unsafe
                {
                    uint screen;
                    uint program;
                    uint profile;
                    uint area;
                    //uint area1;
                    //uint area2;
                    //uint area3;
                    //uint area2;
                    uint page;
                    //uint page1;
                    //uint page2;
                    //uint page3;
                    //uint page2;
                    uint red;
                    uint green;
                    uint yellow;
                    uint font;
                    //uint font1;
                    uint factorystyle;
                    uint style;
                    int nResult;
                    nResult = Create_FColor(&red, 255, 0, 0);
 
                    //nResult = Create_FColor(&green, 0, 055, 0);
 
                    nResult = Create_FColor(&yellow, 0, 0, 0);
 
                    //nResult = Create_FFont(&font, "宋体", 12, false);
                    //nResult = Create_FFont(&font, "宋体", 26, false);
 
                    nResult = Create_BxScreenClient(&screen);
 
                    nResult = BxScreenClient_connect(screen, ledip, 5005, true);
 
                    nResult = BxScreen_getProfile(&profile, screen);
 
                    nResult = Create_ProgramBxFile(&program, 0, profile);
                    nResult = Create_DisplayStyleFactory(&factorystyle);
                    nResult = DisplayStyleFactory_getStyle(&style, factorystyle, 3);
                    for (int i = 0; i < 3; i++)
                    {
                        nResult = Create_FFont(&font, "宋体", 13, false);
                        nResult = Create_TextCaptionBxArea(&area, 0, i * 16, Common.SCREEN_WIDTH, 16, profile);
                        //nResult = Create_TextCaptionBxArea(&area, 0, i * 32, Common.SCREEN_WIDTH, 32, profile);
                        nResult = Create_TextBxPage4(&page, data[i], font, red, yellow);
                        nResult = ProgramBxFile_addArea(program, area);
                        nResult = AbstractTextCaptionBxArea_addPage(area, page);
                        nResult = BxPage_setDisplayStyle(page, style);
                        BxPage_setStayTime(page, 10000);
                    }
                    //if (Common.gi_led_Pages[ledno - 1] == 4)
                    //{
                    //    nResult = DisplayStyleFactory_getStyle(&style, factorystyle, 5);
                    //    for (int i = 0; i < Common.gi_led_Pages[ledno - 1]; i++)
                    //    {
                    //        nResult = Create_FFont(&font, "宋体", 12, false);
                    //        //nResult = Create_TextCaptionBxArea(&area, 0, i * 16, Common.SCREEN_WIDTH, 16, profile);
                    //        nResult = Create_TextCaptionBxArea(&area, 0, i * 32, Common.SCREEN_WIDTH, 32, profile);
                    //        nResult = Create_TextBxPage4(&page, data[i], font, red, yellow);
                    //        nResult = ProgramBxFile_addArea(program, area);
                    //        nResult = AbstractTextCaptionBxArea_addPage(area, page);
                    //        nResult = BxPage_setDisplayStyle(page, style);
                    //        BxPage_setStayTime(page, 15000);
                    //    }
                    //}
                    //else if (Common.gi_led_Pages[ledno - 1] == 8)
                    //{
                    //    nResult = DisplayStyleFactory_getStyle(&style, factorystyle, 3);
                    //    for (int i = 0; i < Common.gi_led_Pages[ledno - 1]; i++)
                    //    {
                    //        nResult = Create_FFont(&font, "宋体", 11, false);
                    //        nResult = Create_TextCaptionBxArea(&area, 0, i * 16, Common.SCREEN_WIDTH, 16, profile);
                    //        //nResult = Create_TextCaptionBxArea(&area, 0, i * 32, Common.SCREEN_WIDTH, 32, profile);
                    //        nResult = Create_TextBxPage4(&page, data[i], font, red, yellow);
                    //        nResult = ProgramBxFile_addArea(program, area);
                    //        nResult = AbstractTextCaptionBxArea_addPage(area, page);
                    //        nResult = BxPage_setDisplayStyle(page, style);
                    //        BxPage_setStayTime(page, 15000);
                    //    }
                    //}
 
                    nResult = BxScreen_writeProgram(screen, program);
 
                    if (nResult == 0)
                    {
                        //DisplayInfo("【" + DateTime.Now.ToString() + "】发送数据到LED" + ledno + "成功:" + data[0] + " " + data[1] + " " + data[2] + " " + data[3]);
                        DisplayInfo("【" + DateTime.Now.ToString() + "】发送数据到LED" + ledno + "成功:" + Common.gs_led_data[ledno - 1]);
                        Common.gs_led_data[ledno - 1] = "";
                        ResetLedText("");
                    }
                    else
                    {
                        DisplayInfo("【" + DateTime.Now.ToString() + "】发送数据到LED" + ledno + "失败:" + GetErrorMessage("发送数据(SendScreenInfo)", nResult, ledno + "号屏"));
                        Common.WriteLogFile("WcsError", GetErrorMessage("发送数据(SendScreenInfo)", nResult, ledno + "号屏"));
                    }
 
                    nResult = BxScreen_disconnect(screen);
 
                }
                //string fileName1 = Application.StartupPath + "\\data\\led" + ledno + "_area1.txt";
                //string fileName2 = Application.StartupPath + "\\data\\led" + ledno + "_area2.txt";
                //UpdateDataFile(fileName1, data[0]);
                //UpdateDataFile(fileName2, data[1]);
            }
            else
            {
                DisplayInfo("【" + DateTime.Now.ToString() + "】待发送数据格式错误,屏号" + ledno + ",内容:" + Common.gs_led_data[ledno - 1]);
                Common.gs_led_data[ledno - 1] = "";
                return;
            }
            //if (Common.m_bSendBusy == false)
            //{
            //    Common.m_bSendBusy = true;
            //    int result = SendScreenInfo(ledno, Common.SCREEN_SENDMODE, Common.SENDALLPROGRAM, 0);
            //    //Common.WriteLogFile("WcsError", GetErrorMessage("发送数据(SendScreenInfo)", result, ledno + "号屏"));
            //    //DisplayInfo(global.GetErrorMessage("发送数据", result, screenno + "号屏(" + SCREEN_SOCKETIP + ")") + "\r\n");
            //    if (result == 0)
            //    {
            //        DisplayInfo("【" + DateTime.Now.ToString() + "】发送数据到LED" + ledno + "成功:" + data);
            //        Common.gs_led_data[ledno - 1] = "";
            //        ResetLedText("");
            //    }
            //    else
            //    {
            //        DisplayInfo("【" + DateTime.Now.ToString() + "】发送数据到LED" + ledno + "失败:" + GetErrorMessage("发送数据(SendScreenInfo)", result, ledno + "号屏"));
            //        Common.WriteLogFile("WcsError", GetErrorMessage("发送数据(SendScreenInfo)", result, ledno + "号屏"));
            //    }
            //    Common.m_bSendBusy = false;
            //}
        }
 
        #region 通讯反馈同步显示
        /// <summary>
        /// 显示条码通讯信息
        /// </summary>
        /// <param name="text"></param>
        private void DisplayInfo(string text)
        {
            if (responseled == null)
            {
                return;
            }
            if (responseled.InvokeRequired)
            {
                try
                {
                    displayresponse d = new displayresponse(DisplayInfo);
                    responseled.Invoke(d, new object[] { text });
                }
                catch (Exception em)
                {
                    Common.WriteLogFile("WcsError", "LedThread/DisplayInfo--同步显示LED发送信息失败:" + em.Message);
                }
            }
            else
            {
                if (responseled.Items.Count > 12)
                {
                    responseled.Items.Clear();
                }
                responseled.Items.Add(text);
            }
 
        }
 
        /// <summary>
        /// 清空界面led内容显示
        /// </summary>
        /// <param name="text"></param>
        private void ResetLedText(string ledtext)
        {
            if (tb_sendtoled == null)
            {
                return;
            }
            if (tb_sendtoled.InvokeRequired)
            {
                try
                {
                    SetTextCallback d = new SetTextCallback(ResetLedText);
                    tb_sendtoled.Invoke(d, new object[] { ledtext });
                }
                catch (Exception em)
                {
                    Common.WriteLogFile("WcsError", "LedThread/ResetLedText--清空界面LED显示内容失败:" + em.Message);
                }
            }
            else
            {
                tb_sendtoled.Text = ledtext;
            }
 
        }
        #endregion
 
        /// <summary>        
        /// 更新txt文件
        /// </summary>
        private bool UpdateDataFile(string FileName, string content)
        {
            bool result = false;
            try
            {
                if (File.Exists(FileName))
                {
                    File.Delete(FileName);
                }
 
                FileStream fs1 = new FileStream(FileName, FileMode.Create, FileAccess.Write);//创建写入文件    
                StreamWriter sw = new StreamWriter(fs1, System.Text.Encoding.GetEncoding("GB2312"));
                //StreamWriter sw = new StreamWriter(fs1, System.Text.Encoding.GetEncoding("UTF-8"));
                sw.WriteLine(content);//开始写入值                   
                sw.Close();
                fs1.Close();
                result = true;
            }
            catch (Exception)
            {
            }
            return result;
        }
 
        /// <summary>        
        /// 控制卡返回信息        
        /// </summary>        
        /// <returns></returns> 
        private string GetErrorMessage(string szfunctionName, int nResult, string screen)
        {
            string szResult;
            DateTime dt = DateTime.Now;
            //szResult = "【" + screen + dt.ToString() + "】" + szfunctionName + "返回结果:";
            szResult = "返回结果:";
            switch (nResult)
            {
                case 0xF7:
                    szResult += "区域类型错误,在添加、删除图文区域文件时区域类型出错返回此类型错误";
                    break;
                case 0xF8:
                    szResult += "已经有该显示屏信息。如要重新设定请先DeleteScreen删除该显示屏再添加";
                    break;
                case 0xF9:
                    szResult += "没有找到有效的区域文件(图文区域)";
                    break;
                case 0xFA:
                    szResult += "没有找到有效的显示区域可以使用AddScreenProgramBmpTextArea添加区域信息";
                    break;
                case 0xFB:
                    szResult += "没有找到有效的显示屏节目可以使用AddScreenProgram函数添加指定节目";
                    break;
                case 0xFC:
                    szResult += "系统内没有查找到该显示屏可以使用AddScreen函数添加显示屏";
                    break;
                case 0xFD:
                    szResult += "系统内正在向该显示屏通讯,请稍后再通讯";
                    break;
                case 0xFF:
                    szResult += "其它错误";
                    break;
                case 0:
                    szResult += "函数执行/通讯成功";
                    break;
                case 0x01:
                    szResult += "通讯错误";
                    break;
                case 0x02:
                    szResult += "通讯错误";
                    break;
                case 0x03:
                    szResult += "通讯错误";
                    break;
                case 0x04:
                    szResult += "通讯错误";
                    break;
                case 0x05:
                    szResult += "通讯错误";
                    break;
                case 0x06:
                    szResult += "通讯错误";
                    break;
                case 0x07:
                    szResult += "通讯错误";
                    break;
                case 0x08:
                    szResult += "通讯错误";
                    break;
                case 0x09:
                    szResult += "通讯错误";
                    break;
                case 0x0A:
                    szResult += "通讯错误";
                    break;
                case 0x0B:
                    szResult += "通讯错误";
                    break;
                case 0x0C:
                    szResult += "通讯错误";
                    break;
                case 0x0D:
                    szResult += "通讯错误";
                    break;
                case 0x0E:
                    szResult += "通讯错误";
                    break;
                case 0x0F:
                    szResult += "通讯错误";
                    break;
                case 0x10:
                    szResult += "通讯错误";
                    break;
                case 0x11:
                    szResult += "通讯错误";
                    break;
                case 0x12:
                    szResult += "通讯错误";
                    break;
                case 0x13:
                    szResult += "通讯错误";
                    break;
                case 0x14:
                    szResult += "通讯错误";
                    break;
                case 0x15:
                    szResult += "通讯错误";
                    break;
                case 0x16:
                    szResult += "通讯错误";
                    break;
                case 0x17:
                    szResult += "通讯错误";
                    break;
                case 0x18:
                    szResult += "通讯错误";
                    break;
                case 0xFE:
                    szResult += "通讯错误";
                    break;
            }
            return szResult;
        }
 
        /// <summary>
        /// LED主线程
        /// </summary>
        private void ThreadTask()
        {
            //if (flag)
            //{
            //    DisplayInfo("【" + DateTime.Now.ToString() + "】初始化" + ledno + "号屏成功");
            //}
            while (true)
            {
                if (Common.gs_led_data[ledno - 1] != "")
                {
                    SendLedData();
                }
                Thread.Sleep(Common.ci_LedtimeInterval);
            }
        }
 
    }
 
    public class ONBON_CALLBACK
    {
    }
}