frmMain.frm 90.7 KB
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
VERSION 5.00
Object = "{9AB389E7-EAED-4DBF-941D-EB86ED1F9A76}#1.0#0"; "TeComConnection.dll"
Object = "{87AC6DA5-272D-40EB-B60A-F83246B1B8D7}#1.0#0"; "TeComDatabase.dll"
Object = "{C51C74EC-6107-4A01-8400-40B53BB20D42}#1.0#0"; "TeComExport.dll"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "comdlg32.ocx"
Object = "{1A397116-3057-40EE-9ECA-6FA4CC1E5FC3}#1.0#0"; "NexusPM4.ocx"
Object = "{2CCABA93-B681-4E7F-8047-BD4D623301BA}#1.0#0"; "TeComImport.dll"
Object = "{91488A85-7250-4842-8681-87818334B791}#1.0#0"; "NxViewManager2.ocx"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.1#0"; "mscomctl.ocx"
Begin VB.MDIForm FrmMain 
   BackColor       =   &H8000000C&
   Caption         =   "  NEXUS - GeoSan - Tecnologia Terralib"
   ClientHeight    =   8445
   ClientLeft      =   225
   ClientTop       =   855
   ClientWidth     =   10035
   Icon            =   "frmMain.frx":0000
   LinkTopic       =   "FrmMain"
   StartUpPosition =   3  'Windows Default
   Tag             =   "0"
   WindowState     =   2  'Maximized
   Begin MSComctlLib.ImageList ImageList4 
      Left            =   3720
      Top             =   3960
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   24
      ImageHeight     =   24
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   28
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":013E
            Key             =   ""
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":0838
            Key             =   ""
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":0FB2
            Key             =   ""
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":16AC
            Key             =   ""
         EndProperty
         BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":1DA6
            Key             =   ""
         EndProperty
         BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":24A0
            Key             =   ""
         EndProperty
         BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":2B9A
            Key             =   ""
         EndProperty
         BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":3294
            Key             =   ""
         EndProperty
         BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":398E
            Key             =   ""
         EndProperty
         BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":4088
            Key             =   ""
         EndProperty
         BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":4782
            Key             =   ""
         EndProperty
         BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":4E7C
            Key             =   ""
         EndProperty
         BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":5576
            Key             =   ""
         EndProperty
         BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":5C70
            Key             =   ""
         EndProperty
         BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":636A
            Key             =   ""
         EndProperty
         BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":6A64
            Key             =   ""
         EndProperty
         BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":715E
            Key             =   ""
         EndProperty
         BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":7858
            Key             =   ""
         EndProperty
         BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":7F52
            Key             =   ""
         EndProperty
         BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":864C
            Key             =   ""
         EndProperty
         BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":8D46
            Key             =   ""
         EndProperty
         BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":94C0
            Key             =   ""
         EndProperty
         BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":9BBA
            Key             =   ""
         EndProperty
         BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":1A024
            Key             =   ""
         EndProperty
         BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":2A48E
            Key             =   ""
         EndProperty
         BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":2AC08
            Key             =   ""
         EndProperty
         BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":2B302
            Key             =   ""
         EndProperty
         BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":2B9FC
            Key             =   ""
         EndProperty
      EndProperty
   End
   Begin MSComDlg.CommonDialog Cdl 
      Left            =   4305
      Top             =   2430
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin VB.PictureBox pctSfondo 
      Align           =   4  'Align Right
      BorderStyle     =   0  'None
      Height          =   7515
      Left            =   6090
      ScaleHeight     =   7515
      ScaleWidth      =   3945
      TabIndex        =   1
      Top             =   510
      Width           =   3945
      Begin NxViewManager.ViewManager ViewManager1 
         Height          =   1095
         Left            =   600
         TabIndex        =   11
         Top             =   3960
         Width           =   1455
         _ExtentX        =   2566
         _ExtentY        =   1931
      End
      Begin TECOMEXPORTLibCtl.TeExport TeExport2 
         Left            =   2880
         OleObjectBlob   =   "frmMain.frx":2C0F6
         Top             =   1680
      End
      Begin TECOMIMPORTLibCtl.TeImport TeImport1 
         Left            =   2880
         OleObjectBlob   =   "frmMain.frx":2C11A
         Top             =   5160
      End
      Begin PManager4.Manager Manager1 
         Height          =   855
         Left            =   600
         TabIndex        =   10
         Top             =   1680
         Width           =   1335
         _ExtentX        =   2355
         _ExtentY        =   1508
      End
      Begin MSComDlg.CommonDialog cmmSalvaImg 
         Left            =   1590
         Top             =   7605
         _ExtentX        =   847
         _ExtentY        =   847
         _Version        =   393216
      End
      Begin VB.CommandButton cmdClose 
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   3660
         Picture         =   "frmMain.frx":2C13E
         Style           =   1  'Graphical
         TabIndex        =   8
         Top             =   0
         Width           =   285
      End
      Begin VB.PictureBox picSplitter 
         BackColor       =   &H00808080&
         BorderStyle     =   0  'None
         FillColor       =   &H00808080&
         Height          =   7200
         Left            =   2250
         ScaleHeight     =   3135.189
         ScaleMode       =   0  'User
         ScaleWidth      =   780
         TabIndex        =   2
         Top             =   -90
         Visible         =   0   'False
         Width           =   72
      End
      Begin VB.Frame FrameEscala 
         Height          =   615
         Left            =   240
         TabIndex        =   4
         Top             =   240
         Width           =   3675
         Begin VB.TextBox txtEscala 
            Height          =   285
            Left            =   1890
            TabIndex        =   5
            Top             =   210
            Width           =   1635
         End
         Begin VB.Label Label1 
            Caption         =   "Escala de Visualização:"
            Height          =   195
            Left            =   90
            TabIndex        =   6
            Top             =   240
            Width           =   1755
         End
      End
      Begin MSComctlLib.TabStrip TabStrip1 
         Height          =   315
         Left            =   240
         TabIndex        =   3
         Top             =   960
         Width           =   4095
         _ExtentX        =   7223
         _ExtentY        =   556
         MultiRow        =   -1  'True
         MultiSelect     =   -1  'True
         _Version        =   393216
         BeginProperty Tabs {1EFB6598-857C-11D1-B16A-00C0F0283628} 
            NumTabs         =   2
            BeginProperty Tab1 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
               Caption         =   "Temas"
               ImageVarType    =   2
            EndProperty
            BeginProperty Tab2 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
               Caption         =   "Propriedades"
               ImageVarType    =   2
            EndProperty
         EndProperty
      End
      Begin TeComConnectionLibCtl.TeAcXConnection TeAcXConnection1 
         Left            =   2880
         OleObjectBlob   =   "frmMain.frx":2C4B0
         Top             =   2760
      End
      Begin TECOMDATABASELibCtl.TeDatabase TeDatabase1 
         Left            =   2760
         OleObjectBlob   =   "frmMain.frx":2C4D4
         Top             =   4080
      End
      Begin VB.Image imgSplitter 
         Height          =   7380
         Left            =   0
         MousePointer    =   9  'Size W E
         Top             =   0
         Width           =   150
      End
   End
   Begin MSComctlLib.StatusBar sbStatusBar 
      Align           =   2  'Align Bottom
      Height          =   420
      Left            =   0
      TabIndex        =   0
      Top             =   8025
      Width           =   10035
      _ExtentX        =   17701
      _ExtentY        =   741
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   5
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Object.Width           =   8819
            MinWidth        =   8819
            Text            =   "Status"
            TextSave        =   "Status"
         EndProperty
         BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            AutoSize        =   2
            Object.Width           =   3519
            MinWidth        =   3528
         EndProperty
         BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   5
            AutoSize        =   2
            Object.Width           =   3519
            MinWidth        =   3528
            TextSave        =   "20:16"
         EndProperty
         BeginProperty Panel4 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            AutoSize        =   2
            Object.Width           =   3519
            MinWidth        =   3528
         EndProperty
         BeginProperty Panel5 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Object.Width           =   3528
            MinWidth        =   3528
            Object.ToolTipText     =   "Distância"
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.Toolbar tbToolBar 
      Align           =   1  'Align Top
      Height          =   510
      Left            =   0
      TabIndex        =   7
      Top             =   0
      Width           =   10035
      _ExtentX        =   17701
      _ExtentY        =   900
      ButtonWidth     =   820
      ButtonHeight    =   794
      ImageList       =   "ImageList4"
      _Version        =   393216
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
         NumButtons      =   42
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "knew"
            Object.ToolTipText     =   "Novo"
            ImageIndex      =   1
         EndProperty
         BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "ksave"
            Object.ToolTipText     =   "Salvar"
            ImageIndex      =   2
         EndProperty
         BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "kselection"
            Object.ToolTipText     =   "Selecionar"
            ImageIndex      =   3
            Style           =   1
         EndProperty
         BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "kplotview"
            Object.ToolTipText     =   "Atualizar"
            ImageIndex      =   4
         EndProperty
         BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "krecompose"
            Object.ToolTipText     =   "Recompor"
            ImageIndex      =   5
         EndProperty
         BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "mnuPoligono"
            Object.ToolTipText     =   "Poligono de Seleção"
            ImageIndex      =   6
         EndProperty
         BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "KFindCoordenadas"
            Object.ToolTipText     =   "Localizar Coordenada"
            ImageIndex      =   7
         EndProperty
         BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "KEncontraTexto"
            Object.ToolTipText     =   "Encontrar Textos"
            ImageIndex      =   8
         EndProperty
         BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "KEncontraConsumidor"
            Object.ToolTipText     =   "Encontrar Consumidores"
            ImageIndex      =   9
         EndProperty
         BeginProperty Button13 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button14 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "kzoomarea"
            Object.ToolTipText     =   "Zoom Área"
            ImageIndex      =   10
            Style           =   1
         EndProperty
         BeginProperty Button15 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "kpan"
            Object.ToolTipText     =   "Mover Visualização"
            ImageIndex      =   11
            Style           =   1
         EndProperty
         BeginProperty Button16 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "kundoview"
            Object.ToolTipText     =   "Voltar Visualização"
            ImageIndex      =   12
         EndProperty
         BeginProperty Button17 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "kredoview"
            Object.ToolTipText     =   "Avançar Visualização"
            ImageIndex      =   13
         EndProperty
         BeginProperty Button18 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button19 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "kzoomin"
            Object.ToolTipText     =   "Menos Zoom"
            ImageIndex      =   14
         EndProperty
         BeginProperty Button20 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "kzoomout"
            Object.ToolTipText     =   "Mais Zoom"
            ImageIndex      =   15
         EndProperty
         BeginProperty Button21 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button22 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "kdrawnetworkline"
            Object.ToolTipText     =   "Desenhar Rede"
            ImageIndex      =   16
            Style           =   1
         EndProperty
         BeginProperty Button23 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "kmovenetworknode"
            Object.ToolTipText     =   "Mover Componente com Rede"
            ImageIndex      =   17
            Style           =   1
         EndProperty
         BeginProperty Button24 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "kinsertnetworknode"
            Object.ToolTipText     =   "Desenhar Componente na Rede"
            ImageIndex      =   18
            Style           =   1
         EndProperty
         BeginProperty Button25 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Enabled         =   0   'False
            Style           =   3
         EndProperty
         BeginProperty Button26 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Object.Visible         =   0   'False
            Key             =   "kdrawtext"
            Object.ToolTipText     =   "Desenhar Texto - Amarração"
            ImageIndex      =   19
            Style           =   1
         EndProperty
         BeginProperty Button27 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Object.Visible         =   0   'False
            Key             =   "kdrawline"
            Object.ToolTipText     =   "Desenhar Linha - Amarração"
            ImageIndex      =   20
         EndProperty
         BeginProperty Button28 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Object.Visible         =   0   'False
            Key             =   "kdrawpoint"
            Object.ToolTipText     =   "Desenhar Ponto - Amarração"
            ImageIndex      =   21
         EndProperty
         BeginProperty Button29 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Object.Visible         =   0   'False
            Style           =   3
         EndProperty
         BeginProperty Button30 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Enabled         =   0   'False
            Object.Visible         =   0   'False
            Style           =   3
         EndProperty
         BeginProperty Button31 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "kinsertdoc"
            Object.ToolTipText     =   "Inserir Documento(s)"
            ImageIndex      =   19
            Style           =   1
         EndProperty
         BeginProperty Button32 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "kdrawramal"
            Object.ToolTipText     =   "Inserir Ramal"
            ImageIndex      =   20
         EndProperty
         BeginProperty Button33 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "kdrawramalAuto"
            Object.ToolTipText     =   "Inserir ramal automaticamente"
            ImageIndex      =   27
         EndProperty
         BeginProperty Button34 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "kdrawramalAddConsumer"
            Object.ToolTipText     =   "Adiciona um consumidor a um ramal"
            ImageIndex      =   28
         EndProperty
         BeginProperty Button35 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "kMoveConsumidorGPS"
            Object.ToolTipText     =   "Mover Consumidor GPS"
            ImageIndex      =   25
         EndProperty
         BeginProperty Button36 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "kdelete"
            Object.ToolTipText     =   "Excluir"
            ImageIndex      =   21
         EndProperty
         BeginProperty Button37 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "ksearchinnetwork"
            Object.ToolTipText     =   "Encontrar válvulas a partir da rede selecionada"
            ImageIndex      =   22
         EndProperty
         BeginProperty Button38 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Object.Visible         =   0   'False
            Key             =   "ksearchattribute"
            Object.ToolTipText     =   "Pesquisa Geral"
         EndProperty
         BeginProperty Button39 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button40 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Object.Visible         =   0   'False
            Key             =   "kdrawintersection"
         EndProperty
         BeginProperty Button41 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Object.Visible         =   0   'False
            Key             =   "kConsumoLote"
            Object.ToolTipText     =   "Apresenta Consumo"
         EndProperty
         BeginProperty Button42 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Object.Visible         =   0   'False
            Key             =   "kMoveVertice"
            Object.ToolTipText     =   "Mover Vértice"
         EndProperty
      EndProperty
      Begin VB.Timer Timer1 
         Left            =   3240
         Top             =   840
      End
      Begin MSComctlLib.ProgressBar ProgressBar1 
         Height          =   285
         Left            =   9120
         TabIndex        =   9
         Top             =   60
         Visible         =   0   'False
         Width           =   1890
         _ExtentX        =   3334
         _ExtentY        =   503
         _Version        =   393216
         Appearance      =   1
         Min             =   1e-4
         Scrolling       =   1
      End
   End
   Begin MSComctlLib.ImageList ImageList1 
      Left            =   4830
      Top             =   2370
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   16
      ImageHeight     =   16
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   31
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":2C4F8
            Key             =   "new_window"
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":2C84A
            Key             =   "zoom_area"
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":2CB9C
            Key             =   "zoom_in"
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":2CEEE
            Key             =   "zoon_out"
         EndProperty
         BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":2D240
            Key             =   "undo_view"
         EndProperty
         BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":2D592
            Key             =   "redo_view"
         EndProperty
         BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":2D8E4
            Key             =   ""
         EndProperty
         BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":2DE36
            Key             =   "delete"
         EndProperty
         BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":2E188
            Key             =   "save"
         EndProperty
         BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":2E4DA
            Key             =   "fit"
         EndProperty
         BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":2E82C
            Key             =   "insertramal"
         EndProperty
         BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":2EB7E
            Key             =   "foto"
         EndProperty
         BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":2EED0
            Key             =   "fonte"
         EndProperty
         BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":2F222
            Key             =   "fiti"
         EndProperty
         BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":2F574
            Key             =   "sair"
         EndProperty
         BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":2F8C6
            Key             =   "seta"
         EndProperty
         BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":2FC18
            Key             =   "world"
         EndProperty
         BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":2FF6A
            Key             =   "find_user"
         EndProperty
         BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":302BC
            Key             =   "insert_point"
         EndProperty
         BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":3060E
            Key             =   "attach"
         EndProperty
         BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":30960
            Key             =   "draw_network"
         EndProperty
         BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":30CB2
            Key             =   "find_valvula"
         EndProperty
         BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":31004
            Key             =   "declivity"
         EndProperty
         BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":31356
            Key             =   "reflesh"
         EndProperty
         BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":316A8
            Key             =   "move_point"
         EndProperty
         BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":319FA
            Key             =   "pan"
         EndProperty
         BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":31D4C
            Key             =   "registro"
         EndProperty
         BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":3209E
            Key             =   "point"
         EndProperty
         BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":323F0
            Key             =   "point2"
         EndProperty
         BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":327BB
            Key             =   "line"
         EndProperty
         BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":32B0D
            Key             =   ""
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.ImageList ImageList2 
      Left            =   5400
      Top             =   2370
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   16
      ImageHeight     =   16
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   32
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":32F5F
            Key             =   "new_window"
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":332B1
            Key             =   "zoom_area"
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":33603
            Key             =   "zoom_in"
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":33955
            Key             =   "zoon_out"
         EndProperty
         BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":33CA7
            Key             =   "undo_view"
         EndProperty
         BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":33FF9
            Key             =   "redo_view"
         EndProperty
         BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":3434B
            Key             =   ""
         EndProperty
         BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":3489D
            Key             =   "delete"
         EndProperty
         BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":34BEF
            Key             =   "save"
         EndProperty
         BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":34F41
            Key             =   "fit"
         EndProperty
         BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":35293
            Key             =   "insertramal"
         EndProperty
         BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":355E5
            Key             =   "foto"
         EndProperty
         BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":35937
            Key             =   "fonte"
         EndProperty
         BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":35C89
            Key             =   "fiti"
         EndProperty
         BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":35FDB
            Key             =   "sair"
         EndProperty
         BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":3632D
            Key             =   "seta"
         EndProperty
         BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":3667F
            Key             =   "world"
         EndProperty
         BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":369D1
            Key             =   "find_user"
         EndProperty
         BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":36D23
            Key             =   "insert_point"
         EndProperty
         BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":37075
            Key             =   "attach"
         EndProperty
         BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":373C7
            Key             =   "draw_network"
         EndProperty
         BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":37719
            Key             =   "find_valvula"
         EndProperty
         BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":37A6B
            Key             =   "declivity"
         EndProperty
         BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":37DBD
            Key             =   "reflesh"
         EndProperty
         BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":3810F
            Key             =   "move_point"
         EndProperty
         BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":38461
            Key             =   "pan"
         EndProperty
         BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":387B3
            Key             =   "registro"
         EndProperty
         BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":38B05
            Key             =   "point"
         EndProperty
         BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":38E57
            Key             =   "point2"
         EndProperty
         BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":39222
            Key             =   "line"
         EndProperty
         BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":39574
            Key             =   ""
         EndProperty
         BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":399C6
            Key             =   ""
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.ImageList ImageList3 
      Left            =   4320
      Top             =   3960
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   32
      ImageHeight     =   32
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   25
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":39FF0
            Key             =   ""
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":3A453
            Key             =   ""
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":3EFA5
            Key             =   ""
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":41FF7
            Key             =   ""
         EndProperty
         BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":45049
            Key             =   ""
         EndProperty
         BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":4809B
            Key             =   ""
         EndProperty
         BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":4B0ED
            Key             =   ""
         EndProperty
         BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":4CF6F
            Key             =   ""
         EndProperty
         BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":4D38D
            Key             =   ""
         EndProperty
         BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":593DF
            Key             =   ""
         EndProperty
         BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":65431
            Key             =   ""
         EndProperty
         BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":71483
            Key             =   ""
         EndProperty
         BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":7D4D5
            Key             =   ""
         EndProperty
         BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":89527
            Key             =   ""
         EndProperty
         BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":95579
            Key             =   ""
         EndProperty
         BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":961CB
            Key             =   ""
         EndProperty
         BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":A221D
            Key             =   ""
         EndProperty
         BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":AE26F
            Key             =   ""
         EndProperty
         BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":BA2C1
            Key             =   ""
         EndProperty
         BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":C6313
            Key             =   ""
         EndProperty
         BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":D2365
            Key             =   ""
         EndProperty
         BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":D53B7
            Key             =   ""
         EndProperty
         BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":D57FB
            Key             =   ""
         EndProperty
         BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":D5C2F
            Key             =   ""
         EndProperty
         BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":D6068
            Key             =   ""
         EndProperty
      EndProperty
   End
   Begin VB.Menu Mnu_Arquive 
      Caption         =   "&Arquivo"
      Begin VB.Menu mnuExport 
         Caption         =   "Exportar"
         Begin VB.Menu mnuImagem 
            Caption         =   "Área Visualizada para Imagem"
         End
         Begin VB.Menu mnuExportLocalNos 
            Caption         =   "Localização de Nós com Cota"
         End
         Begin VB.Menu mnuExpAutoCad 
            Caption         =   "DXF"
         End
         Begin VB.Menu mnuExpCon 
            Caption         =   "Consumidores e Consumo"
         End
         Begin VB.Menu OdImport 
            Caption         =   "Novo DXF com OdImport"
            Visible         =   0   'False
         End
      End
      Begin VB.Menu mnusep01001 
         Caption         =   "-"
         Visible         =   0   'False
      End
      Begin VB.Menu mnuImport 
         Caption         =   "Importar"
         Begin VB.Menu mnuImportSIG 
            Caption         =   "SIG"
         End
         Begin VB.Menu mnuImportDXF 
            Caption         =   "DXF"
         End
         Begin VB.Menu mnuImpCotas 
            Caption         =   "Cotas"
         End
      End
      Begin VB.Menu mnusep011101 
         Caption         =   "-"
      End
      Begin VB.Menu mnuUpdate_Demand 
         Caption         =   "Atualizar Consumos e Distribuir Demandas"
      End
      Begin VB.Menu mnuExporta_GeoSan 
         Caption         =   "Exporta consumidores, redes, ramais e nós no formato .shp"
      End
      Begin VB.Menu mnuAtualizaCotas 
         Caption         =   "Atualiza todas as cotas de todos os nós"
      End
      Begin VB.Menu mnuAutoLogin 
         Caption         =   "Logar Automaticamente"
      End
      Begin VB.Menu mnuChangePassword 
         Caption         =   "Alterar Senha"
      End
      Begin VB.Menu mnuAtualizaNumCasaGps 
         Caption         =   "Atualizar números das casas dos coletores GPS"
      End
      Begin VB.Menu mnuFileClose 
         Caption         =   "Fechar"
         Visible         =   0   'False
      End
      Begin VB.Menu mnuFileBar0 
         Caption         =   "-"
         Visible         =   0   'False
      End
      Begin VB.Menu mnuFileProperties 
         Caption         =   "Propriedades"
         Visible         =   0   'False
      End
      Begin VB.Menu mnuFileBar2 
         Caption         =   "-"
      End
      Begin VB.Menu mnuFileExit 
         Caption         =   "Sair"
      End
   End
   Begin VB.Menu mnuEdit 
      Caption         =   "&Editar"
      Begin VB.Menu mnuSelect 
         Caption         =   "Selecionar"
      End
      Begin VB.Menu mnu_Reflesh 
         Caption         =   "Atualizar"
      End
      Begin VB.Menu mnuRecompose 
         Caption         =   "Recompor"
      End
      Begin VB.Menu mnuFileBar71 
         Caption         =   "-"
      End
      Begin VB.Menu mnuZoom 
         Caption         =   "Zoom Área"
         Shortcut        =   ^Z
      End
      Begin VB.Menu mnuMove 
         Caption         =   "Mover Visualização"
      End
      Begin VB.Menu mnuUndoView 
         Caption         =   "Voltar Visualização"
      End
      Begin VB.Menu mnuRedoView 
         Caption         =   "Avançar Visualização"
      End
      Begin VB.Menu mnuFileBar72 
         Caption         =   "-"
      End
      Begin VB.Menu mnuMinusZoom 
         Caption         =   "Menos Zoom"
      End
      Begin VB.Menu mnuMoreZoom 
         Caption         =   "Mais Zoom"
      End
      Begin VB.Menu mnuFileBar73 
         Caption         =   "-"
         Visible         =   0   'False
      End
      Begin VB.Menu mnuDeleteInc 
         Caption         =   "Excluir Pontos Inconcistentes"
         Visible         =   0   'False
      End
   End
   Begin VB.Menu mnuMapa 
      Caption         =   "&Mapa"
      Begin VB.Menu mnuDrawLineWater 
         Caption         =   "Desenhar Rede Água"
         Shortcut        =   ^L
      End
      Begin VB.Menu mnuMovePointWithLines 
         Caption         =   "Mover Componente c/ Rede"
      End
      Begin VB.Menu mnuDrawPointInLineWater 
         Caption         =   "Desenhar Componente na Rede"
         Shortcut        =   ^R
      End
      Begin VB.Menu mnuEditBar30 
         Caption         =   "-"
      End
      Begin VB.Menu mnuInsertDocs 
         Caption         =   "Inserir Documentos"
         Shortcut        =   ^D
      End
      Begin VB.Menu mnuEditBar80 
         Caption         =   "-"
      End
      Begin VB.Menu mnuDrawRamal 
         Caption         =   "Desenhar Ramal"
      End
      Begin VB.Menu mnusep1234 
         Caption         =   "-"
      End
      Begin VB.Menu mnuDeleteLineWater 
         Caption         =   "Excluir"
         Shortcut        =   ^X
      End
      Begin VB.Menu mnusep9999 
         Caption         =   "-"
      End
      Begin VB.Menu mnuCalcArea 
         Caption         =   "Calcular Área (m²)"
      End
      Begin VB.Menu mnuCalibrarZoom 
         Caption         =   "Calibrar Zoom"
      End
      Begin VB.Menu mnuDesenhaPoligono 
         Caption         =   "Desenhar Poligono"
      End
      Begin VB.Menu mnuCarregaPoligono 
         Caption         =   "Carregar Polígono"
      End
      Begin VB.Menu mnuDefEscala 
         Caption         =   "Definir Escala"
      End
      Begin VB.Menu mnuFixaIcone 
         Caption         =   "Fixar Ícone"
      End
      Begin VB.Menu mnusep0001 
         Caption         =   "-"
      End
      Begin VB.Menu mnu_Find_Object 
         Caption         =   "Encontrar Objeto"
      End
      Begin VB.Menu mnuEncontraTexto 
         Caption         =   "Encontrar Textos"
      End
      Begin VB.Menu mnuEncontraCoordenada 
         Caption         =   "Localizar Coordenadas"
      End
      Begin VB.Menu mnuLocConsumidores 
         Caption         =   "Localizar Consumidores"
      End
      Begin VB.Menu mnusep10000 
         Caption         =   "-"
      End
      Begin VB.Menu mnuSalvaImgMapa 
         Caption         =   "Salvar Imagem"
         Begin VB.Menu mnuBitmap 
            Caption         =   "BMP"
         End
         Begin VB.Menu mnuGIF 
            Caption         =   "GIF"
         End
         Begin VB.Menu mnuJPG 
            Caption         =   "JPG"
         End
         Begin VB.Menu mnuPNG 
            Caption         =   "PNG"
         End
         Begin VB.Menu mnuTIF 
            Caption         =   "TIF"
         End
      End
   End
   Begin VB.Menu mnuCadastros 
      Caption         =   "&Cadastros"
      Begin VB.Menu mnuTypes 
         Caption         =   "Tipos"
         Visible         =   0   'False
      End
      Begin VB.Menu mnuSuppliers 
         Caption         =   "Fornecedores"
      End
      Begin VB.Menu mnuManufacters 
         Caption         =   "Fabricantes"
      End
   End
   Begin VB.Menu mnuRel 
      Caption         =   "Relatórios"
      Begin VB.Menu MnuRelWl 
         Caption         =   "Rede de Água"
      End
      Begin VB.Menu MnuRelSl 
         Caption         =   "Rede de Esgoto"
      End
      Begin VB.Menu mnuRelRegistros 
         Caption         =   "Válvulas"
      End
      Begin VB.Menu mnuRelComponentesAgua 
         Caption         =   "Componentes de Água"
      End
      Begin VB.Menu mnuRelComponentesEsgoto 
         Caption         =   "Componentes de Esgoto"
      End
   End
   Begin VB.Menu mnuAdmin 
      Caption         =   "Administrar"
      Begin VB.Menu mnuRemoverPlano 
         Caption         =   "Remover Plano"
         Visible         =   0   'False
      End
      Begin VB.Menu mnuUsers 
         Caption         =   "Usuários"
      End
      Begin VB.Menu mnuSep113 
         Caption         =   "-"
      End
      Begin VB.Menu mnuSelectDatabase 
         Caption         =   "Banco de Dados"
      End
      Begin VB.Menu s999999 
         Caption         =   "-"
         Visible         =   0   'False
      End
      Begin VB.Menu mnudiagRede 
         Caption         =   "Diagnóstico de rede"
         Visible         =   0   'False
      End
      Begin VB.Menu mnusep 
         Caption         =   "-"
      End
      Begin VB.Menu mnuProdutividade 
         Caption         =   "Indicador de Produtividade"
         Begin VB.Menu mnuRedesAgua 
            Caption         =   "Redes de Água"
         End
         Begin VB.Menu mnuRamaisAgua 
            Caption         =   "Ligações de Água"
         End
         Begin VB.Menu mnusep1 
            Caption         =   "-"
         End
         Begin VB.Menu mnuRedesEsgoto 
            Caption         =   "Redes de Esgoto"
         End
      End
   End
   Begin VB.Menu mnuView 
      Caption         =   "&Janela"
      Begin VB.Menu mnuViewStatusBar 
         Caption         =   "Barra de Status"
         Checked         =   -1  'True
         Shortcut        =   ^B
      End
      Begin VB.Menu mnuViewToolbar 
         Caption         =   "Barra de Ferramentas"
         Checked         =   -1  'True
      End
      Begin VB.Menu mnuLayers 
         Caption         =   "Layers e Propriedades"
         Checked         =   -1  'True
      End
      Begin VB.Menu mnuSep016 
         Caption         =   "-"
      End
      Begin VB.Menu mnuCalculaZNo 
         Caption         =   "Calcular Z Nó Enquanto Desenha"
      End
      Begin VB.Menu mnuMultProperteis 
         Caption         =   "Propriedades Multiplas"
      End
      Begin VB.Menu mnuLoadAttributeByReference 
         Caption         =   "Carregar Attributos por Referência"
         Checked         =   -1  'True
      End
      Begin VB.Menu mnusep100 
         Caption         =   "-"
      End
      Begin VB.Menu mnuWindowCascade 
         Caption         =   "Cascata"
      End
      Begin VB.Menu mnuWindowTileHorizontal 
         Caption         =   "Alinhamento Horizontal"
      End
      Begin VB.Menu mnuWindowTileVertical 
         Caption         =   "Alinhamento Vertical"
      End
   End
   Begin VB.Menu mnuHelp 
      Caption         =   "&Ajuda"
      Begin VB.Menu mnuHelpContents 
         Caption         =   "Conteúdo"
         Shortcut        =   ^H
         Visible         =   0   'False
      End
      Begin VB.Menu mnuHelpBar0 
         Caption         =   "-"
         Visible         =   0   'False
      End
      Begin VB.Menu mnuHelpAbout 
         Caption         =   "Sobre"
         Shortcut        =   {F1}
      End
   End
End
Attribute VB_Name = "FrmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private TCanvas As frmCanvas
Const sglSplitLimit = 0

Private mbMoving        As Boolean
Private mstrprevfunc    As String
Private msngStartX      As Single

Dim conee As TeAcXConnection
Dim Abertura As Integer
Dim teac As TeAcXConnection
Dim a1 As TeImport
Dim a2 As TeDatabase




Private Sub cmdClose_Click()

   pctSfondo.Visible = False: mnuLayers.Checked = False
   
End Sub




Private Sub imgSplitter_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)

    msngStartX = X
    
    With imgSplitter
        picSplitter.Move .Left, .Top, .Width \ 2, .Height - 20
    End With
    
    picSplitter.Visible = True
    picSplitter.Height = pctSfondo.Height
    mbMoving = True
    
End Sub

Private Sub imgSplitter_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

    Dim sglPos As Single
    
    If mbMoving Then
        sglPos = X + imgSplitter.Left
        If sglPos < sglSplitLimit Then
        
            picSplitter.Left = sglSplitLimit
        ElseIf sglPos > Me.Width - sglSplitLimit Then
            picSplitter.Left = Me.Width - sglSplitLimit
        Else
            picSplitter.Left = sglPos
        End If
    End If
    
End Sub

Private Sub imgSplitter_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)

    pctSfondo.Width = pctSfondo.Width + msngStartX - X
    pctSfondo.Refresh
    picSplitter.Visible = False
    mbMoving = False
    MDIForm_Resize
    TabStrip1.Refresh
    
End Sub



Private Sub MDIForm_Activate()
   'MDIForm_Resize
End Sub
' Carrega o formulário principal. Rotina de entrada
'
'
Private Sub MDIForm_Load()
    Email.leConfiguracoesEmail                                  'lê as configurações de email para ele poder enviar mensagem de email para NEXUS caso ocorra um erro
    '''LoozeXP1.InitSubClassing
    Manager1.InitConn Conn, CInt(typeconnection)
    Manager1.GridVisibled False
    FrmMain.Timer1.Interval = 100                               'define o intervalo em que ele vai verificar se alguma tecla foi pressionada
    FrmMain.Timer1.Enabled = False                              'inicia com o timer desligado, só liga quando tiver cálculo intensivo
End Sub

Private Sub mnu_Find_Object_Click()
On Error GoTo Trata_Erro
   
   
   
   Dim Object_id_ As String, xmin As Double, ymin As Double, xmax As Double, ymax As Double
   
   Object_id_ = ""
   
   Object_id_ = InputBox("Informe o identificador do objeto", "Encontrar Objeto")
   
   If Trim(Object_id_) <> "" Then
      
      With ActiveForm.TCanvas
         .Normal
         If .addSelectObjectIds(Object_id_) = 1 Then
            .getSelectBox xmin, ymin, xmax, ymax
            .setWorld xmin - 1000, ymin - 1000, xmax + 1000, ymax + 1000
            .Select
            .setScale 1000
         Else
            MsgBox "Não foi encontrado a geometria referente ao atributo selecionado", vbExclamation
         End If
      End With
      
   End If
   
Trata_Erro:

If Err.Number = 0 Or Err.Number = 20 Then
   Resume Next
ElseIf Err.Number = 91 Then
    MsgBox "Não há mapa ativo.", vbInformation, "Geosan"
Else
   
   PrintErro CStr(Me.Name), "Private Sub mnu_Find_Object_Click", CStr(Err.Number), CStr(Err.Description), True
   
End If
   
End Sub

' Atualiza todas as cotas existentes com os valores da interpolação do MDT
'
'
'
Private Sub mnuAtualizaCotas_Click()
     Dim setaZs As New CAcertaZsDosNos
     
     varGlobais.pararExecucao = False               'indica que iniciará sem sem informar que deverá parar a execução
     FrmMain.Timer1.Enabled = True                  'habilita o timer
     setaZs.AtribuiZs                               'chama método para atualizar todas as cotas da cidade toda
     FrmMain.Timer1.Enabled = False                 'deshabilita o timer
End Sub

Private Sub mnuAtualizaNumCasaGps_Click()
    Dim consumidorGps As clsConsumidorControler
    Set consumidorGps = New clsConsumidorControler
    
    Call consumidorGps.AtualizaNumeroGpsCasas
End Sub

Private Sub mnuAutoLogin_Click()
   
   Close #1
   Open App.path & "\controles\AutoLogin.txt" For Output As #1
   Print #1, strUser
   Close #1
   MsgBox "Definido login automático para " & strUser, vbInformation, ""
   
End Sub



Private Sub mnuCalcArea_Click()
   
   ActiveForm.TCanvas.ToolTipText = ""
   
   ActiveForm.TCanvas.calculateArea
   
   
   
End Sub

Private Sub mnuCalibrarZoom_Click()
   Dim calibrazoom As New frmCalibrarZoom
   calibrazoom.Show 1
End Sub



Private Sub mnuEncontraCoordenada_Click()
On Error GoTo Trata_Erro
    Dim X As Double, Y As Double
   
    X = InputBox("Informe a Coordena X ")
    Y = InputBox("Informe a Coordena Y ")
    
    If X <> 0 And Y <> 0 Then
        ActiveForm.TCanvas.setWorld X - 50, Y - 50, X + 50, Y + 50
        ActiveForm.TCanvas.plotView
    End If

Trata_Erro:
If Err.Number = 0 Or Err.Number = 20 Then
   Resume Next

ElseIf Err.Number = 91 Or Err.Number = 13 Then
    'MsgBox "Não há mapa ativo.", vbInformation, "Geosan"
    Exit Sub
Else
   
   PrintErro CStr(Me.Name), "Public Function EncontraCoord()", CStr(Err.Number), CStr(Err.Description), True
   

End If

End Sub


Private Sub mnu_PatternCurves_Click()

   Dim frm As New frmEPANavegator
   
   frm.Init
   Set frm = Nothing
   
End Sub

Private Sub mnu_Reflesh_Click()

   tbToolBar_ButtonClick tbToolBar.Buttons("kplotview")
   
End Sub
' Exportação de consumidores
'
'
'
Private Sub mnuExpCon_Click()
    frmExportaConsumos.Show
End Sub
' Exporta a localização dos nós com as suas respectivas cotas
'
'
'
Private Sub mnuExportLocalNos_Click()
    On Error GoTo Trata_Erro
    Dim CAMINHO As String
    Dim rs As New ADODB.Recordset
    Dim TB_GEOMETRIA As String
    Dim a As String
    Dim b As String
    Dim c As String
    Dim d As String
    Dim e As String
    Dim f As String
    Dim g As String
    Dim h As String
    Dim i As String
    Dim j As String
    Dim k As String
    Dim l As String
    Dim nomeArquivo As New CArquivo                                                             'para o usuário selecionar onde será salvo o arquivo
        
    varGlobais.pararExecucao = False               'indica que iniciará sem sem informar que deverá parar a execução
    FrmMain.Timer1.Enabled = True                  'habilita o timer
    CAMINHO = nomeArquivo.SelecionaDiretorio                                                    'solicita ao usuário a seleção de um diretório
    CAMINHO = CAMINHO + "\" + nomeArquivo.prefixo + "LOCALIZAÇÃO_NOS_REDE_AGUA.txt"  'coloca um prefixo de data e hora em que o arquivo será gerado
    a = "geom_table"
    b = "te_representation"
    c = "geom_type"
    d = "layer_id"
    e = "te_layer"
    f = "name"
    g = "WATERCOMPONENTS"
    If frmCanvas.TipoConexao <> 4 Then
        'retornar a tabela de geometria de pontos
        rs.Open "SELECT GEOM_TABLE FROM TE_REPRESENTATION WHERE GEOM_TYPE = 4 AND LAYER_ID IN (SELECT LAYER_ID FROM TE_LAYER WHERE NAME = 'WATERCOMPONENTS')", Conn, adOpenDynamic, adLockReadOnly
        If rs.EOF = False Then
            TB_GEOMETRIA = rs!GEOM_TABLE
        Else
            MsgBox "Não foi encontrada a tabela de Geometrias.", vbInformation, ""
        Exit Sub
        End If
    Else
        'SELECT "geom_table" FROM "te_representation" WHERE "geom_type" = '4' AND "layer_id" IN (SELECT "layer_id" FROM "te_layer" WHERE "name" = 'WATERCOMPONENTS')
        rs.Open "SELECT " + """" + a + """" + " FROM " + """" + b + """" + " WHERE " + """" + c + """" + " = '4' AND " + """" + d + """" + " IN (SELECT " + """" + d + """" + " FROM " + """" + e + """" + " WHERE " + """" + f + """" + " = 'WATERCOMPONENTS')", Conn, adOpenDynamic, adLockOptimistic
        If rs.EOF = False Then
            TB_GEOMETRIA = rs!GEOM_TABLE
        Else
            MsgBox "Não foi encontrada a tabela de Geometrias.", vbInformation, ""
            Exit Sub
        End If
    End If
    rs.Close
    If frmCanvas.TipoConexao = 1 Then
        'SELECIONA DO BANCO DE DADOS O CÓDIGO DO NÓ, COORDENADAS E COTA ATUAL
        rs.Open "SELECT W.GROUNDHEIGHT AS " + """" + "COTA" + """" + ", LEN(P.OBJECT_ID) AS " + """" + "TAM" + """" + ", P.OBJECT_ID ,P.X,P.Y FROM " & TB_GEOMETRIA & " P JOIN WATERCOMPONENTS W ON P.OBJECT_ID = W.OBJECT_ID_ ORDER BY TAM, OBJECT_ID"
    ElseIf frmCanvas.TipoConexao = 2 Then
        rs.Open "SELECT W.GROUNDHEIGHT AS " + """" + "COTA" + """" + ", P.OBJECT_ID AS " + """" + "TAM" + """" + ", P.OBJECT_ID ,P.X,P.Y FROM " & TB_GEOMETRIA & " P JOIN WATERCOMPONENTS W ON P.OBJECT_ID = W.OBJECT_ID_ ORDER BY TAM, OBJECT_ID"
    Else
        a = "INITIALGROUNDHEIGHT"
        b = "object_id"
        c = "x"
        d = "y"
        e = "WATERCOMPONENTS"
        f = LCase(TB_GEOMETRIA)
        g = "OBJECT_ID_"
        rs.Open "SELECT " + """" + e + """" + "." + """" + a + """" + " AS " + """" + "COTA" + """" + ", " + """" + f + """" + "." + """" + b + """" + " AS " + """" + "TAM" + """" + ", " + """" + f + """" + "." + """" + b + """" + " ," + """" + f + """" + "." + """" + c + """" + ", " + """" + f + """" + "." + """" + d + """" + " FROM  " + """" + f + """" + " JOIN " + """" + e + """" + "ON" + """" + f + """" + "." + """" + b + """" + " = " + """" + e + """" + "." + """" + g + """" + " ORDER BY " + """" + "TAM" + """" + ", " + """" + b + """" + "", Conn, adOpenDynamic, adLockOptimistic
    End If
    Screen.MousePointer = vbHourglass
    Open CAMINHO For Output As #1
    Print #1, "IDENTIFICADOR;COORD_X;COORD_Y;COTA"
    Do While Not rs.EOF = True
        DoEvents                                                                'para o VB poder escutar o timer e poder parar o processamento caso a tecla ESC tenha sido pressionada
        If varGlobais.pararExecucao = True Then
            varGlobais.pararExecucao = False
            Screen.MousePointer = vbDefault
            FrmMain.Timer1.Enabled = False                                      'deshabilita o timer
            Close #1
            rs.Close
            Exit Sub
        End If
        FrmMain.sbStatusBar.Panels(2).Text = "Nó: " & rs!object_id              'mostra na barra de status o nó que está sendo exportado
        Print #1, rs!object_id & ";" & rs!X & ";" & rs!Y & ";" & rs!cota
        rs.MoveNext
    Loop
    Close #1
    rs.Close
    Screen.MousePointer = vbDefault
    FrmMain.Timer1.Enabled = False                                              'deshabilita o timer
    MsgBox "Arquivo exportado em " & CAMINHO & ".", vbInformation, "Exportação Concluída!"
    Exit Sub
    
Trata_Erro:
    If Err.Number = 0 Or Err.Number = 20 Then
        Resume Next
    Else
       Screen.MousePointer = vbDefault
       FrmMain.Timer1.Enabled = False                                           'deshabilita o timer
       ErroUsuario.Registra "FrmMain", "mnuExportLocalNos_Click", CStr(Err.Number), CStr(Err.Description), True, glo.enviaEmails
    End If
End Sub

Private Sub mnuBitmap_Click()
   SalvaImagem "BMP"
End Sub

Private Sub mnuLocConsumidores_Click()
   frmEncontraConsumidor.Show 1
End Sub

Private Sub mnuPNG_Click()
   SalvaImagem "PNG"
End Sub

Private Sub mnuGIF_Click()
   SalvaImagem "GIF"
End Sub

Private Sub mnuJPG_Click()
   SalvaImagem "JPG"
End Sub



Private Sub mnuTIF_Click()
   SalvaImagem "TIF"
End Sub

Private Function SalvaImagem(tipo As String)
On Error GoTo saida





If FrmMain.Tag = "0" Then
   
   MsgBox "É necessário um mapa para realizar esta função.", vbInformation, ""
   GoTo saida
End If

Dim TP As ImageType
Dim strCaminho As String
   
   'TP = "a"
   
   'PREPARA O FILTRO DO COMPONENTE DE LOCALIZAÇÃO DE ARQUIVOS
   If tipo = "BMP" Then
      Me.cmmSalvaImg.Filter = ".BMP|*.BMP"
      TP = 1 '= BMP
   ElseIf tipo = "GIF" Then
      Me.cmmSalvaImg.Filter = ".GIF|*.GIF"
      TP = 2 '= GIF
   ElseIf tipo = "JPG" Then
      Me.cmmSalvaImg.Filter = ".JPG|*.JPG"
      TP = 3 '= JPG
   ElseIf tipo = "PNG" Then
      Me.cmmSalvaImg.Filter = ".PNG|*.PNG"
      TP = 4 '= PNG
   ElseIf tipo = "TIF" Then
      Me.cmmSalvaImg.Filter = ".TIF|*.TIF"
      TP = 5 '= TIF
   End If
   
   'ABRE O CPMPONENTE DE LOCALIZAÇÃO DE ARQUIVOS
   Me.cmmSalvaImg.ShowOpen
   
   strCaminho = Me.cmmSalvaImg.FileName
         
   'SE NÃO FOI DEFINIDO UM CAMINHO, SAI DA FUNÇÃO
   If Trim(strCaminho) = "" Then
      GoTo saida
   End If
   
   'SALVA O ARQUIVO DE ACORDO COM O TIPO ESCOLHIDO
   'If tipo = "JPG" Then
      If TCanvas.TCanvas.saveImageToFile(strCaminho, TP) Then
         MsgBox "Imagem salva com sucesso!"

      Else
         MsgBox "Falha ao salvar imagem!"
      End If
   
saida:
   If Err.Number = 0 Or Err.Number = 20 Then
      Resume Next
   Else
      
      PrintErro CStr(Me.Name), "Private Function SalvaImagem(tipo As String)", CStr(Err.Number), CStr(Err.Description), True
      Err.Clear

   End If
End Function

Private Sub mnuFixaIcone_Click()
On Error GoTo Trata_Erro

    With ActiveForm.TCanvas
        
        If .fixedPoint = False Then
            .fixedPoint = True
            
            mnuFixaIcone.Checked = True
            
            Call WriteINI("MAPA", "FIXAR_ICONE", "SIM", App.path & "\CONTROLES\GEOSAN.INI")
            
        Else
            .fixedPoint = False
            mnuFixaIcone.Checked = False
            
            Call WriteINI("MAPA", "FIXAR_ICONE", "NAO", App.path & "\CONTROLES\GEOSAN.INI")
            
        End If
        .plotView
        
    End With
Trata_Erro:

End Sub


Private Sub mnuDefEscala_Click()
On Error GoTo Trata_Erro

   Dim Scala As String
   
   Scala = InputBox("Informe o valor: ", "Definição de Escala")
   
   If IsNumeric(Scala) Then
      canvasScale = CDbl(Scala)
   Else
      MsgBox "Valor inválido.", vbInformation, ""
   End If


Trata_Erro:
If Err.Number = 0 Or Err.Number = 20 Then
   Resume Next
Else
   MsgBox Err.Number & " - " & Err.Description
End If

End Sub


Private Sub mnuCalcularRede_Click()

   Dim MyComponents As String
   
   With ActiveForm.TCanvas
      If .getCurrentLayer = "WATERLINES" Then
         If .getSelectCount(2) > 0 Then
            If obtemRede(ActiveForm.TCanvas) = True Then
               openForm
            End If
         Else
            MsgBox "Selecione a rede a ser calculada", vbExclamation
         End If
      Else
         .setCurrentLayer "WATERLINES"
         MsgBox "Somente é possivel calcular a rede selecionando os tubos", vbExclamation
      End If
   End With

End Sub

Private Sub mnuChangePassword_Click()

    
    frmTrocaSenha.txtUsuario.Text = strUser
    frmTrocaSenha.txtUsuario.Locked = True
    frmTrocaSenha.Show 1

'   Set Sec = CreateObject("NSecurity.AppMode")
'   If Sec.OpenUserChangePwd(Conn, Usuario.UsrId) Then
'      MsgBox "Senha alterada com sucesso", vbInformation
'   End If
'   Set Sec = Nothing
'
End Sub

Private Sub mnuDeleteInc_Click()

   ActiveForm.CorrigeBug
   
End Sub

Private Sub mnuDeleteLineWater_Click()

   tbToolBar_ButtonClick tbToolBar.Buttons("kdelete")
   
End Sub

Private Sub mnuDrawLineWater_Click()

   tbToolBar_ButtonClick tbToolBar.Buttons("kdrawnetworkline")
   
End Sub

Private Sub mnuDrawPointInLineWater_Click()

   tbToolBar_ButtonClick tbToolBar.Buttons("kinsertnetworknode")
   
End Sub

Private Sub mnuDrawRamal_Click()

   tbToolBar_ButtonClick tbToolBar.Buttons("kdrawramal")
   
End Sub

Private Sub mnuEncontraTexto_Click()
    'frmCanvas.TimerSetWorld.Enabled = True
    frmEncontraTexto.Show 1
    
End Sub

Private Sub mnuExpAutoCad_Click()

    Dim frm As New FrmExport
   
    'Se nao houver canvas aberto não é possivel exportar nada...
    If FrmMain.Tag > 0 Then
        frm.Init Conn, ActiveForm.TCanvas, Me
    Else
        MsgBox "Não é possível exportar quando não existe uma área de trabalho do mapa.", vbInformation, "Atenção!"
    End If
   
    'Set frm = Nothing
   
End Sub

Private Sub mnuExpCRD_Click()
On Error GoTo mnuExpCRD_Click_err

   Shell App.path & "\Ferramentas\Exporte EPANet.exe", vbNormalFocus
   Exit Sub


mnuExpCRD_Click_err:
   MsgBox "Programa Exporte EPANet.exe não encontrado", vbExclamation, ""
   'Resume
End Sub

Private Sub mnuFileExit_Click()

   End
   Close
   
End Sub



Private Sub mnuGroups_Click()

   Set Sec = CreateObject("NSecurity.AppMode")
   Sec.OpenGroups Conn
   Set Sec = Nothing
   
End Sub

Private Sub mnuHelpAbout_Click()

   frmAbout.Show
   
End Sub

Private Sub mnuImagem_Click()

    'Se nao houver canvas aberto não é possivel exportar nada...
    If FrmMain.Tag > 0 Then
        With Cdl
           .FileName = ""
           .Filter = "Bitmap (*.bmp)|*.bmp | GIF (*.gif) | *.gif | JPG (*.jpg) | *.jpg | PNG (*.png) | *.png | TIF (*.tif) | *.tif"
           .ShowOpen
           If .FileName <> "" Then
              ActiveForm.TCanvas.saveImageToFile Cdl.FileName, .FilterIndex - 1
           End If
        End With
    Else
        MsgBox "Não é possível exportar quando não existe uma área de trabalho do mapa.", vbInformation, "Atenção!"
    End If
   
End Sub

Private Sub mnuImpCotas_Click()
   frmImportarCotas.Show 1
End Sub

Public Function Conecta()

Dim mPROVEDOR As String
Dim mSERVIDOR As String
Dim mPORTA As String
Dim mBANCO As String
Dim mUSUARIO As String
Dim Senha As String
Dim decriptada As String
If frmCanvas.TipoConexao <> 4 Then

   
   
   TeImport1.Provider = typeconnection
   TeImport1.connection = Conn
   
   TeDatabase1.Provider = typeconnection
   TeDatabase1.connection = Conn

Else




'Set teac = TeAcXConnection1
If frmCanvas.POSTB <> 10 Then
mSERVIDOR = ReadINI("CONEXAO", "SERVIDOR", App.path & "\CONTROLES\GEOSAN.ini")
mPORTA = ReadINI("CONEXAO", "PORTA", App.path & "\CONTROLES\GEOSAN.ini")
mBANCO = ReadINI("CONEXAO", "BANCO", App.path & "\CONTROLES\GEOSAN.ini")
mUSUARIO = ReadINI("CONEXAO", "USUARIO", App.path & "\CONTROLES\GEOSAN.ini")
Senha = ReadINI("CONEXAO", "SENHA", App.path & "\CONTROLES\GEOSAN.ini")
frmCanvas.FunDecripta (Senha)
decriptada = frmCanvas.Senha

'If TeAcXConnection1.Open = False Then

 TeAcXConnection1.Open mUSUARIO, decriptada, mBANCO, mSERVIDOR, mPORTA
 ' End If

 
 TeImport1.Provider = typeconnection
   TeImport1.connection = TeAcXConnection1.objectConnection_
   
   TeDatabase1.Provider = typeconnection
   TeDatabase1.connection = TeAcXConnection1.objectConnection_
  frmCanvas.POST2B (10)
'   Else
   
  '' a1.Provider = typeconnection
  ' a1.connection = teac.objectConnection_
   
  ' a2.Provider = typeconnection
  ' a2.connection = teac.objectConnection_
   End If
End If

End Function

Private Sub mnuImportDXF_Click()
   

  ' Set a1 = TeImport1
 ' Set a2 = TeDatabase1
   
Dim frm As New frmImportDxf

Conecta

   
        frm.Init Conn, TeImport1, TeDatabase1
   Set frm = Nothing
   'changeSelIntersectionPoint
End Sub

Private Sub mnuImportSIG_Click()
   
   Dim frm As New frmImportFile
   
   'Dim a1 As TeImport
  ' Dim a2 As TeDatabase
  ' Set a1 = TeImport1
 ' Set a2 = TeDatabase1
   

   
Conecta
   

      frm.Init Conn, TeImport1, TeDatabase1
   Set frm = Nothing
   
End Sub

Private Sub mnuInsertDocs_Click()

   tbToolBar_ButtonClick tbToolBar.Buttons("kinsertdoc")
   
End Sub

Private Sub mnuInsertLabel_Click()

   FrmCreatTextForLayer.Init
   
End Sub

Private Sub mnuLayers_Click()
   
   Dim rs As ADODB.Recordset
Dim a, b, c As String
   Set rs = New ADODB.Recordset
a = "USRLOG"
b = "USRFUN"
c = "SYSTEMUSERS"



   If frmCanvas.TipoConexao <> 4 Then
   rs.Open "SELECT USRLOG, USRFUN FROM SYSTEMUSERS WHERE USRLOG = '" & strUser & "' ORDER BY USRLOG", Conn, adOpenDynamic, adLockReadOnly
   Else
   rs.Open "SELECT " + """" + a + """" + "," + """" + b + """" + " FROM " + """" + c + """" + " WHERE " + """" + a + """" + " = '" & strUser & "' ORDER BY " + """" + a + """" + "", Conn, adOpenDynamic, adLockOptimistic
   End If
   If rs.EOF = False Then
      If rs!UsrFun = 4 Then  'VISUALIZADOR
         
         frmLoginTema.Show 1
                  
         'pctSfondo.Visible = True
      Else
      
         pctSfondo.Visible = Not mnuLayers.Checked
         mnuLayers.Checked = Not mnuLayers.Checked
      
      End If
   End If
   rs.Close
   

   
End Sub

Private Sub mnuLoadAttributeByReference_Click()

   mnuLoadAttributeByReference.Checked = Not mnuLoadAttributeByReference.Checked
   
End Sub

Private Sub mnuManufacters_Click()

   FrmManufactures.Show
   
End Sub

Private Sub mnuMinusZoom_Click()
 
   tbToolBar_ButtonClick tbToolBar.Buttons("kzoomin")
   
End Sub

Private Sub mnuMoreZoom_Click()

   tbToolBar_ButtonClick tbToolBar.Buttons("kzoomout")
   
End Sub

Private Sub mnuMove_Click()

   tbToolBar_ButtonClick tbToolBar.Buttons("kpan")
   
End Sub

Private Sub mnuMovePointWithLines_Click()

   tbToolBar_ButtonClick tbToolBar.Buttons("kmovenetworknode")
   
End Sub

Private Sub mnuMultProperteis_Click()

   mnuMultProperteis.Checked = Not mnuMultProperteis.Checked
   
End Sub
'Indica se é para calcular ou não a cota Z do nó enquanto estiver desenhando. Caso não exista o layer MDT ainda esta função é muito útil
'
Private Sub mnuCalculaZNo_Click()
    mnuCalculaZNo.Checked = Not mnuCalculaZNo.Checked
    If mnuCalculaZNo.Checked = True Then            'Indica se a aplicação deve calcular ou não o Z do nó enquanto o usuário está desenhando a rede
        varGlobais.deveCalcularZNo = True
    Else
        varGlobais.deveCalcularZNo = False
    End If
End Sub



Private Sub mnuRecompose_Click()
   tbToolBar_ButtonClick tbToolBar.Buttons("krecompose")
End Sub

Private Sub mnuRamaisAgua_Click()
    frmIndicProdutRamaisAgua.Show 1
End Sub

Private Sub mnuRedesAgua_Click()
    
    frmIndicProdutRedesDeAgua.TipoRede = "AGUA"
    frmIndicProdutRedesDeAgua.Show 1
    
    
End Sub

Private Sub mnuRedesEsgoto_Click()
    
    frmIndicProdutRedesDeAgua.TipoRede = "ESGOTO"
    frmIndicProdutRedesDeAgua.Show 1
    
End Sub

Private Sub mnuRedoView_Click()

   tbToolBar_ButtonClick tbToolBar.Buttons("kredoview")
   
End Sub

Private Sub mnuRelComponentesAgua_Click()

   GeraRelatorioHtm ComponentsRede, "watercomponents"
   
End Sub

Private Sub mnuRelComponentesEsgoto_Click()

   GeraRelatorioHtm ComponentsRede, "sewercomponents"
   
End Sub

Private Sub mnuRelComponentsWaterFilter_Click()

   GeraRelatorioHtm ComponentsRede, "watercomponents", True
   
End Sub

Private Sub mnuRelRegistros_Click()

   GeraRelatorioHtm RegistrosEstadoEstado, ""
   
End Sub

Private Sub MnuRelSl_Click()

   OpenReport "sewer"
   
End Sub

Private Sub MnuRelWl_Click()

   OpenReport "water"
   
End Sub

Private Sub mnuRemoverPlano_Click()

   FrmRemoverPlano.Show vbModal
   
End Sub

Private Sub mnuSELECT_Click()

   tbToolBar_ButtonClick tbToolBar.Buttons("kselection")
   
End Sub
' Redireciona para outro banco de dados geográfico, modificando a configuração do GEOSAN.INI
'
'
'
Private Sub mnuSELECTDatabase_Click()
    On Error GoTo Trata_Erro
    Dim cn As ADODB.connection, nC As Object
    
    'FrmConnection.Show (1)
    Set nC = CreateObject("NexusConnection.App")
    If nC.appNewRegistry(App.EXEName, cn) Then
        Conn.Close
        'Set Conn = cn
        'Shell App.path & "\" & App.EXEName & ".exe"
        MsgBox "Banco de dados redirecionado com sucesso." & Chr(13) & Chr(13) & "Reinicie o sistema para ativar.", vbInformation
        'Set cn = Nothing
        End
    End If
    Exit Sub
      
Trata_Erro:
    If Err.Number = 0 Or Err.Number = 20 Then
        Resume Next
    Else
       ErroUsuario.Registra "FrmMain", "mnuSELECTDatabase_Click", CStr(Err.Number), CStr(Err.Description), True, glo.enviaEmails
    End If
End Sub

Private Sub mnuSuppliers_Click()

   FrmSuppliers.Show
   
End Sub



Private Sub mnuTypes_Click()

   FrmSelectTypes.Init
   
End Sub

Private Sub mnuUndoView_Click()

   tbToolBar_ButtonClick tbToolBar.Buttons("kundoview")
   
End Sub
'Exporta as redes do GeoSan
'
'
Private Sub mnuExporta_GeoSan_Click()
    On Error GoTo Trata_Erro
    Dim retorno As Boolean
    Dim conexao As New ADODB.connection
    Dim diretorio As String                                                                                 'diretório para onde serão exportados os arquivos shape
    Dim prefixoArquivo As String                                                                            'prefixo com as datas, dos arquivos shp que serão exportados
    Dim nomeCompleto As String
    Dim nomeExportar As String
    Dim existemConsumidoresParaExportar As Boolean
  
    varGlobais.pararExecucao = False                            'indica que iniciará sem sem informar que deverá parar a execução
    diretorio = arquivo.SelecionaDiretorio
    If diretorio = "falhou" Then
        'MsgBox "Cancelada a seleção do diretório."
        Exit Sub
    End If
    prefixoArquivo = arquivo.prefixo
    nomeCompleto = diretorio + "\" + prefixoArquivo
    FrmMain.Timer1.Enabled = True                               'habilita o timer para permitir o usuário cancelar esta operação
    Screen.MousePointer = vbHourglass
    
    'exporta consumidores
    exp.InsereTabAtributoConsumidores
    exp.CriaTabelaConsumidores
    existemConsumidoresParaExportar = exp.InsereConsumidores    'insere os consumidores na tabela GS_CONSUMIDORES, para poder a partir dela exportar para shp
    If varGlobais.pararExecucao = True Then                     'usuário selecionou para parar tudo
        Exit Sub
    End If
    If existemConsumidoresParaExportar = True Then              'se a tabela GS_CONSUMIDORES foi preechida com todos os consumidores, exporta o shape.
        exp.AtivaExportacaoConsumidores
        conexao.Open Conn
        TeExport2.Provider = 1
        TeExport2.connection = conexao
        FrmMain.sbStatusBar.Panels(2).Text = "Criando shape de consumidores. Favor aguardar ..."            'mostra na barra de status o andamento da exportação
        nomeExportar = nomeCompleto & "gsConsumidores.shp"
        retorno = TeExport2.exportSHP(nomeExportar, "RAMAIS_AGUA", "GS_CONSUMIDORES")
        Screen.MousePointer = vbNormal
        If retorno Then
            'MsgBox "Exportação shape de ramais realizada com sucesso"
        Else
            MsgBox "Falha na exportação dos consumidores"
        End If
        conexao.Close
    Else
        ErroUsuario.Registra "FrmMain", "Exporta_Consumidores", CStr(Err.Number), CStr(Err.Description), False, glo.enviaEmails
    End If
    
    'exporta ramais
    exp.InsereTabAtributoRamais
    exp.CriaTabelaRamais
    exp.InsereRamais
    If varGlobais.pararExecucao = True Then                     'usuário selecionou para parar tudo
        Exit Sub
    End If
    exp.AtivaExportacaoRamais
    conexao.Open Conn
    TeExport2.Provider = 1
    TeExport2.connection = conexao
    FrmMain.sbStatusBar.Panels(2).Text = "Criando shape de ramais. Favor aguardar ..."                      'mostra na barra de status o andamento da exportação
    nomeExportar = nomeCompleto + "gsRamais.shp"
    retorno = TeExport2.exportSHP(nomeExportar, "RAMAIS_AGUA", "GS_RAMAIS")
    Screen.MousePointer = vbNormal
    If retorno Then
        'MsgBox "Exportação shape de ramais realizada com sucesso"
    Else
        MsgBox "Falha na exportação dos ramais."
    End If
    conexao.Close
        
    'prepara tabelas e atributos para exportar as redes
    exp.InsereTabAtributoRedes
    exp.CriaTabelaRedes
    exp.InsereRedes
    If varGlobais.pararExecucao = True Then                                                                 'usuário selecionou para parar tudo
        Exit Sub
    End If
    'exporta redes para o formato shape
    conexao.Open Conn
    TeExport2.Provider = 1
    TeExport2.connection = conexao
    FrmMain.sbStatusBar.Panels(2).Text = "Criando shape de redes. Favor aguardar ..."                       'mostra na barra de status o andamento da exportação
    nomeExportar = nomeCompleto + "gsRedes.shp"
    retorno = TeExport2.exportSHP(nomeExportar, "WATERLINES", "GS_REDES")
    Screen.MousePointer = vbNormal
    If retorno Then
        'MsgBox "Exportação shape de redes realizada com sucesso"
    Else
        MsgBox "Falha na exportação"
    End If
    conexao.Close
    
    'prepara tabelas e atributos para exportar os nós
    exp.InsereTabAtributoNos
    exp.CriaTabelaNos
    exp.InsereNos
    If varGlobais.pararExecucao = True Then                                                                 'usuário selecionou para parar tudo
        Exit Sub
    End If
    'exporta nós
    conexao.Open Conn
    TeExport2.Provider = 1
    TeExport2.connection = conexao
    exp.AtivaExportacaoNos
    FrmMain.sbStatusBar.Panels(2).Text = "Criando shape de nós. Favor aguardar ..."                         'mostra na barra de status o andamento da exportação
    nomeExportar = nomeCompleto + "gsNos.shp"
    retorno = TeExport2.exportSHP(nomeExportar, "WATERCOMPONENTS", "GS_NOS")
    exp.DesativaExportacaoNos
    Screen.MousePointer = vbNormal
    If retorno Then
        'MsgBox "Exportação dos nós realizada com sucesso"
    Else
        MsgBox "Falha na exportação"
    End If
    exp.AtivaRamaisGeoSan                                   'reativa te_representation, senão os ramais com os nós (ligações) não voltam a aparecer no GeoSan
    conexao.Close
    FrmMain.sbStatusBar.Panels(2).Text = "Exportação finalizada."
    FrmMain.Timer1.Enabled = False                          'deshabilita o timer
    Exit Sub
    
Trata_Erro:
    If Err.Number = 0 Or Err.Number = 20 Then
        Resume Next
    Else
        FrmMain.Timer1.Enabled = False                      'deshabilita o timer
        exp.AtivaRamaisGeoSan                               'reativa te_representation, senão os ramais com os nós (ligações) não voltam a aparecer no GeoSan
        ErroUsuario.Registra "FrmMain", "mnuExporta_GeoSan_Click", CStr(Err.Number), CStr(Err.Description), True, glo.enviaEmails
    End If
End Sub
' Atualiza os consumos médios nas ligações e distribui as demandas nos nós das redes
'
'
'
Private Sub mnuUpdate_Demand_Click()
    frmAtualizacaoConsumo.Show 1
End Sub

Private Sub mnuUsers_Click()

'   Set Sec = CreateObject("NSecurity.AppMode")
'   Sec.OpenUsers Conn
'   Set Sec = Nothing
   
   frmUserControle.Show 1
   'FrmUser.Show 1
   
End Sub



Private Sub mnuViewStatusBar_Click()

   sbStatusBar.Visible = Not mnuViewStatusBar.Checked
   mnuViewStatusBar.Checked = Not mnuViewStatusBar.Checked
   
End Sub

Private Sub mnuViewToolbar_Click()

   tbToolBar.Visible = Not mnuViewToolbar.Checked
   mnuViewToolbar.Checked = Not mnuViewToolbar.Checked
   
End Sub

Private Sub mnuWindowCascade_Click()

   Me.Arrange vbCascade
   
End Sub

Private Sub mnuWindowTileHorizontal_Click()

   Me.Arrange vbTileHorizontal
   
End Sub

Private Sub mnuWindowTileVertical_Click()

   Me.Arrange vbTileVertical
   
End Sub

Private Sub mnuZoom_Click()

   tbToolBar_ButtonClick tbToolBar.Buttons("kzoomarea")
   
End Sub

Private Sub OdImport_Click()
   
   Form1.Show 1
   
End Sub

Private Sub pctSfondo_Resize()

   SizeControls
   
End Sub

Private Sub MDIForm_Resize()

   SizeControls
   
End Sub
' Esta rotina controla a correta visualização do tamanho do gerenciador de propriedades, tree e itens perto dos mesmos
'
'
'
Public Sub SizeControls()
    On Error GoTo Trata_Erro
                                                                                        'a variável pctSfondo representa o lado esquerdo do gerenciador de propriedades
    With TabStrip1                                                                      'é a tab superior com as opções de tree e propriedades
        .Height = IIf(pctSfondo.Height < .Top, 100, pctSfondo.Height - .Top)
        .Width = IIf(pctSfondo.Width < .Left, 100, pctSfondo.Width - .Left)
    End With
    With Manager1                                                                       'gerenciador de propriedades
        .Width = IIf(pctSfondo.Width < .Left, 10, pctSfondo.Width - (.Left + 100))
        .Height = IIf(pctSfondo.Height < .Top, 10, pctSfondo.Height - (.Top + 100))
        .Resize pctSfondo.Width - 400, pctSfondo.Height - 1400
        .Top = 1340
        .Left = 300
    End With
    With ViewManager1                                                                   'gerenciador de tree
        .Width = IIf(pctSfondo.Width < .Left, 10, pctSfondo.Width - (.Left + 100))
        .Height = IIf(pctSfondo.Height < .Top, 10, pctSfondo.Height - (.Top + 100))
        .Top = 1350
        .Left = 300
    End With
    picSplitter.Height = pctSfondo.Height                                               'separador das duas colunas do gerenciador de propriedades
    imgSplitter.Height = pctSfondo.Height                                               'outro separador
    cmdClose.Left = pctSfondo.Width - 300                                               'ícone X de fechar
    cmdClose.Top = pctSfondo.Top - 350
    FrameEscala.Width = pctSfondo.Width - 300                                           'label da escala de visualização
    txtEscala.Width = pctSfondo.Width - 2350                                            'texto da escala de visualização
    Exit Sub
Trata_Erro:
    If Err.Number = 0 Or Err.Number = 20 Then
        Resume Next
    ElseIf Err.Number = 380 Then
        Exit Sub
    Else
        PrintErro CStr(Me.Name), "Public Sub SizeControls()", CStr(Err.Number), CStr(Err.Description), True
    End If
End Sub

Private Sub MDIForm_Unload(Cancel As Integer)

On Error GoTo Trata_Erro
    
    
   If FrmMain.ViewManager1.mConn.State = 1 Then
      FrmMain.ViewManager1.mConn.Close
   End If
    
    If Conn.State = 1 Then
      Conn.Close
    End If
    

    Set Conn = Nothing
    'LoozeXP1.EndWinXPCSubClassing
    End
   
Trata_Erro:
    If Err.Number = 0 Or Err.Number = 20 Then
        Resume Next
    Else
    
         'PrintErro CStr(Me.Name), "Private Sub MDIForm_Unload", CStr(Err.Number), CStr(Err.Description), True
         
    
    End If

End Sub
' Opção do menu de ícones que abre uma janela de desenho de mapa.
' Entra nesta rotina quando o usuário seleciona a ícone de que deseja uma nova janela de desenho
'
'
'
Private Sub mnuOpen_Click()
    Set TCanvas = New frmCanvas
    TCanvas.Init Conn, usuario.UseName
End Sub





Private Sub TabStrip1_Click()

   If TabStrip1.SelectedItem.index = 2 Then
      Manager1.Visible = True
      'Tv.Visible = False
      ViewManager1.Visible = False
   Else
      Manager1.Visible = False
      'Tv.Visible = True
      ViewManager1.Visible = True
   End If
   
End Sub

' Monitoramento dos eventos da barra de ícones. Evento de clique na barra de ferramentas
' Fica aguardando o usuário selecionar uma das ícones na barra de menu de ícones
' Caso a janela de desenho (canvas) não estiver aberto, não faz nada ainda
' Caso esteja aberta a seleção da ícone
' Caso selecione que é para abrir uma nova janela de desenho (canvas), abre a mesma
'
' Button - botão que foi selecionado pelo usuário
'
Public Sub tbToolBar_ButtonClick(ByVal Button As MSComctlLib.Button)
'If blnMonitorar = True Then
    On Error GoTo Trata_Erro
    Select Case Button.key
        Case "knew", ""
           mnuOpen_Click
        Case Else
           If Not ActiveForm Is Nothing Then
              If ActiveForm.Name = "frmCanvas" Then         'se o canvas de mapas está na tela
                  ActiveForm.Tb_SELECT Button.key           'indica a ativação do botão que foi selecionado
              End If
           End If
    End Select
    Exit Sub
Trata_Erro:
    If Err.Number = 0 Or Err.Number = 20 Then
        Resume Next
    ElseIf Err.Number = 91 Then
        Err.Clear
        Exit Sub
    Else
        PrintErro CStr(Me.Name), "Não está encontrando o botão a ser selecionado em Public Sub tbToolBar_ButtonClick()", CStr(Err.Number), CStr(Err.Description), True
    End If
End Sub
'Foi comentado pois não estava sendo utilizado.
'Também não chamava o frm1TePrinter



'Private Sub TePrinter_Click()
'
'   'frmPrint As New frm1TePrinter
'
'   frmTePrinter.Show 1
'
'
'End Sub
' Configura um timer para caso o usuário selecione a tecla ESC ele pare a execução
'
' varGlobais.pararExecucao - contem a informação que deve ser configurada na rotina que deseja-se cancelar a execução. Lembrando-se de colocar um Doevents antes. Veja o exemplo abaixo
' o intervalo do timer está definido no MDIForm_Load
'
'DoEvents                                                            'para o VB poder escutar o timer e poder parar o processamento caso a tecla ESC tenha sido pressionada
'If varGlobais.pararExecucao = True Then
'    varGlobais.pararExecucao = False
'    Screen.MousePointer = vbNormal
'    Exit Sub
'End If
'
' O timer deve ser habilitado antes de entrar na rotina que requer cálculo intensivo. Veja o exemplo abaixo:
'FrmMain.Timer1.Enabled = True                               'habilita o timer
'
Private Sub Timer1_Timer()
    If GetAsyncKeyState(VK_ESCAPE) Then
        MsgBox ("Comando cancelado.")
        varGlobais.pararExecucao = True
    End If
End Sub

Private Sub txtEscala_KeyPress(KeyAscii As Integer)

'AO RECEBER UM COMANDO ENTER, É FORÇADO UM LOST_FOCUS

If KeyAscii = 13 Then
   
   txtEscala_LostFocus
   
End If

End Sub

Private Sub txtEscala_LostFocus()

   If IsNumeric(Me.txtEscala.Text) = True Then
 
      canvasScale = CDbl(Me.txtEscala.Text)
   
   End If
   
End Sub


Private Sub ViewManager1_onReset(ViewName As String)
On Error GoTo Trata_Erro

   Dim a As Integer, LayerNameStr As String
   
   For a = 1 To tbToolBar.Buttons.count
      If tbToolBar.Buttons.Item(a).Style = tbrCheck Then
         tbToolBar.Buttons(a).value = tbrUnpressed
      End If
   Next
   
   
   strLayerAtivo = TCanvas.TCanvas.getCurrentLayer
   
   With Me.ActiveForm.TCanvas
      For a = 0 To .getLayersToSnapCount() - 1
         If .getLayerToSnap(a, LayerNameStr) = 1 Then
            .removeLayerToSnap LayerNameStr
         End If
      Next
   End With
   
   tbToolBar.Buttons("kselection").value = tbrPressed
   
   Me.ActiveForm.Caption = "Vista: " & ViewName
   sbStatusBar.Panels(1).Text = "Modo de seleção: Selecione um objeto do plano referente ao tema ativo"

Trata_Erro:
    If Err.Number = 0 Or Err.Number = 20 Then
        Resume Next
    Else
        
        PrintErro CStr(Me.Name), "Private Sub ViewManager1_onReset", CStr(Err.Number), CStr(Err.Description), True
        
        
    End If
End Sub

Private Sub mnuCarregaPoligono_Click()


On Error GoTo Trata_Erro

   Dim rs As ADODB.Recordset
   Dim strsql As String
   
   blnPoligonoVirtual = False
   Dim a, b, c, d, e, f As String
   Set rs = New ADODB.Recordset
a = "layer_id"
b = "geom_table"
c = "te_representation"
d = "geom_type"
e = "te_layer"
f = "name"




     If frmCanvas.TipoConexao <> 4 Then
   strsql = "SELECT TL.LAYER_ID,TL.NAME,TR.GEOM_TABLE FROM TE_LAYER TL INNER JOIN TE_REPRESENTATION TR ON TL.LAYER_ID = TR.LAYER_ID WHERE TR.GEOM_TYPE = 1 AND TL.NAME = '" & strLayerAtivo & "'"
   Else
   strsql = "SELECT " + """" + e + """" + "." + """" + a + """" + "," + """" + e + """" + "." + """" + f + """" + "," + """" + c + """" + "." + """" + b + """" + " FROM " + """" + e + """" + " INNER JOIN " + """" + c + """" + " ON " + """" + e + """" + "." + """" + a + """" + " = " + """" + c + """" + "." + """" + a + """" + " WHERE " + """" + c + """" + "." + """" + d + """" + " = '1' AND " + """" + e + """" + "." + """" + f + """" + "= '" & strLayerAtivo & "'"
   End If
   
   
   
'MsgBox "ARQUIVO DEBUG SALVO"
 'WritePrivateProfileString "A", "A", strsql, App.path & "\DEBUG.INI"
 
   rs.Open strsql, Conn, adOpenDynamic, adLockOptimistic
   
   If rs.EOF = False Then
   
a = "object_id"
b = LCase(rs!GEOM_TABLE)



      If frmCanvas.TipoConexao <> 4 Then
      strsql = "SELECT COUNT(OBJECT_ID) AS " + """" + "QTD" + """" + " FROM " & rs!GEOM_TABLE
      Else
      strsql = "SELECT COUNT(" + """" + a + """" + ") AS " + """" + "QTD" + """" + " FROM " + """" + b + """" + ""
      End If
      rs.Close
      rs.Open strsql, Conn, adOpenDynamic, adLockOptimistic
      If rs!qtd = 0 Then
         MsgBox "O plano ativo não possui polígonos.", vbInformation, ""
         rs.Close
         Exit Sub
      End If
      rs.Close
      Me.MousePointer = vbHourglass
      frmAtualizarSetores.Show 1
      Me.MousePointer = vbDefault
   
   Else
      MsgBox "O plano ativo não possui polígonos.", vbInformation, ""
      rs.Close
   End If
   
Trata_Erro:
    If Err.Number = 0 Or Err.Number = 20 Then
        Resume Next
    Else
         
         PrintErro CStr(Me.Name), "mnuCarregaPoligono_Click()", CStr(Err.Number), CStr(Err.Description), True
         
        
    End If

End Sub
' Permite o usuário desenhar um polígono que irá selecionar no mapa várias redes e consumidores para relatórios e exportação para o EPANET
'
'
''
Private Sub mnuDesenhaPoligono_Click()
    If ActiveForm.Name = "frmCanvas" Then
        ActiveForm.Tb_SELECT "mnuPoligono"
    End If
End Sub