/usr/lib/libreoffice/share/extensions/DmathsAddon/OOoGdmath/RepereCode.xba is in libreoffice-dmaths 3.4+dfsg1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="RepereCode" script:language="StarBasic">'OOoGdmath
'Copyright (C) 2005-2009 Gilles Daurat
'This program is free software; you can redistribute it and/or
'modify it under the terms of the GNU General Public License
'as published by the Free Software Foundation; either version 2
'of the License, or (at your option) any later version.ReperePoint
'This program is distributed in the hope that it will be useful,
'but WITHOUT ANY WARRANTY; without even the implied warranty of
'MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
'GNU General Public License for more details.
'You should have received a copy of the GNU General Public License
'along with this program; if not, write to the Free Software
'Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Option Explicit
Dim oRepereForm as Object
Dim AncienneListe As Integer
Dim IndiceSerie As Integer
Dim LesListes(0 To 4) As String
Dim UnVecteur As String
Dim posx, posy, xmin, xmax, ymin, ymax, dx, dy, angleaxe As Double
Dim NbPoint as integer
Dim NbDroite as Integer
Dim NbCourbe as Integer
Dim iListeVisible as Integer
Sub Main
dim i, unNom
on error resume next
oRepereForm=LoadDialog("OOoGdmath","RepereForm")
ChangeTitreDialog(oRepereForm)
RepereForm_UserForm_Activate()
' RestaureForm(oRepereForm)
oRepereForm.Model.Step=1
oRepereForm.Execute()
End Sub
Function SigneDerivee(MaFonction, x1, pasb) As Integer
Dim UneFonction$, Defini, y0, y1
UneFonction$ = MaFonction
RemplaceX UneFonction$, x1 - Min(pasb / 2, 0.0001)
Defini = 1
y0 = CalculeFonction(UneFonction$, Defini)
UneFonction$ = MaFonction
RemplaceX UneFonction$, x1 + Min(pasb / 2, 0.0001)
Defini = 1
y1 = CalculeFonction(UneFonction$, Defini)
SigneDerivee = Sgn(y1 - y0)
End Function
Function CalculeDerivee(MaFonction, x1) As Double
Dim UneFonction$, Defini, y0, y1
UneFonction$ = MaFonction
RemplaceX UneFonction$, x1 - 0.00001
Defini = 1
y0 = CalculeFonction(UneFonction$, Defini)
UneFonction$ = MaFonction
RemplaceX UneFonction$, x1 + 0.00001
Defini = 1
y1 = CalculeFonction(UneFonction$, Defini)
CalculeDerivee = (y1 - y0) / 0.00002
End Function
Sub ChercheChangementDerivee(MaFonction, signe, x1, pasb)
Dim x2, SigneSuivant
pasb = 0.1
Do
Do
pasb = pasb / 10
x2 = x1 + pasb
SigneSuivant = SigneDerivee(MaFonction, x2, pasb)
Loop While (SigneSuivant <> 0) And (SigneSuivant * signe <> 1) And (pasb > 0.00000000001)
x1 = x2
pasb = pasb * 10
Loop While (pasb > 0.0000000001) And (SigneSuivant <> 0)
If SigneSuivant <> 0 Then x1 = x1 + pasb
End Sub
Sub ChercheChangement(MaFonction, aDefini, ix, pasb, x1, Optional suivantx as Boolean)
Dim UneFonction$, Defini, y1
Dim Trouve As Boolean
Dim i
if ismissing(suivantx) then suivantx=False
x1 = ix + pasb
i = ix
pasb = 0.1
Do
Do
UneFonction$ = MaFonction
RemplaceX UneFonction$, i
Defini = 1
y1 = CalculeFonction(UneFonction$, Defini)
If (suivantx) Then
If Defini = 1 And (y1 > xmax Or y1 < xmin) Then Defini = 0
Else
If Defini = 1 And (y1 > ymax Or y1 < ymin) Then Defini = 0
End If
If Defini <> aDefini Then
If pasb < 0.000001 Then
Trouve = True
Exit Do
Else
Exit Do
End If
End If
i = i + pasb
Loop While (i < x1)
If Trouve Then Exit Do
If pasb > 0.0000001 Then
i = i - pasb
pasb = pasb / 10
End If
Loop While (pasb > 0.0000001)
If Trouve Then x1 = i
' x1 = ix
' pasb = 0.1
' Do
' Do
' pasb = pasb / 10
' x1 = ix + pasb
' If Abs(x1) < 0.000001 Then x1 = 0
' UneFonction$ = MaFonction
' RemplaceX UneFonction$, x1
' Defini = 1
' y1 = CalculeFonction(UneFonction$, Defini)
' If (suivantx) Then
' If Defini = 1 And (y1 > xmax Or y1 < xmin) Then Defini = 0
' Else
' If Defini = 1 And (y1 > ymax Or y1 < ymin) Then Defini = 0
' End If
' Loop While (aDefini <> Defini) And (pasb > 0.000001)
' ix = x1
' pasb = pasb * 10
' Loop While (pasb > 0.00001)
' x1 = ix - pasb
End Sub
Private Sub MiseAJourRepere()
xmin = oRepereForm.Model.TextBox4.Text
RemplaceVirgulePoint xmin
xmin = Val(xmin)
If xmin = Int(xmin) Then xmin = xmin - 0.5
xmax = oRepereForm.Model.TextBox5.Text
RemplaceVirgulePoint xmax
xmax = Val(xmax)
If xmax = Int(xmax) Then xmax = xmax + 0.5
ymin = oRepereForm.Model.TextBox6.Text
RemplaceVirgulePoint ymin
ymin = Val(ymin)
If ymin = Int(ymin) Then ymin = ymin - 0.5
ymax = oRepereForm.Model.TextBox7.Text
RemplaceVirgulePoint ymax
ymax = Val(ymax)
If ymax = Int(ymax) Then ymax = ymax + 0.5
End Sub
Function ListeVisible() As String
ListeVisible() = "ListBox" & trim(str(iListeVisible+7))
End Function
Private Sub ExtraitDroitePoint(texte$, i, a, b, c, eqdroite$)
Dim x0, y0, x1, y1, fa$, ptf, fc$
i = -1
If InStr(1, texte$, "(") <> 0 And InStr(1, texte$, ")") <> 0 Then
ExtraitSegmentPoint texte$, i, x0, y0, x1, y1
If i <> -1 Then
If x1 = x0 Then
a = 1
b = 0
c = -x0
eqdroite$ = "x=" & Trim(Str(x0))
Else
a = (y1 - y0) / (x1 - x0)
b = -1
c = y1 - a * x1
fa$ = ""
If Int(a) <> a Then
fa$ = Trim(Str(a))
TrouveFraction fa$
ptf = InStr(1, fa$, "/")
If ptf Then
fa$ = Left$(fa$, ptf - 1) & "x/" & Right$(fa$, Len(fa$) - ptf)
Else
fa$ = fa$ & "x"
End If
End If
fc$ = ""
If Int(c) <> c Then
fc$ = Trim(Str(c))
TrouveFraction fc$
End If
eqdroite$ = "y=" & MIif(fa$ = "", MIif(a = 0 Or a = 1, "", Trim(Str(a))) & "x", fa$) & MIif(c < 0, "", MIif(a = 0, "", "+")) & MIif(fc$ = "", Trim(Str(c)), fc$)
End If
End If
End If
End Sub
Private Sub ExtraitSegmentPoint(texte$, i, x0, y0, x1, y1)
Dim Ext1, Ext2, ntrouve, j, k, np$, xx, yy
Ext1 = Mid$(texte$, 2, 1)
Ext2 = Mid$(texte$, 3, 1)
ntrouve = 0
For j = 0 To ListCount(oRepereForm, "ListBox1") - 1
k = 1
ExtraitPoint GetList(oRepereForm, "ListBox1", j), k, np$, xx, yy
If Ext1 = np$ Then
ntrouve = ntrouve + 1
x0 = xx
y0 = yy
End If
If Ext2 = np$ Then
ntrouve = ntrouve + 1
x1 = xx
y1 = yy
End If
Next j
If ntrouve = 2 Then
i = 1
Else
i = -1
End If
End Sub
Private Sub VideCombo()
Clear(oRepereForm,"ListBox1")
Clear(oRepereForm,"ListBox2")
Clear(oRepereForm,"ListBox3")
Clear(oRepereForm,"ListBox4")
Clear(oRepereForm,"ListBox5")
Clear(oRepereForm,"ListBox6")
Clear(oRepereForm,"ListBox7")
Clear(oRepereForm,"ListBox8")
Clear(oRepereForm,"ListBox9")
Clear(oRepereForm,"ListBox10")
Clear(oRepereForm,"ListBox11")
Clear(oRepereForm,"ComboBox2")
Clear(oRepereForm,"ComboBox3")
Clear(oRepereForm,"ComboBox4")
Clear(oRepereForm,"ComboBox9")
Clear(oRepereForm,"ComboBox10")
Clear(oRepereForm,"ComboBox11")
Clear(oRepereForm,"ComboBox12")
Clear(oRepereForm,"ComboBox13")
Clear(oRepereForm,"ComboBox14")
Clear(oRepereForm,"ComboBox15")
Clear(oRepereForm,"ComboBox16")
Clear(oRepereForm,"ComboBox17")
Clear(oRepereForm,"ComboBox18")
Clear(oRepereForm,"ComboBox19")
Clear(oRepereForm,"ComboBox20")
Clear(oRepereForm,"ComboBox22")
Clear(oRepereForm,"ComboBox23")
Clear(oRepereForm,"ComboBox24")
Clear(oRepereForm,"ComboBox25")
Clear(oRepereForm,"ComboBox29")
Clear(oRepereForm,"ComboBox30")
Clear(oRepereForm,"ComboBox31")
Clear(oRepereForm,"ComboBox32")
Clear(oRepereForm,"ComboBox33")
Clear(oRepereForm,"ComboBox34")
Clear(oRepereForm,"ComboBox35")
Clear(oRepereForm,"ComboBox36")
Clear(oRepereForm,"ComboBox37")
Clear(oRepereForm,"ComboBox38")
Clear(oRepereForm,"ComboBox39")
Clear(oRepereForm,"ComboBox40")
Clear(oRepereForm,"ComboBox41")
End Sub
Private Sub RepereForm_CheckBox1_Click()
Dim a
a = Not (oRepereForm.Model.CheckBox1.State = 1)
oRepereForm.Model.Label2.Enabled = a
oRepereForm.Model.Label3.Enabled = a
oRepereForm.Model.TextBox2.Enabled = a
oRepereForm.Model.TextBox3.Enabled = a
End Sub
Private Sub RepereForm_CheckBox10_Click()
' ComboBox37.List(ListBox4.ListIndex) = IIf(oRepereForm.Model.CheckBox10.State, "V", "F")
End Sub
Private Sub RepereForm_CheckBox11_Click()
oRepereForm.Model.OptionButton1.Enabled = (oRepereForm.Model.CheckBox11.State = 1)
oRepereForm.Model.OptionButton2.Enabled = (oRepereForm.Model.CheckBox11.State = 1)
ComboBox41.List(ComboBox40.ListIndex) = oRepereForm.Model.TextBox16.Text & ";" & oRepereForm.Model.TextBox17.Text & ";" & oRepereForm.Model.TextBox18.Text & ";" & oRepereForm.Model.CheckBox11.State & ";" & oRepereForm.Model.OptionButton1.State & ";" & oRepereForm.Model.OptionButton2.State & ";" & Trim(Str(oRepereForm.Model.Image8.Backgroundcolor)) & ";" & oRepereForm.Model.Image8.HelpText & ";" & Trim(Str(ComboBox39.ListIndex)) & ";" & Trim(Str(oRepereForm.Model.Image9.Backgroundcolor)) & ";" & oRepereForm.Model.Image9.HelpText
End Sub
Private Sub RepereForm_CheckBox19_Click()
' If ListBox6.ListIndex > -1 Then ComboBox29.List(ListBox6.ListIndex) = IIf(oRepereForm.Model.CheckBox19.State, "V", "F")
End Sub
Private Sub RepereForm_CheckBox2_Click()
oRepereForm.Model.CheckBox12.Enabled = (oRepereForm.Model.CheckBox222.State=1)
oRepereForm.Model.CheckBox13.Enabled = (oRepereForm.Model.CheckBox222.State=1)
oRepereForm.Model.CheckBox14.Enabled = (oRepereForm.Model.CheckBox222.State=1)
oRepereForm.Model.CheckBox12.State = 1
oRepereForm.Model.CheckBox13.State = 0
oRepereForm.Model.CheckBox14.State = 0
End Sub
Private Sub RepereForm_CheckBox20_Click()
' If ListBox6.ListIndex > -1 Then ComboBox30.List(ListBox6.ListIndex) = IIf(oRepereForm.Model.CheckBox20.State, "V", "F")
End Sub
Private Sub RepereForm_CheckBox21_Click()
' If ListBox6.ListIndex > -1 Then ComboBox31.List(ListBox6.ListIndex) = IIf(oRepereForm.Model.CheckBox21.State, "V", "F")
End Sub
Private Sub RepereForm_CheckBox22_Click()
oRepereForm.Model.CheckBox23.Enabled = oRepereForm.Model.CheckBox22.State
oRepereForm.Model.CheckBox24.Enabled = oRepereForm.Model.CheckBox22.State
oRepereForm.Model.TextBox15.Enabled = oRepereForm.Model.CheckBox22.State
End Sub
Private Sub RepereForm_CheckBox29_Click()
oRepereForm.Model.TextBox33.Enabled = oRepereForm.Model.CheckBox29.State
End Sub
Private Sub RepereForm_CheckBox3_Click()
oRepereForm.Model.CheckBox15.Enabled = (oRepereForm.Model.CheckBox3.State=1)
oRepereForm.Model.CheckBox16.Enabled = (oRepereForm.Model.CheckBox3.State=1)
oRepereForm.Model.CheckBox17.Enabled = (oRepereForm.Model.CheckBox3.State=1)
oRepereForm.Model.CheckBox15.State = 1
oRepereForm.Model.CheckBox16.State = 0
oRepereForm.Model.CheckBox17.State = 0
End Sub
Private Sub RepereForm_CheckBox4_Click()
oRepereForm.Model.CheckBox6.State = MIif(oRepereForm.Model.CheckBox4.State Or oRepereForm.Model.CheckBox5.State,1,0)
If oRepereForm.Model.CheckBox4.State And oRepereForm.Model.CheckBox5.State Then
oRepereForm.Model.CheckBox7.State = MIif(oRepereForm.Model.CheckBox4.State And oRepereForm.Model.CheckBox5.State,1,0)
End If
End Sub
Private Sub RepereForm_CheckBox40_Click()
Polices.Enabled = (Not oRepereForm.Model.CheckBox40.State)
Taille.Enabled = (Not oRepereForm.Model.CheckBox40.State)
SpinTaille.Enabled = (Not oRepereForm.Model.CheckBox40.State)
Gras.Enabled = (Not oRepereForm.Model.CheckBox40.State)
Italique.Enabled = (Not oRepereForm.Model.CheckBox40.State)
Souligne.Enabled = (Not oRepereForm.Model.CheckBox40.State)
Couleur.Enabled = (Not oRepereForm.Model.CheckBox40.State)
End Sub
Private Sub RepereForm_CheckBox5_Click()
oRepereForm.Model.CheckBox6.State = MIif(oRepereForm.Model.CheckBox4.State Or oRepereForm.Model.CheckBox5.State,1,0)
If oRepereForm.Model.CheckBox4.State And oRepereForm.Model.CheckBox5.State Then
oRepereForm.Model.CheckBox7.State = MIif(oRepereForm.Model.CheckBox4.State And oRepereForm.Model.CheckBox5.State,1,0)
End If
End Sub
Private Sub RepereForm_CheckBox8_Click()
' If ListBox1.ListIndex > -1 Then ComboBox35.List(ListBox1.ListIndex) = IIf(oRepereForm.Model.CheckBox8.State, "V", "F")
End Sub
Private Sub RepereForm_CheckBox9_Click()
' If ListBox1.ListIndex > -1 Then ComboBox36.List(ListBox1.ListIndex) = IIf(oRepereForm.Model.CheckBox9.State, "V", "F")
End Sub
Private Sub RepereForm_ComboBox25_Change()
' If ListBox1.ListIndex > -1 Then ComboBox38.List(ListBox1.ListIndex) = Trim(Str(ComboBox25.ListIndex))
End Sub
Private Sub RepereForm_ComboBox39_Change()
If GetListIndex(oRepereForm, "ComboBox40") > -1 Then RemplaceItem(oRepereForm, "ComboBox41", GetListIndex(oRepereForm, "ComboBox40"), oRepereForm.Model.TextBox16.Text & ";" & oRepereForm.Model.TextBox17.Text & ";" & oRepereForm.Model.TextBox18.Text & ";" & oRepereForm.Model.CheckBox11.State & ";" & oRepereForm.Model.OptionButton1.State & ";" & oRepereForm.Model.OptionButton2.State & ";" & Trim(Str(oRepereForm.Model.Image8.Backgroundcolor)) & ";" & oRepereForm.Model.Image8.HelpText & ";" & Trim(Str(GetListIndex(oRepereForm, "ComboBox39"))) & ";" & Trim(Str(oRepereForm.Model.Image9.Backgroundcolor)) & ";" & oRepereForm.Model.Image9.HelpText
End Sub
Private Sub RepereForm_ComboBox40_Change()
Dim arg() As String
Dim texte$
If AncienneListe > -1 Then RemplaceItem(oRepereForm, "ComboBox41", AncienneListe, oRepereForm.Model.TextBox16.Text & ";" & oRepereForm.Model.TextBox17.Text & ";" & oRepereForm.Model.TextBox18.Text & ";" & oRepereForm.Model.CheckBox11.State & ";" & oRepereForm.Model.OptionButton1.State & ";" & oRepereForm.Model.OptionButton2.State & ";" & Trim(Str(oRepereForm.Model.Image8.Backgroundcolor)) & ";" & oRepereForm.Model.Image8.HelpText & ";" & Trim(Str(GetListIndex(oRepereForm, "ComboBox39"))) & ";" & Trim(Str(oRepereForm.Model.Image9.Backgroundcolor)) & ";" & oRepereForm.Model.Image9.HelpText
iListeVisible = GetListIndex(oRepereForm, "ComboBox40")
oRepereForm.GetControl("ListBox7").Visible = (iListeVisible = 0 )
oRepereForm.GetControl("ListBox8").Visible = (iListeVisible = 1 )
oRepereForm.GetControl("ListBox9").Visible = (iListeVisible = 2 )
oRepereForm.GetControl("ListBox10").Visible = (iListeVisible = 3 )
oRepereForm.GetControl("ListBox11").Visible = (iListeVisible = 4 )
If ListCount(oRepereForm, "ComboBox41") > 0 And GetListIndex(oRepereForm, "ComboBox40") > -1 Then
texte$ = GetList(oRepereForm, "ComboBox41", GetListIndex(oRepereForm, "ComboBox40"))
Else
texte$ = oRepereForm.Model.TextBox16.Text & ";" & oRepereForm.Model.TextBox17.Text & ";" & oRepereForm.Model.TextBox18.Text & ";" & oRepereForm.Model.CheckBox11.State & ";" & oRepereForm.Model.OptionButton1.State & ";" & oRepereForm.Model.OptionButton2.State & ";" & Trim(Str(oRepereForm.Model.Image8.Backgroundcolor)) & ";" & oRepereForm.Model.Image8.HelpText & ";" & Trim(Str(GetListIndex(oRepereForm, "ComboBox39"))) & ";" & Trim(Str(oRepereForm.Model.Image9.Backgroundcolor)) & ";" & oRepereForm.Model.Image9.HelpText
End If
ChargeParametre texte$, arg
oRepereForm.Model.TextBox16.Text = arg(0)
oRepereForm.Model.TextBox17.Text = arg(1)
oRepereForm.Model.TextBox18.Text = arg(2)
oRepereForm.Model.CheckBox11.State = arg(3)
oRepereForm.Model.OptionButton1.State = arg(4)
oRepereForm.Model.OptionButton2.State = arg(5)
oRepereForm.Model.Image8.Backgroundcolor = Val(arg(6))
oRepereForm.Model.Image8.HelpText = arg(7)
SetListIndex(oRepereForm, "ComboBox39", Val(arg(8)))
oRepereForm.Model.Image9.Backgroundcolor = Val(arg(9))
oRepereForm.Model.Image9.HelpText = arg(10)
AncienneListe = GetListIndex(oRepereForm, "ComboBox40")
End Sub
Private Sub RepereForm_CommandButton24_Click()
Dim uneListe, ErreurFenetre, i, UneFonction$, Defini, j, xx, yy
If IndiceSerie < 4 Then
ComboBox40.ListIndex = IndiceSerie
uneListe = ListeVisible
LesListes(IndiceSerie) = uneListe
IndiceSerie = IndiceSerie + 1
ComboBox41.AddItem oRepereForm.Model.TextBox16.Text & ";" & oRepereForm.Model.TextBox17.Text & ";" & oRepereForm.Model.TextBox18.Text & ";" & oRepereForm.Model.CheckBox11.State & ";" & oRepereForm.Model.OptionButton1.State & ";" & oRepereForm.Model.OptionButton2.State & ";" & Trim(Str(oRepereForm.Model.Image8.Backgroundcolor)) & ";" & oRepereForm.Model.Image8.HelpText & ";" & Trim(Str(ComboBox39.ListIndex)) & ";" & Trim(Str(oRepereForm.Model.Image9.Backgroundcolor)) & ";" & oRepereForm.Model.Image9.HelpText
ErreurFenetre = False
For i = Val(oRepereForm.Model.TextBox16.Text) To Val(oRepereForm.Model.TextBox16.Text) + Val(oRepereForm.Model.TextBox17.Text) - 1
UneFonction$ = oRepereForm.Model.TextBox18.Text
RemplaceX UneFonction$, i
Defini = -1
j = CalculeFonction(UneFonction$, Defini)
If Defini Then
If xx < xmin Or xx > xmax Or yy < ymin Or yy > ymax Then
ErreurFenetre = True
Else
uneListe.AddItem "(" & Trim(Str(i)) & ";" & Trim(Str(j)) & ")"
If uneListe.ListCount > 0 Then uneListe.ListIndex = uneListe.ListCount - 1
End If
End If
Next i
If ErreurFenetre Then
MsgBoxP ("message11")
rem MsgBox "Certains points n'ont pas été ajoutés car ils ne pourront pas être" & Chr(13) & "tracés dans le repère indiqué." & Chr(13) & Chr(13) & "Changez les limites du repère (onglet Repère)."
End If
Else
MsgBoxP ("message13")
rem MsgBox "Vous ne pouvez insérer que 5 séries !"
End If
End Sub
Private Sub RepereForm_CommandButton25_Click()
Dim uneListe As String
Dim i, j
uneListe = ListeVisible
If ListCount(oRepereForm, uneListe) > 0 Then
Clear(oRepereForm, uneListe)
For i = ListIndex(oRepereForm, "ComboBox40") To IndiceSerie - 2
For j = 1 To ListCount(oRepereForm, LesListes(i + 1))
Add(oRepereForm, LesListes(i), List(oRepereForm, LesListes(i + 1), j - 1))
Next j
Clear(oRepereForm, LesListes(i + 1))
Next i
RemoveItem(oRepereForm, "ComboBox41", ListIndex(oRepereForm, "ComboBox40"))
Else
MsgBoxP ("message14")
rem MsgBox "Je ne peux pas supprimer une série vide !"
End If
End Sub
Private Sub RepereForm_CommandButton26_Click()
Dim uneListe As String
Dim ErreurFenetre, i, UneFonction$, Defini, j, xx, yy
uneListe = LesListes(GetListIndex(oRepereForm, "ComboBox40"))
Clear(oRepereForm, uneListe)
RemplaceItem(oRepereForm, "ComboBox41", GetListIndex(oRepereForm, "ComboBox40"), oRepereForm.Model.TextBox16.Text & ";" & oRepereForm.Model.TextBox17.Text & ";" & oRepereForm.Model.TextBox18.Text & ";" & oRepereForm.Model.CheckBox11.State & ";" & oRepereForm.Model.OptionButton1.State & ";" & oRepereForm.Model.OptionButton2.State & ";" & Trim(Str(oRepereForm.Model.Image8.Backgroundcolor)) & ";" & oRepereForm.Model.Image8.HelpText & ";" & Trim(Str(GetListIndex(oRepereForm, "ComboBox39"))) & ";" & Trim(Str(oRepereForm.Model.Image9.Backgroundcolor)) & ";" & oRepereForm.Model.Image9.HelpText
ErreurFenetre = False
For i = Val(oRepereForm.Model.TextBox16.Text) To Val(oRepereForm.Model.TextBox16.Text) + Val(oRepereForm.Model.TextBox17.Text) - 1
UneFonction$ = oRepereForm.Model.TextBox18.Text
RemplaceX UneFonction$, i
Defini = -1
j = CalculeFonction(UneFonction$, Defini)
If Defini Then
If xx < xmin Or xx > xmax Or yy < ymin Or yy > ymax Then
ErreurFenetre = True
Else
Add(oRepereForm, uneListe, "(" & Trim(Str(i)) & ";" & Trim(Str(j)) & ")")
If ListCount(oRepereForm, uneListe) > 0 Then SetListIndex(oRepereForm, uneListe, ListCount(oRepereForm, uneListe) - 1)
End If
End If
Next i
If ErreurFenetre Then
MsgBoxP ("message11")
rem MsgBox "Certains points n'ont pas été ajoutés car ils ne pourront pas être" & Chr(13) & "tracés dans le repère indiqué." & Chr(13) & Chr(13) & "Changez les limites du repère (onglet Repère)."
End If
End Sub
Private Sub RepereForm_CommandButton27_Click()
Dim uneListe As String
Dim texte$, i, np$, xx, yy
uneListe = ListeVisible
texte$ = "(" & oRepereForm.Model.TextBox19.Text & ";" & oRepereForm.Model.TextBox30.Text & ")"
i = 1
ExtraitPoint texte$, i, np$, xx, yy
If i <> -1 Then
If xx < xmin Or xx > xmax Or yy < ymin Or yy > ymax Then
MsgBoxP ("message11")
rem MsgBox "Le point que vous voulez ajouter ne pourra pas être" & Chr(13) & "tracé dans le repère indiqué." & Chr(13) & Chr(13) & "Changez les limites du repère (onglet Repère)."
Else
RemplaceItem oRepereForm, uneListe, GetListIndex(oRepereForm, uneListe) ,texte$
End If
End If
End Sub
Private Sub RepereForm_CommandButton28_Click()
Dim uneListe As String
Dim texte$, i, np$, xx, yy
uneListe = ListeVisible
texte$ = "(" & oRepereForm.Model.TextBox19.Text & ";" & oRepereForm.Model.TextBox30.Text & ")"
i = 1
ExtraitPoint texte$, i, np$, xx, yy
If i <> -1 Then
If xx < xmin Or xx > xmax Or yy < ymin Or yy > ymax Then
MsgBoxP ("message11")
rem MsgBox "Le point que vous voulez ajouter ne pourra pas être" & Chr(13) & "tracé dans le repère indiqué." & Chr(13) & Chr(13) & "Changez les limites du repère (onglet Repère)."
Else
Add(oRepereForm, uneListe, texte$, GetListIndex(oRepereForm, uneListe) + 1)
End If
End If
End Sub
Private Sub RepereForm_CommandButton29_Click()
Dim uneListe As String
uneListe = ListeVisible
If GetListIndex(oRepereForm, uneListe) > -1 Then SupprimeItem(oRepereForm, uneListe, GetListIndex(oRepereForm, uneListe))
End Sub
Private Sub RepereForm_CommandButton30_Click()
Clear(oRepereForm, "ListBox1")
Clear(oRepereForm, "ComboBox18")
Clear(oRepereForm, "ComboBox19")
Clear(oRepereForm, "ComboBox20")
Clear(oRepereForm, "ComboBox35")
Clear(oRepereForm, "ComboBox36")
Clear(oRepereForm, "ComboBox38")
End Sub
Private Sub RepereForm_CommandButton31_Click()
Clear(oRepereForm, "ListBox2")
Clear(oRepereForm, "ComboBox15")
Clear(oRepereForm, "ComboBox16")
Clear(oRepereForm, "ComboBox17")
Clear(oRepereForm, "ComboBox32")
Clear(oRepereForm, "ComboBox33")
Clear(oRepereForm, "ComboBox34")
End Sub
Private Sub RepereForm_CommandButton32_Click()
Clear(oRepereForm, "ListBox3")
Clear(oRepereForm, "ComboBox12")
Clear(oRepereForm, "ComboBox13")
Clear(oRepereForm, "ComboBox14")
End Sub
Private Sub RepereForm_CommandButton33_Click()
Clear(oRepereForm, "ListBox4")
Clear(oRepereForm, "ComboBox9")
Clear(oRepereForm, "ComboBox10")
Clear(oRepereForm, "ComboBox11")
Clear(oRepereForm, "ComboBox37")
Clear(oRepereForm, "ComboBox44")
End Sub
Private Sub RepereForm_CommandButton34_Click()
Clear(oRepereForm, "ListBox5")
Clear(oRepereForm, "ComboBox2")
Clear(oRepereForm, "ComboBox3")
Clear(oRepereForm, "ComboBox4")
Clear(oRepereForm, "ComboBox42")
Clear(oRepereForm, "ComboBox43")
Clear(oRepereForm, "ComboBox45")
Clear(oRepereForm, "ComboBox46")
Clear(oRepereForm, "ComboBox47")
End Sub
Private Sub RepereForm_CommandButton35_Click()
Clear(oRepereForm, "ListBox6")
Clear(oRepereForm, "ComboBox22")
Clear(oRepereForm, "ComboBox23")
Clear(oRepereForm, "ComboBox24")
End Sub
Private Sub RepereForm_CommandButton36_Click()
Clear(oRepereForm, ListeVisible())
End Sub
Private Sub RepereForm_CommandButton37_Click()
Clear(oRepereForm, "ComboBox40")
Clear(oRepereForm, "ComboBox41")
End Sub
Private Sub RepereForm_Image10_Click()
ChangeCouleur oRepereForm.Model.Image10
End Sub
Private Sub RepereForm_Image11_Click()
ChangeCouleur oRepereForm.Model.Image11
End Sub
Private Sub RepereForm_Image12_Click()
ChangeCouleur oRepereForm.Model.Image12
End Sub
Private Sub RepereForm_Image13_Click()
ChangeCouleur oRepereForm.Model.Image13
End Sub
Private Sub RepereForm_Image14_Click()
ChangeCouleur oRepereForm.Model.Image14
End Sub
Private Sub RepereForm_Image15_Click()
ChangeCouleur oRepereForm.Model.Image15
End Sub
Private Sub RepereForm_Image16_Click()
ChangeCouleur oRepereForm.Model.Image16
End Sub
Private Sub RepereForm_Image17_Click()
ChangeCouleur oRepereForm.Model.Image17
End Sub
Private Sub RepereForm_Image18_Click()
ChangeCouleur oRepereForm.Model.Image18
End Sub
Private Sub RepereForm_Image19_Click()
ChangeCouleur oRepereForm.Model.Image19
End Sub
Private Sub RepereForm_Image20_Click()
ChangeCouleur oRepereForm.Model.Image20
End Sub
Private Sub RepereForm_Image21_Click()
ChangeCouleur oRepereForm.Model.Image21
End Sub
Private Sub RepereForm_Image22_Click()
ChangeCouleur oRepereForm.Model.Image22
End Sub
Private Sub RepereForm_Image23_Click()
ChangeCouleur oRepereForm.Model.Image23
End Sub
Private Sub RepereForm_Couleur_Click()
ChangeCouleur Couleur
End Sub
Private Sub RepereForm_Image9_Click()
ChangeCouleur oRepereForm.Model.Image9
RemplaceItem(oRepereForm, "ComboBox41", GetListIndex(oRepereForm, "ComboBox40"), oRepereForm.Model.TextBox16.Text & ";" & oRepereForm.Model.TextBox17.Text & ";" & oRepereForm.Model.TextBox18.Text & ";" & oRepereForm.Model.CheckBox11.State & ";" & oRepereForm.Model.OptionButton1.State & ";" & oRepereForm.Model.OptionButton2.State & ";" & Trim(Str(oRepereForm.Model.Image8.Backgroundcolor)) & ";" & oRepereForm.Model.Image8.HelpText & ";" & Trim(Str(GetListIndex(oRepereForm, "ComboBox39"))) & ";" & Trim(Str(oRepereForm.Model.Image9.Backgroundcolor)) & ";" & oRepereForm.Model.Image9.HelpText)
End Sub
Private Sub RepereForm_ListBox5_Click()
listbox5_Change
End Sub
Private Sub RepereForm_ListBox5_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
listbox5_Change
End Sub
Private Sub RepereForm_ListBox7_Change()
Dim unPoint As String
Dim ListBox7 as Integer
ListBox7 = GetListIndex(oRepereForm, "ListBox7")
If ListBox7 > -1 Then
unPoint = GetList(oRepereForm, "ListBox7", ListBox7)
unPoint = Mid(unPoint, 2, Len(unPoint) - 2)
oRepereForm.Model.TextBox19.Text = Left(unPoint, InStr(1, unPoint, ";") - 1)
oRepereForm.Model.TextBox30.Text = Mid(unPoint, InStr(1, unPoint, ";") + 1)
End If
End Sub
Private Sub RepereForm_ListBox8_Change()
Dim unPoint As String
If ListBox8.ListIndex > -1 Then
unPoint = ListBox8.List(ListBox8.ListIndex)
unPoint = Mid(unPoint, 2, Len(unPoint) - 2)
oRepereForm.Model.TextBox19.Text = Left(unPoint, InStr(1, unPoint, ";") - 1)
oRepereForm.Model.TextBox30.Text = Mid(unPoint, InStr(1, unPoint, ";") + 1)
End If
End Sub
Private Sub RepereForm_ListBox9_Change()
Dim unPoint As String
If ListBox9.ListIndex > -1 Then
unPoint = ListBox9.List(ListBox9.ListIndex)
unPoint = Mid(unPoint, 2, Len(unPoint) - 2)
oRepereForm.Model.TextBox19.Text = Left(unPoint, InStr(1, unPoint, ";") - 1)
oRepereForm.Model.TextBox30.Text = Mid(unPoint, InStr(1, unPoint, ";") + 1)
End If
End Sub
Private Sub RepereForm_ListBox10_Change()
Dim unPoint As String
If ListBox10.ListIndex > -1 Then
unPoint = ListBox10.List(ListBox10.ListIndex)
unPoint = Mid(unPoint, 2, Len(unPoint) - 2)
oRepereForm.Model.TextBox19.Text = Left(unPoint, InStr(1, unPoint, ";") - 1)
oRepereForm.Model.TextBox30.Text = Mid(unPoint, InStr(1, unPoint, ";") + 1)
End If
End Sub
Private Sub RepereForm_ListBox11_Change()
Dim unPoint As String
If ListBox11.ListIndex > -1 Then
unPoint = ListBox11.List(ListBox11.ListIndex)
unPoint = Mid(unPoint, 2, Len(unPoint) - 2)
oRepereForm.Model.TextBox19.Text = Left(unPoint, InStr(1, unPoint, ";") - 1)
oRepereForm.Model.TextBox30.Text = Mid(unPoint, InStr(1, unPoint, ";") + 1)
End If
End Sub
Private Sub RepereForm_listbox5_Change()
Dim TypeFonction, LeTexteFonction, a
Dim ListBox5 as Integer
ListBox5 = GetListIndex(oRepereForm, "ListBox5")
If ListBox5 > -1 Then
oRepereForm.Model.Image1.Backgroundcolor = GetList(oRepereForm, "ComboBox2", ListBox5)
oRepereForm.Model.Image1.HelpText = MIif(GetList(oRepereForm, "ComboBox4", ListBox5) = "msoLineSolid", Chaine("continu") , Chaine("continu")) & " " & GetList(oRepereForm, "ComboBox3", ListBox5) & " pt"
oRepereForm.Model.TextBox32.Text = GetList(oRepereForm, "ComboBox43", ListBox5)
TypeFonction = Val(GetList(oRepereForm, "ComboBox42", ListBox5))
oRepereForm.Model.OptionButton7.State = (TypeFonction = 1)
oRepereForm.Model.OptionButton8.State = (TypeFonction = 2)
oRepereForm.Model.OptionButton9.State = (TypeFonction = 3)
oRepereForm.Model.OptionButton10.State = (TypeFonction = 4)
oRepereForm.Model.CheckBox27.State = Left(GetList(oRepereForm, "ComboBox45", ListBox5),1)
oRepereForm.Model.CheckBox28.State = Left(GetList(oRepereForm, "ComboBox46", ListBox5),1)
oRepereForm.Model.CheckBox29.State = MIif(GetList(oRepereForm, "ComboBox47", ListBox5)<>"", 1, 0)
oRepereForm.Model.TextBox33.Text = GetList(oRepereForm, "ComboBox47", ListBox5)
oRepereForm.Model.TextBox33.Enabled = (oRepereForm.Model.CheckBox29.State=1)
oRepereForm.Model.Image21.Backgroundcolor = Val(Mid(GetList(oRepereForm, "ComboBox45", ListBox5), InStr(1, GetList(oRepereForm, "ComboBox45", ListBox5), ";") + 1))
oRepereForm.Model.Image22.Backgroundcolor = Val(Mid(GetList(oRepereForm, "ComboBox46", ListBox5), InStr(1, GetList(oRepereForm, "ComboBox46", ListBox5), ";") + 1))
If TypeFonction < 3 Then
oRepereForm.Model.TextBox12.Text = GetList(oRepereForm, "ListBox5", ListBox5)
Else
LeTexteFonction = GetList(oRepereForm, "ListBox5", ListBox5)
a = InStr(1, LeTexteFonction, ";")
oRepereForm.Model.TextBox12.Text = Left(LeTexteFonction, a - 1)
oRepereForm.Model.TextBox31.Text = Mid(LeTexteFonction, a + 1)
End If
oRepereForm.Model.CommandButton18.Enabled = True
oRepereForm.Model.CommandButton20.Enabled = True
End If
End Sub
Private Sub RepereForm_listbox6_Change()
Dim ListBox6 as Integer
ListBox6 = GetListIndex(oRepereForm, "ListBox6")
If ListBox6 > -1 Then
oRepereForm.Model.CommandButton21.Enabled = True
oRepereForm.Model.CommandButton23.Enabled = True
End If
End Sub
Private Sub RepereForm_listbox3_Change()
Dim a$
Dim param() As String
Dim ListBox3 as Integer
ListBox3 = GetListIndex(oRepereForm, "ListBox3")
If ListBox3 > -1 Then
oRepereForm.Model.Image3.Backgroundcolor = GetList(oRepereForm, "ComboBox12", ListBox3)
oRepereForm.Model.Image3.HelpText = MIif(GetList(oRepereForm, "ComboBox14", ListBox3) = "msoLineSolid", Chaine("continu"), Chaine("pointille")) & " " & GetList(oRepereForm, "ComboBox13", ListBox3) & " pt"
a$ = GetList(oRepereForm, "ListBox3", ListBox3)
a$ = Mid(a$, 2, Len(a$) - 2)
If oRepereForm.Model.OptionButton6.State Then
If Mid(a$, 2, 1) = "'" Then
a$ = Left(a$, 2) & ";" & Mid(a$, 3)
Else
a$ = Left(a$, 1) & ";" & Mid(a$, 2)
End If
End If
ChargeParametre a$, param, ";"
oRepereForm.Model.TextBox10.Text = param(0)
oRepereForm.Model.TextBox27.Text = param(1)
oRepereForm.Model.TextBox28.Text = ""
oRepereForm.Model.TextBox29.Text = ""
If oRepereForm.Model.OptionButton5.State Then
oRepereForm.Model.TextBox28.Text = param(2)
oRepereForm.Model.TextBox29.Text = param(3)
End If
End If
End Sub
Private Sub RepereForm_listbox4_Change()
Dim ListBox4 as Integer
ListBox4 = GetListIndex(oRepereForm, "ListBox4")
If ListBox4 > -1 Then
oRepereForm.Model.CheckBox10.State = GetList(oRepereForm, "ComboBox37", ListBox4)
oRepereForm.Model.Image2.Backgroundcolor = GetList(oRepereForm, "ComboBox9", ListBox4)
oRepereForm.Model.Image2.HelpText = MIif(GetList(oRepereForm, "ComboBox11", ListBox4) = "msoLineSolid", Chaine("continu"), Chaine("pointille")) & " " & GetList(oRepereForm, "ComboBox10", ListBox4) & " pt"
oRepereForm.Model.TextBox11.Text = GetList(oRepereForm, "ListBox4", ListBox4)
oRepereForm.GetControl("Label62").Visible = (InStr(1, GetList(oRepereForm, "ListBox4", ListBox4), ">") <> 0 Or InStr(1, GetList(oRepereForm, "ListBox4", ListBox4), "<") <> 0)
oRepereForm.GetControl("Image20").Visible = (InStr(1, GetList(oRepereForm, "ListBox4", ListBox4), ">") <> 0 Or InStr(1, GetList(oRepereForm, "ListBox4", ListBox4), "<") <> 0)
oRepereForm.Model.Image20.Backgroundcolor = GetList(oRepereForm, "ComboBox44", ListBox4)
oRepereForm.Model.CommandButton15.Enabled = True
oRepereForm.Model.CommandButton17.Enabled = True
End If
End Sub
Private Sub RepereForm_CommandButton1_Click()
Dim ligne As Object
Dim texte$, tpx, tpy, affx, affy, affori, affunite, i, posxt, posyt, abscisse, ordonnee, ASU
Dim cax, sax, ep, j, ii, tru, x1, y1, x2, y2, trmu
Dim Shapes
SauveForm(oRepereForm)
oRepereForm.Model.Label12.Label = Trim(Str(xmin))
oRepereForm.Model.Label13.Label = Trim(Str(xmax))
oRepereForm.Model.Label14.Label = Trim(Str(ymin))
oRepereForm.Model.Label15.Label = Trim(Str(ymax))
MiseAJourRepere
If xmin <= 0 And xmax >= 0 And ymin <= 0 And ymax >= 0 Then
oRepereForm.Model.sauve.Step = 1
oRepereForm.Model.CommandButton100.Step = 1
oRepereForm.Model.CommandButton101.Step = 1
oRepereForm.Model.CommandButton102.Step = 1
oRepereForm.Model.CommandButton103.Step = 1
oRepereForm.Model.CommandButton104.Step = 1
oRepereForm.Model.CommandButton105.Step = 1
oRepereForm.Model.CommandButton106.Step = 1
oRepereForm.Model.CommandButton107.Step = 1
oRepereForm.Model.CommandButton108.Step = 1
oRepereForm.Model.Step = 10
InitialiseDessin(false)
Shapes=InitialiseGroupe
' texte$ = IIf(oRepereForm.Model.ListBox5.Step, "", oRepereForm.Model.Label20.Label)
tpx = oRepereForm.Model.CheckBox222.State
tpy = oRepereForm.Model.CheckBox3.State
affx = oRepereForm.Model.CheckBox4.State
affy = oRepereForm.Model.CheckBox5.State
affori = oRepereForm.Model.CheckBox6.State
affunite = oRepereForm.Model.CheckBox7.State
dx = val(oRepereForm.Model.TextBox1.Text) * 1000
If oRepereForm.Model.CheckBox1.State Then
dy = dx
angleaxe = Pi / 2
Else
dy = val(oRepereForm.Model.TextBox2.Text) * 1000
angleaxe = Val(oRepereForm.Model.TextBox3.Text) * Pi / 180
End If
PointInsertion posx, posy
oRepereForm.Model.Label10.Label = Trim(Str(posx))
oRepereForm.Model.Label11.Label = Trim(Str(posy))
oRepereForm.Model.Label20.Label = Chaine("tracdurep") ' "Tracé du repère..."
' reseau pointe (coordonnees entieres)
If oRepereForm.Model.CheckBox18.State Then
oRepereForm.Model.Label20.Label = Chaine("tracrespoi") '"Tracé d'un réseau pointé..."
cax = dy * Cos(angleaxe)
sax = dy * Sin(angleaxe)
ep = ExtraitEpaisseur(oRepereForm.Model.Image15.HelpText)
For i = Fix(xmin) To Fix(xmax)
If i <> 0 Then
For j = Fix(ymin) To Fix(ymax)
If j <> 0 Then
posxt = posx + i * dx + j * cax
posyt = posy - j * sax
UnSeulPoint posxt, posyt, ep, Shapes, oRepereForm.Model.Image15
End If
Next j
End If
Next i
End If
If oRepereForm.Model.CheckBox17.State And tpy Then
oRepereForm.Model.Label20.Label = Chaine("tracverti") '"Tracé des verticales..."
For i = Int(xmin * 10) To Int(xmax * 10)
ii = i / 10
tru = (Int(i / 10) * 10 = i)
trmu = (Int(i / 5) * 5 = i)
If Not tru Or Not oRepereForm.Model.CheckBox15.State Then
If (Not trmu Or Not oRepereForm.Model.CheckBox16.State) And i <> 0 Then
x1 = posx + ii * dx + ymin * dy * Cos(angleaxe)
y1 = posy - ymin * dy * Sin(angleaxe)
x2 = posx + ii * dx + ymax * dy * Cos(angleaxe)
y2 = posy - ymax * dy * Sin(angleaxe)
InsereLigne x1, y1, x2, y2, Shapes, oRepereForm.Model.Image19
End If
End If
Next i
End If
If oRepereForm.Model.CheckBox14.State And tpx Then
oRepereForm.Model.Label20.Label = Chaine("trachori") '"Tracé des horizontales..."
For i = Int(ymin * 10) To Int(ymax * 10)
ii = i / 10
tru = (Int(i / 10) * 10 = i)
trmu = (Int(i / 5) * 5 = i)
If Not tru Or Not oRepereForm.Model.CheckBox12.State Then
If (Not trmu Or Not oRepereForm.Model.CheckBox13.State) And i <> 0 Then
x1 = posx + xmin * dx + ii * dy * Cos(angleaxe)
y1 = posy - ii * dy * Sin(angleaxe)
x2 = posx + xmax * dx + ii * dy * Cos(angleaxe)
InsereLigne x1, y1, x2, y1, Shapes, oRepereForm.Model.Image17
End If
End If
Next i
End If
If oRepereForm.Model.CheckBox13.State And tpx Then
oRepereForm.Model.Label20.Label = Chaine("trachori") '"Tracé des horizontales..."
For i = Int(ymin * 2) To Int(ymax * 2)
ii = i / 2
tru = (Int(i / 2) * 2 = i)
If (Not tru Or Not oRepereForm.Model.CheckBox12.State) And i <> 0 Then
x1 = posx + xmin * dx + ii * dy * Cos(angleaxe)
y1 = posy - ii * dy * Sin(angleaxe)
x2 = posx + xmax * dx + ii * dy * Cos(angleaxe)
InsereLigne x1, y1, x2, y1, Shapes, oRepereForm.Model.Image16
End If
Next i
End If
If oRepereForm.Model.CheckBox16.State And tpy Then
oRepereForm.Model.Label20.Label = Chaine("tracverti") '"Tracé des verticales..."
For i = Int(xmin * 2) To Int(xmax * 2)
ii = i / 2
tru = (Int(i / 10) * 10 = i)
If (Not tru Or Not oRepereForm.Model.CheckBox15.State) And i <> 0 Then
x1 = posx + ii * dx + ymin * dy * Cos(angleaxe)
y1 = posy - ymin * dy * Sin(angleaxe)
x2 = posx + ii * dx + ymax * dy * Cos(angleaxe)
y2 = posy - ymax * dy * Sin(angleaxe)
InsereLigne x1, y1, x2, y2, Shapes, oRepereForm.Model.Image18
End If
Next i
End If
oRepereForm.Model.Label20.Label = Chaine("tracgrad") '"Tracé des graduations..."
For i = Fix(xmin) * dx To Fix(xmax) * dx Step dx
If i = 0 Then
If affori Or affx Or affy Then InsereTexte "0", posx, posy, Shapes, 0,-1,1
Else
posxt = posx + i
posyt = posy
If tpy And oRepereForm.Model.CheckBox15.State And Not oRepereForm.Model.CheckBox18.State Then
InsereLigne posxt + ymin * dy * Cos(angleaxe), posyt - ymin * dy * Sin(angleaxe), posxt + ymax * dy * Cos(angleaxe), posyt - ymax * dy * Sin(angleaxe), Shapes, oRepereForm.Model.Image14
Else
InsereLigne posxt, posyt + 100, posxt, posyt - 100, Shapes, oRepereForm.Model.Image11
End If
If affx Then
abscisse = Str(Int(i / dx))
InsereTexte Right$(abscisse, Len(abscisse) - InStr(1, abscisse, " ")), posxt, posyt, Shapes, 0,0,1
End If
If i = dx Then
If affunite And Not affx Then InsereTexte "1", posxt, posyt, Shapes, 0,0,1
End If
End If
Next i
For i = Fix(ymin) * dy To Fix(ymax) * dy Step dy
If i <> 0 Then
posxt = posx + i * Cos(angleaxe)
posyt = posy - i * Sin(angleaxe)
If tpx And oRepereForm.Model.CheckBox12.State And Not oRepereForm.Model.CheckBox18.State Then
InsereLigne posxt + xmin * dx, posyt, posxt + xmax * dx, posyt, Shapes, oRepereForm.Model.Image13
Else
InsereLigne posxt + 100, posyt, posxt - 100, posyt, Shapes, oRepereForm.Model.Image12
End If
If affy Then
ordonnee = Str(Int(i / dy))
InsereTexte Right$(ordonnee, Len(ordonnee) - InStr(1, ordonnee, " ")), posxt - 12, posyt - 4, Shapes, 0,-1,0
End If
If i = dy Then
If affunite And Not affy Then InsereTexte "1", posxt - 12, posyt - 4, Shapes, 0,-1,0
End If
End If
Next i
InsereVecteur(posx + xmin * dx, posy, posx + xmax * dx, posy, Shapes,oRepereForm.Model.Image10)
InsereTexte oRepereForm.Model.TextBox20.Text, posx + xmax * dx, posy, Shapes, 0,0,1
InsereVecteur(posx + ymin * dy * Cos(angleaxe), posy - ymin * dy * Sin(angleaxe), posx + ymax * dy * Cos(angleaxe), posy - ymax * dy * Sin(angleaxe), Shapes, oRepereForm.Model.Image10)
InsereTexte oRepereForm.Model.TextBox21.Text, posx + ymax * dy * Cos(angleaxe), posy - ymax * dy * Sin(angleaxe), Shapes,0,-1,0
Call RepereTracePoints(Shapes)
Call RepereTraceVecteurs(Shapes)
Call RepereTraceSegments(Shapes)
Call RepereTraceConiques(Shapes)
Call RepereTraceDroites(Shapes)
Call RepereTraceNuages(Shapes)
Call RepereTraceFonctions(Shapes)
oRepereForm.Model.Label20.Label = Chaine("tracfin") '"Finalisation du tracé..."
Dim aPoint As New com.sun.star.awt.Point
Dim TheSize as new com.sun.star.awt.Size
Dim Group as Object
Dim Coeff
aPoint.x=3000
aPoint.y=3000
Group = GroupeObjet(Shapes)
Group.Position=aPoint
TermineDessin()
' Call VideCombo
Else
MsgBoxP ("message12")
rem MsgBox "L'abscisse et l'ordonnée minimales doivent être négatives" & Chr(13) & Chr(13) & "L'abscisse et l'ordonnée maximale doivent être positives..."
End If
oRepereForm.EndExecute
End Sub
Private Sub RepereForm_CommandButton10_Click()
Dim i, texte$, np$, xx, yy
i = 1
texte$ = oRepereForm.Model.TextBox8.Text & "(" & oRepereForm.Model.TextBox22.Text & ";" & oRepereForm.Model.TextBox23.Text & ")"
ExtraitPoint texte$, i, np$, xx, yy
If i <> -1 Then
If xx < xmin Or xx > xmax Or yy < ymin Or yy > ymax Then
MsgBoxP ("message11")
rem MsgBox "Le point que vous voulez ajouter ne pourra pas être" & Chr(13) & "tracé dans le repère indiqué." & Chr(13) & Chr(13) & "Changez les limites du repère (onglet Repère)."
Else
Add(oRepereForm, "ListBox1", texte$)
Add(oRepereForm, "ComboBox35", oRepereForm.Model.CheckBox8.State)
Add(oRepereForm, "ComboBox36", oRepereForm.Model.CheckBox9.State)
Add(oRepereForm, "ComboBox38", Trim(Str(GetListIndex(oRepereForm, "ComboBox25"))))
Add(oRepereForm, "ComboBox18", "0")
Add(oRepereForm, "ComboBox19", "0.75")
add(oRepereForm, "ComboBox20", "msoLineSolid"
oRepereForm.Model.Image5.Backgroundcolor = 0
oRepereForm.Model.Image5.HelpText = "Continu 0.75 pt"
If ListCount(oRepereForm, "ListBox1") > 0 Then SetListIndex(oRepereForm, "ListBox1", ListCount(oRepereForm, "ListBox1") - 1)
End If
End If
End Sub
Private Sub RepereForm_CommandButton11_Click()
Dim a
a = GetListIndex(oRepereForm, "ListBox1")
If a <> -1 Then
SupprimeItem(oRepereForm, "ListBox1", a)
SupprimeItem(oRepereForm, "ComboBox18", a)
SupprimeItem(oRepereForm, "ComboBox19", a)
SupprimeItem(oRepereForm, "ComboBox20", a)
SupprimeItem(oRepereForm, "ComboBox35", a)
SupprimeItem(oRepereForm, "ComboBox36", a)
SupprimeItem(oRepereForm, "ComboBox38", a)
SetListIndex(oRepereForm, "ListBox1", a - 1)
End If
End Sub
Private Sub RepereForm_CommandButton12_Click()
Dim i, texte$, x0, y0, x1, y1
Dim ListBox2 as Integer
i = 1
If oRepereForm.Model.OptionButton4.State Then
texte$ = "[" & oRepereForm.Model.TextBox9.Text & oRepereForm.Model.TextBox24.Text & "]"
Else
texte$ = "[" & oRepereForm.Model.TextBox9.Text & ";" & oRepereForm.Model.TextBox24.Text & ";" & oRepereForm.Model.TextBox25.Text & ";" & oRepereForm.Model.TextBox26.Text & "]"
End If
If InStr(1, texte$, ";") <> 0 Then
ExtraitSegment texte$, i, x0, y0, x1, y1
Else
ExtraitSegmentPoint texte$, i, x0, y0, x1, y1
End If
If i <> -1 Then
ListBox2 = GetListIndex(oRepereForm, "ListBox2")
RemplaceItem(oRepereForm, "ComboBox32", ListBox2 , oRepereForm.Model.CheckBox22.State)
RemplaceItem(oRepereForm, "ComboBox33", ListBox2 , MIif(oRepereForm.Model.CheckBox24.State, oRepereForm.Model.TextBox15.Text, "*"))
GetList(oRepereForm, "ComboBox34", ListBox2, oRepereForm.Model.CheckBox23.State)
GetList(oRepereForm, "ComboBox15", ListBox2, oRepereForm.Model.Image4.Backgroundcolor)
GetList(oRepereForm, "ComboBox16", ListBox2, ExtraitEpaisseur(oRepereForm.Model.Image4.HelpText))
GetList(oRepereForm, "ComboBox17", ListBox2, ExtraitTypeTrait(oRepereForm.Model.Image4,rHelpText))
GetList(oRepereForm, "ListBox2" , ListBox2, texte$
End If
End Sub
Private Sub RepereForm_CommandButton13_Click()
Dim i, texte$, x0, y0, x1, y1
i = 1
If oRepereForm.Model.OptionButton4.State Then
texte$ = "[" & oRepereForm.Model.TextBox9.Text & oRepereForm.Model.TextBox24.Text & "]"
Else
texte$ = "[" & oRepereForm.Model.TextBox9.Text & ";" & oRepereForm.Model.TextBox24.Text & ";" & oRepereForm.Model.TextBox25.Text & ";" & oRepereForm.Model.TextBox26.Text & "]"
End If
If InStr(1, texte$, ";") <> 0 Then
i = 1
ExtraitSegment texte$, i, x0, y0, x1, y1
Else
i = 1
ExtraitSegmentPoint texte$, i, x0, y0, x1, y1
End If
If i <> -1 Then
Add(oRepereForm, "ComboBox32", oRepereForm.Model.CheckBox22.State)
Add(oRepereForm, "ComboBox33", MIif(oRepereForm.Model.CheckBox24.State, oRepereForm.Model.TextBox15.Text, "*"))
Add(oRepereForm, "ComboBox34", oRepereForm.Model.CheckBox23.State
Add(oRepereForm, "ComboBox15", "0"
Add(oRepereForm, "ComboBox16", "0.75"
Add(oRepereForm, "ComboBox17", "msoLineSolid"
oRepereForm.Model.Image4.Backgroundcolor = 0
oRepereForm.Model.Image4.HelpText = "Continu 0.75 pt"
Add(oRepereForm, "ListBox2", texte$)
If ListCount(oRepereForm, "ListBox2") > 0 Then SetListIndex(oRepereForm, "ListBox2", ListCount(oRepereForm, "ListBox2") - 1)
End If
End Sub
Private Sub RepereForm_CommandButton14_Click()
Dim i, texte$, x0, y0, x1, y1
Dim ListBox3 as Integer
ListBox3 = GetListIndex(oRepereForm, "ListBox3")
i = 1
If oRepereForm.Model.OptionButton6.State Then
texte$ = "{" & oRepereForm.Model.TextBox10.Text & ";" & oRepereForm.Model.TextBox27.Text & "}"
Else
texte$ = "{" & oRepereForm.Model.TextBox10.Text & ";" & oRepereForm.Model.TextBox27.Text & ";" & oRepereForm.Model.TextBox28.Text & ";" & oRepereForm.Model.TextBox29.Text & "}"
End If
If InStr(1, texte$, ";") <> 0 Then
i = 1
ExtraitVecteur texte$, i, x0, y0, x1, y1
Else
i = 1
ExtraitSegmentPoint texte$, i, x0, y0, x1, y1
End If
If i <> -1 Then
SetList(oRepereForm, "ComboBox12", ListBox3, oRepereForm.Model.Image3.Backgroundcolor)
SetList(oRepereForm, "ComboBox13", ListBox3, ExtraitEpaisseur(oRepereForm.Model.Image3.HelpText))
SetList(oRepereForm, "ComboBox14", ListBox3, ExtraitTypeTrait(oRepereForm.Model.Image3.HelpText))
SetList(oRepereForm, "ListBox3", ListBox3, texte$)
End If
End Sub
Private Sub RepereForm_CommandButton15_Click()
Dim i, texte$, a, b, c, eqdroite$
Dim ListBox4 as Integer
i = 1
ListBox4 = GetListIndex(oRepereForm, "ListBox4")
texte$ = oRepereForm.Model.TextBox11.Text
If InStr(1, texte$, "(") <> 0 And InStr(1, texte$, ")") <> 0 Then
ExtraitDroitePoint texte$, i, a, b, c, eqdroite$
Else
ExtraitDroite texte$, i, a, b, c, eqdroite$
End If
If i <> -1 Then
RemplaceItem oRepereForm, "ComboBox9", ListBox4, oRepereForm.Model.Image2.Backgroundcolor
RemplaceItem oRepereForm, "ComboBox10", ListBox4, ExtraitEpaisseur(oRepereForm.Model.Image2.HelpText)
RemplaceItem oRepereForm, "ComboBox11", ListBox4, ExtraitTypeTrait(oRepereForm.Model.Image2.HelpText)
RemplaceItem oRepereForm, "ComboBox37", ListBox4, oRepereForm.Model.CheckBox10.State
RemplaceItem oRepereForm, "ComboBox44", ListBox4, oRepereForm.Model.Image20.Backgroundcolor
oRepereForm.GetControl("Label62").Visible = (InStr(1, texte$, ">") <> 0 Or InStr(1, texte$, "<") <> 0)
oRepereForm.GetControl("Image20").Visible = (InStr(1, texte$, ">") <> 0 Or InStr(1, texte$, "<") <> 0)
RemplaceItem oRepereForm, "ListBox4", ListBox4, texte$
End If
oRepereForm.Model.CommandButton15.Enabled = False
oRepereForm.Model.CommandButton17.Enabled = False
End Sub
Private Sub RepereForm_CommandButton16_Click()
Dim i, texte$, a, b, c, eqdroite$
i = 1
texte$ = oRepereForm.Model.TextBox11.Text
If InStr(1, texte$, "(") <> 0 And InStr(1, texte$, ")") <> 0 Then
ExtraitDroitePoint texte$, i, a, b, c, eqdroite$
Else
ExtraitDroite texte$, i, a, b, c, eqdroite$
End If
If i <> -1 Then
Add oRepereForm, "ListBox4", texte$
Add oRepereForm, "ComboBox9", "0"
Add oRepereForm, "ComboBox10", "0.75"
Add oRepereForm, "ComboBox11", "msoLineSolid"
oRepereForm.Model.Image2.Backgroundcolor = 0
oRepereForm.Model.Image2.HelpText = "Continu 0.75 pt"
Add oRepereForm, "ComboBox37", oRepereForm.Model.CheckBox10.State
Add oRepereForm, "ComboBox44", "0"
oRepereForm.GetControl("Label62").Visible = (InStr(1, texte$, ">") <> 0 Or InStr(1, texte$, "<") <> 0)
oRepereForm.GetControl("Image20").Visible = (InStr(1, texte$, ">") <> 0 Or InStr(1, texte$, "<") <> 0)
If ListCount(oRepereForm, "ListBox4") > 0 Then SetListIndex(oRepereForm, "ListBox4", ListCount(oRepereForm, "ListBox4") - 1
End If
End Sub
Private Sub RepereForm_CommandButton17_Click()
Dim a
a = GetListIndex(oRepereForm, "ListBox4")
If a <> -1 Then
SupprimeItem oRepereForm, "ListBox4", a
SupprimeItem oRepereForm, "ComboBox9", a
SupprimeItem oRepereForm, "ComboBox10", a
SupprimeItem oRepereForm, "ComboBox11", a
SupprimeItem oRepereForm, "ComboBox37", a
SetListIndex oRepereForm, "ListBox4", a - 1
End If
oRepereForm.Model.CommandButton15.Enabled = False
oRepereForm.Model.CommandButton17.Enabled = False
End Sub
Private Sub RepereForm_CommandButton18_Click()
Dim i, texte$, TypeFonction
Dim ListBox5 as Integer
ListBox5 = GetListIndex(oRepereForm, "ListBox5")
i = 1
texte$ = oRepereForm.Model.TextBox12.Text
i = InStr(1, texte$, "X")
If i <> -1 Then
RemplaceItem oRepereForm, "ComboBox2", ListBox5, oRepereForm.Model.Image1.Backgroundcolor
RemplaceItem oRepereForm, "ComboBox3", ListBox5, ExtraitEpaisseur(oRepereForm.Model.Image1.HelpText)
RemplaceItem oRepereForm, "ComboBox4", ListBox5, ExtraitTypeTrait(oRepereForm.Model.Image1.HelpText)
TypeFonction = "1"
If oRepereForm.Model.OptionButton8.State Then TypeFonction = "2"
If oRepereForm.Model.OptionButton9.State Then TypeFonction = "3"
If oRepereForm.Model.OptionButton10.State Then TypeFonction = "4"
RemplaceItem oRepereForm, "ComboBox42", ListBox5, TypeFonction
RemplaceItem oRepereForm, "ComboBox43", ListBox5, oRepereForm.Model.TextBox32.Text
RemplaceItem oRepereForm, "ComboBox45", ListBox5, oRepereForm.Model.CheckBox27.State & ";" & Trim(Str(oRepereForm.Model.Image21.Backgroundcolor))
RemplaceItem oRepereForm, "ComboBox46", ListBox5, oRepereForm.Model.CheckBox28.State & ";" & Trim(Str(oRepereForm.Model.Image22.Backgroundcolor))
If oRepereForm.Model.CheckBox29.State then
RemplaceItem oRepereForm, "ComboBox47", ListBox5, oRepereForm.Model.TextBox33.Text
Else
RemplaceItem oRepereForm, "ComboBox47", ListBox5, ""
End if
If TypeFonction = "3" Or TypeFonction = "4" Then texte$ = texte$ & ";" & oRepereForm.Model.TextBox31.Text
RemplaceItem oRepereForm, "ListBox5", ListBox5, texte$
oRepereForm.Model.CommandButton18.Enabled = False
oRepereForm.Model.CommandButton20.Enabled = False
End If
End Sub
Private Sub RepereForm_CommandButton19_Click()
Dim i, texte$, TypeFonction
i = 1
texte$ = oRepereForm.Model.TextBox12.Text
i = InStr(1, texte$, "X")
If i <> -1 Then
Add oRepereForm, "ComboBox2", oRepereForm.Model.Image1.Backgroundcolor
Add oRepereForm, "ComboBox3", ExtraitEpaisseur(oRepereForm.Model.Image1.HelpText)
Add oRepereForm, "ComboBox4", ExtraitTypeTrait(oRepereForm.Model.Image1.HelpText)
TypeFonction = "1"
If oRepereForm.Model.OptionButton8.State Then TypeFonction = "2"
If oRepereForm.Model.OptionButton9.State Then TypeFonction = "3"
If oRepereForm.Model.OptionButton10.State Then TypeFonction = "4"
Add oRepereForm, "ComboBox42", TypeFonction
Add oRepereForm, "ComboBox43", oRepereForm.Model.TextBox32.Text
Add oRepereForm, "ComboBox45", oRepereForm.Model.CheckBox27.State & ";" & Trim(Str(oRepereForm.Model.Image21.Backgroundcolor))
Add oRepereForm, "ComboBox46", oRepereForm.Model.CheckBox28.State & ";" & Trim(Str(oRepereForm.Model.Image22.Backgroundcolor))
If oRepereForm.Model.CheckBox29.State=1 then
Add oRepereForm, "ComboBox47", oRepereForm.Model.TextBox33.Text
Else
Add oRepereForm, "ComboBox47", ""
End if
If TypeFonction = "3" Or TypeFonction = "4" Then texte$ = texte$ & ";" & oRepereForm.Model.TextBox31.Text
Add oRepereForm, "ListBox5", texte$
If ListCount(oRepereForm, "ListBox5") > 0 Then SetListIndex(oRepereForm, "ListBox5", ListCount(oRepereForm, "ListBox5") - 1
oRepereForm.Model.CommandButton18.Enabled = False
oRepereForm.Model.CommandButton20.Enabled = False
End If
End Sub
Private Sub RepereForm_CommandButton2_Click()
oRepereForm.EndExecute()
oRepereForm.Model.Label9.Label = Chaine("non")
SauveForm(oRepereForm)
' Call VideCombo
End Sub
Private Sub RepereForm_CommandButton20_Click()
Dim a
a = GetListIndex(oRepereForm, "ListBox5")
If a <> -1 Then
SupprimeItem oRepereForm, "ListBox5", a
SupprimeItem oRepereForm, "ComboBox2", a
SupprimeItem oRepereForm, "ComboBox3", a
SupprimeItem oRepereForm, "ComboBox4", a
SetListIndex oRepereForm, "ListBox5", a - 1
End If
End Sub
Private Sub RepereForm_CommandButton21_Click()
Dim texte$, i, TypeConique, a, b
Dim ListBox6 as Integer
ListBox6 = GetListIndex(oRepereForm, "ListBox6")
texte$ = GetList(oRepereForm, "ListBox6", ListBox6)
i = 1
ExtraitConique texte$, i, TypeConique, a, b
ChargeConiquesForm()
oConiquesForm.Model.Image1.Backgroundcolor = GetList(oRepereForm, "ComboBox22", ListBox6)
if GetList(oRepereForm, "ComboBox24", ListBox6) = "msoLineSolid" then texte = Chaine("continu") else texte = Chaine("pointille")
oConiquesForm.Model.Image1.HelpText = texte & " " & GetList(oRepereForm, "ComboBox23", ListBox6) & " pt"
Select Case TypeConique
Case 0
oConiquesForm.Model.TextBox4.Text = Trim(Str(a))
oConiquesForm.Model.TextBox7.Text = Trim(Str(b))
oConiquesForm.Model.CheckBox4.State = GetList(oRepereForm, "ComboBox29", ListBox6)
oConiquesForm.Model.CheckBox5.State = GetList(oRepereForm, "ComboBox30", ListBox6)
Case 1
oConiquesForm.Model.TextBox1.Text = Trim(Str(a))
oConiquesForm.Model.CheckBox6.State = GetList(oRepereForm, "ComboBox29", ListBox6)
oConiquesForm.Model.CheckBox7.State = GetList(oRepereForm, "ComboBox30", ListBox6)
Case 2
oConiquesForm.Model.TextBox8.Text = Trim(Str(a))
oConiquesForm.Model.TextBox9.Text = Trim(Str(b))
oConiquesForm.Model.CheckBox8.State = GetList(oRepereForm, "ComboBox29", ListBox6)
oConiquesForm.Model.CheckBox9.State = GetList(oRepereForm, "ComboBox30", ListBox6)
oConiquesForm.Model.CheckBox10.State = GetList(oRepereForm, "ComboBox31", ListBox6)
End Select
oConiquesForm.Model.Step = TypeConique + 1
oConiquesForm.Execute()
If oConiquesForm.Model.Label14.Label = "oui" Then AjouteConique True
End Sub
Private Sub RepereForm_CommandButton22_Click()
AfficheConiquesForm(1)
If oConiquesForm.Model.Label14.Label = "oui" Then AjouteConique
oRepereForm.Model.CommandButton21.Enabled = False
oRepereForm.Model.CommandButton23.Enabled = False
End Sub
Private Sub RepereForm_CommandButton23_Click()
Dim a
a = GetListIndex(oRepereForm, "ListBox6")
If a <> -1 Then
SupprimeItem oRepereForm, "ListBox6", a
SupprimeItem oRepereForm, "ComboBox22", a
SupprimeItem oRepereForm, "ComboBox23", a
SupprimeItem oRepereForm, "ComboBox24", a
SupprimeItem oRepereForm, "ComboBox29", a
SupprimeItem oRepereForm, "ComboBox30", a
SupprimeItem oRepereForm, "ComboBox31", a
SetListIndex oRepereForm, "ListBox6", a - 1
End If
End Sub
Private Sub RepereForm_CommandButton4_Click()
Dim a
a = ListBox2.ListIndex
If a <> -1 Then
ListBox2.RemoveItem a
ComboBox15.RemoveItem a
ComboBox16.RemoveItem a
ComboBox17.RemoveItem a
ComboBox32.RemoveItem a
ComboBox33.RemoveItem a
ComboBox34.RemoveItem a
ListBox2.ListIndex = a - 1
End If
End Sub
Private Sub RepereForm_CommandButton5_Click()
Dim i, texte$, x0, y0, x1, y1
i = 1
If oRepereForm.Model.OptionButton6.State Then
texte$ = "{" & oRepereForm.Model.TextBox10.Text & oRepereForm.Model.TextBox27.Text & "}"
Else
texte$ = "{" & oRepereForm.Model.TextBox10.Text & ";" & oRepereForm.Model.TextBox27.Text & ";" & oRepereForm.Model.TextBox28.Text & ";" & oRepereForm.Model.TextBox29.Text & "}"
End If
If InStr(1, texte$, ";") <> 0 Then
ExtraitVecteur texte$, i, x0, y0, x1, y1
Else
ExtraitSegmentPoint texte$, i, x0, y0, x1, y1
End If
If i <> -1 Then
Add(oRepereForm, "ListBox3" , texte$)
Add(oRepereForm, "ComboBox12", "0")
Add(oRepereForm, "ComboBox13", "0.75")
Add(oRepereForm, "ComboBox14", "msoLineSolid")
oRepereForm.Model.Image3.Backgroundcolor = 0
oRepereForm.Model.Image3.HelpText = "Continu 0.75 pt"
If ListCount(oRepereForm, "ListBox3") > 0 Then SetListIndex(oRepereForm, "ListBox3", ListCount(oRepereForm, "ListBox3") - 1)
End If
End Sub
Private Sub RepereForm_CommandButton6_Click()
Dim a
a = GetListIndex(oRepereForm, "ListBox3")
If a <> -1 Then
RemoveItem(oRepereForm, "ListBox3", a)
RemoveItem(oRepereForm, "ComboBox12", a)
RemoveItem(oRepereForm, "ComboBox13", a)
RemoveItem(oRepereForm, "ComboBox14", a)
SetListIndex(oRepereForm, "ListBox3", a - 1)
End If
End Sub
Private Sub RepereForm_CommandButton7_Click() rem exchange A B
Dim texte$
If oRepereForm.Model.OptionButton6.State Then
texte$ = oRepereForm.Model.TextBox10.Text
oRepereForm.Model.TextBox10.Text = oRepereForm.Model.TextBox27.Text
oRepereForm.Model.TextBox27.Text = texte$
Else
texte$ = oRepereForm.Model.TextBox10.Text
oRepereForm.Model.TextBox10.Text = oRepereForm.Model.TextBox28.Text
oRepereForm.Model.TextBox28.Text = texte$
texte$ = oRepereForm.Model.TextBox27.Text
oRepereForm.Model.TextBox27.Text = oRepereForm.Model.TextBox29.Text
oRepereForm.Model.TextBox29.Text = texte$
End If
End Sub
Private Sub RepereForm_CommandButton9_Click()
Dim i, texte$, np$, xx, yy
Dim ListBox1
i = 1
texte$ = oRepereForm.Model.TextBox8.Text & "(" & oRepereForm.Model.TextBox22.Text & ";" & oRepereForm.Model.TextBox23.Text & ")"
ExtraitPoint texte$, i, np$, xx, yy
ListBox1=GetListIndex(oRepereForm, "ListBox1")
If i <> -1 Then
If xx < xmin Or xx > xmax Or yy < ymin Or yy > ymax Then
rem gisbert
MsgBoxP ("message11")
rem MsgBox "Le point que vous voulez ajouter ne pourra pas être" & Chr(13) & "tracé dans le repère indiqué." & Chr(13) & Chr(13) & "Changez les limites du repère (onglet Repère)."
Else
RemplaceItem(oRepereForm, "ComboBox35", ListBox1, oRepereForm.Model.CheckBox8.State)
RemplaceItem(oRepereForm, "ComboBox36", ListBox1, oRepereForm.Model.CheckBox9.State)
RemplaceItem(oRepereForm, "ComboBox38", ListBox1, Trim(Str(GetListIndex(oRepereForm, "ComboBox25"))))
RemplaceItem(oRepereForm, "ComboBox18", ListBox1, oRepereForm.Model.Image5.Backgroundcolor)
RemplaceItem(oRepereForm, "ComboBox19", ListBox1, ExtraitEpaisseur(oRepereForm.Model.Image5.HelpText))
RemplaceItem(oRepereForm, "ComboBox20", ListBox1, ExtraitTypeTrait(oRepereForm.Model.Image5.HelpText))
RemplaceItem(oRepereForm, "ListBox1", ListBox1, texte$)
End If
End If
End Sub
Private Sub RepereForm_Image1_Click()
ChangeCouleur oRepereForm.Model.Image1
End Sub
Private Sub RepereForm_Image2_Click()
ChangeCouleur oRepereForm.Model.Image2
End Sub
Private Sub RepereForm_Image3_Click()
ChangeCouleur oRepereForm.Model.Image3
End Sub
Private Sub RepereForm_Image4_Click()
ChangeCouleur oRepereForm.Model.Image4
End Sub
Private Sub RepereForm_Image5_Click()
ChangeCouleur oRepereForm.Model.Image5
End Sub
Private Sub RepereForm_Image6_Click()
ChangeCouleur oRepereForm.Model.Image6
End Sub
Private Sub RepereForm_Image8_Click()
If ComboBox40.ListIndex > -1 Then
ChangeCouleur oRepereForm.Model.Image8
ComboBox41.List(ComboBox40.ListIndex) = oRepereForm.Model.TextBox16.Text & ";" & oRepereForm.Model.TextBox17.Text & ";" & oRepereForm.Model.TextBox18.Text & ";" & oRepereForm.Model.CheckBox11.State & ";" & oRepereForm.Model.OptionButton1.State & ";" & oRepereForm.Model.OptionButton2.State & ";" & Trim(Str(oRepereForm.Model.Image8.Backgroundcolor)) & ";" & oRepereForm.Model.Image8.HelpText & ";" & Trim(Str(ComboBox39.ListIndex)) & ";" & Trim(Str(oRepereForm.Model.Image9.Backgroundcolor)) & ";" & oRepereForm.Model.Image9.HelpText
Else
MsgBoxP ("message8")
rem MsgBox "Il faut cliquer dans la liste pour sélectionner un élément..."
End If
End Sub
Private Sub RepereForm_ListBox1_Change()
Dim i, np$, xx, yy
Dim ListIndex1 as Integer
ListIndex1=GetListIndex(oRepereForm, "ListBox1")
If ListIndex1 > -1 Then
oRepereForm.Model.Image5.Backgroundcolor = GetList(oRepereForm, "ComboBox18", ListIndex1)
oRepereForm.Model.Image5.HelpText = MIif(GetList(oRepereForm, "ComboBox20", ListIndex1) = "msoLineSolid", Chaine("continu"), Chaine("pointillé")) & " " & GetList(oRepereForm, "ComboBox19", ListIndex1) & " pt"
oRepereForm.Model.CheckBox8.State = GetList(oRepereForm, "ComboBox35", ListIndex1)
oRepereForm.Model.CheckBox9.State = GetList(oRepereForm, "ComboBox36", ListIndex1)
SetListIndex(oRepereForm, "ComboBox25", Val(GetList(oRepereForm, "ComboBox38", ListIndex1)))
i = 1
ExtraitPoint GetList(oRepereForm, "ListBox1", ListIndex1), i, np$, xx, yy
oRepereForm.Model.TextBox8.Text = np$
oRepereForm.Model.TextBox22.Text = xx
oRepereForm.Model.TextBox23.Text = yy
End If
End Sub
Private Sub RepereForm_ListBox2_Change()
Dim a$
Dim param() As String
Dim ListBox2 as integer
ListBox2 = GetListIndex(oRepereForm, "ListBox2")
If ListBox2 > -1 Then
oRepereForm.Model.Image4.Backgroundcolor = GetList(oRepereForm, "ComboBox15", ListBox2)
oRepereForm.Model.Image4.HelpText = MIif(GetList(oRepereForm, "ComboBox17", ListBox2) = "msoLineSolid", Chaine("continu"), Chaine("pointille")) & " " & GetList(oRepereForm, "ComboBox16", ListBox2) & " pt"
oRepereForm.Model.CheckBox22.State = GetList(oRepereForm, "ComboBox32", ListBox2)
oRepereForm.Model.CheckBox23.State = GetList(oRepereForm, "ComboBox34", ListBox2)
If GetList(oRepereForm, "ComboBox33", ListBox2) = "*" Then
oRepereForm.Model.TextBox15.Text = ""
oRepereForm.Model.CheckBox24.State = 0
Else
oRepereForm.Model.TextBox15.Text = GetList(oRepereForm, "ComboBox33", ListBox2)
oRepereForm.Model.CheckBox24.State = 1
End If
a$ = GetList(oRepereForm, "ListBox2", ListBox2)
a$ = Mid(a$, 2, Len(a$) - 2)
If oRepereForm.Model.OptionButton4.State Then
If Mid(a$, 2, 1) = "'" Then
a$ = Left(a$, 2) & ";" & Mid(a$, 3)
Else
a$ = Left(a$, 1) & ";" & Mid(a$, 2)
End If
End If
ChargeParametre a$, param, ";"
oRepereForm.Model.TextBox9.Text = param(0)
oRepereForm.Model.TextBox24.Text = param(1)
oRepereForm.Model.TextBox25.Text = ""
oRepereForm.Model.TextBox26.Text = ""
If oRepereForm.Model.OptionButton3.State Then
oRepereForm.Model.TextBox25.Text = param(2)
oRepereForm.Model.TextBox26.Text = param(3)
End If
End If
End Sub
Private Sub RepereForm_OptionButton1_Click()
If GetListIndex(oRepereForm, "ComboBox40") > -1 Then RemplaceItem(oRepereForm, "ComboBox41", GetListIndex(oRepereForm, "ComboBox40"), oRepereForm.Model.TextBox16.Text & ";" & oRepereForm.Model.TextBox17.Text & ";" & oRepereForm.Model.TextBox18.Text & ";" & oRepereForm.Model.CheckBox11.State & ";" & oRepereForm.Model.OptionButton1.State & ";" & oRepereForm.Model.OptionButton2.State & ";" & Trim(Str(oRepereForm.Model.Image8.Backgroundcolor)) & ";" & oRepereForm.Model.Image8.HelpText & ";" & Trim(Str(GetListIndex(oRepereForm, "ComboBox39"))) & ";" & Trim(Str(oRepereForm.Model.Image9.Backgroundcolor)) & ";" & oRepereForm.Model.Image9.HelpText
End Sub
Private Sub RepereForm_OptionButton10_Click()
oRepereForm.GetControl("Label52").Visible = False
oRepereForm.GetControl("Label53").Visible = False
oRepereForm.GetControl("Label54").Visible = False
oRepereForm.GetControl("Label55").Visible = False
oRepereForm.GetControl("Label56").Visible = True
oRepereForm.GetControl("Label57").Visible = True
oRepereForm.GetControl("Label58").Visible = True
oRepereForm.GetControl("Label59").Visible = True
oRepereForm.GetControl("Label60").Visible = True
oRepereForm.GetControl("Label61").Visible = True
oRepereForm.GetControl("TextBox32").Visible = True
oRepereForm.Model.TextBox12.Text = "f(t)"
oRepereForm.Model.TextBox31.Text = "g(t)"
oRepereForm.GetControl("TextBox31").Visible = True
oRepereForm.Model.CheckBox27.State = 0
oRepereForm.Model.CheckBox28.State = 0
oRepereForm.GetControl("CheckBox27").Visible = False
oRepereForm.GetControl("CheckBox28").Visible = False
oRepereForm.GetControl("Image21").Visible = False
oRepereForm.GetControl("Image22").Visible = False
oRepereForm.GetControl("Image23").Visible = False
oRepereForm.GetControl("CheckBox29").Visible = False
oRepereForm.GetControl("TextBox33").Visible = False
oRepereForm.Model.TextBox33.Enabled = oRepereForm.Model.CheckBox29.State
End Sub
Private Sub RepereForm_OptionButton2_Click()
If GetListIndex(oRepereForm, "ComboBox40") > -1 Then RemplaceItem(oRepereForm, "ComboBox41", GetListIndex(oRepereForm, "ComboBox40"), oRepereForm.Model.TextBox16.Text & ";" & oRepereForm.Model.TextBox17.Text & ";" & oRepereForm.Model.TextBox18.Text & ";" & oRepereForm.Model.CheckBox11.State & ";" & oRepereForm.Model.OptionButton1.State & ";" & oRepereForm.Model.OptionButton2.State & ";" & Trim(Str(oRepereForm.Model.Image8.Backgroundcolor)) & ";" & oRepereForm.Model.Image8.HelpText & ";" & Trim(Str(GetListIndex(oRepereForm, "ComboBox39"))) & ";" & Trim(Str(oRepereForm.Model.Image9.Backgroundcolor)) & ";" & oRepereForm.Model.Image9.HelpText
End Sub
Private Sub RepereForm_OptionButton3_Click() rem coordinates
oRepereForm.Model.Label41.Label = ")"
oRepereForm.Model.Label39.Label = "("
oRepereForm.GetControl("Label40").Visible = True
oRepereForm.GetControl("Label42").Visible = True
oRepereForm.GetControl("Label43").Visible = True
oRepereForm.GetControl("TextBox25").Visible = True
oRepereForm.GetControl("TextBox26").Visible = True
End Sub
Private Sub RepereForm_OptionButton4_Click() rem points
oRepereForm.Model.Label41.Label = "]"
oRepereForm.Model.Label39.Label = "["
oRepereForm.GetControl("Label68").Visible = False
oRepereForm.GetControl("Label40").Visible = False
oRepereForm.GetControl("Label42").Visible = False
oRepereForm.GetControl("Label43").Visible = False
oRepereForm.GetControl("TextBox25").Visible = False
oRepereForm.GetControl("TextBox26").Visible = False
End Sub
Private Sub RepereForm_OptionButton5_Click() rem coordinates
oRepereForm.Model.Label46.Label = ")"
oRepereForm.Model.Label48.Label = "("
oRepereForm.GetControl("Label51").Visible = True
oRepereForm.GetControl("Label45").Visible = True
oRepereForm.GetControl("Label47").Visible = True
oRepereForm.GetControl("Label44").Visible = True
oRepereForm.GetControl("TextBox28").Visible = True
oRepereForm.GetControl("TextBox29").Visible = True
End Sub
Private Sub RepereForm_OptionButton6_Click() rem points
oRepereForm.Model.Label46.Label = "}"
oRepereForm.Model.Label48.Label = "{"
oRepereForm.GetControl("Label51").Visible = False
oRepereForm.GetControl("Label45").Visible = False
oRepereForm.GetControl("Label47").Visible = False
oRepereForm.GetControl("Label44").Visible = False
oRepereForm.GetControl("TextBox28").Visible = False
oRepereForm.GetControl("TextBox29").Visible = False
End Sub
Private Sub RepereForm_OptionButton7_Click()
oRepereForm.GetControl("Label52").Visible = False
oRepereForm.GetControl("Label53").Visible = True
oRepereForm.GetControl("Label54").Visible = False
oRepereForm.GetControl("Label55").Visible = False
oRepereForm.GetControl("Label56").Visible = False
oRepereForm.GetControl("Label57").Visible = False
oRepereForm.GetControl("Label58").Visible = False
oRepereForm.GetControl("Label59").Visible = False
oRepereForm.GetControl("Label60").Visible = False
oRepereForm.GetControl("Label61").Visible = False
oRepereForm.GetControl("TextBox32").Visible = False
oRepereForm.Model.TextBox12.Text = "f(x)"
oRepereForm.GetControl("TextBox31").Visible = False
oRepereForm.GetControl("CheckBox27").Visible = True
oRepereForm.GetControl("CheckBox28").Visible = True
oRepereForm.GetControl("Image21").Visible = True
oRepereForm.GetControl("Image22").Visible = True
oRepereForm.GetControl("CheckBox29").Visible = True
oRepereForm.GetControl("TextBox33").Visible = True
oRepereForm.GetControl("Image23").Visible = True
oRepereForm.Model.TextBox33.Enabled = oRepereForm.Model.CheckBox29.State
End Sub
Private Sub RepereForm_OptionButton8_Click()
oRepereForm.GetControl("Label52").Visible = True
oRepereForm.GetControl("Label53").Visible = False
oRepereForm.GetControl("Label54").Visible = False
oRepereForm.GetControl("Label55").Visible = False
oRepereForm.GetControl("Label56").Visible = False
oRepereForm.GetControl("Label57").Visible = False
oRepereForm.GetControl("Label58").Visible = False
oRepereForm.GetControl("Label59").Visible = False
oRepereForm.GetControl("Label60").Visible = False
oRepereForm.GetControl("Label61").Visible = False
oRepereForm.GetControl("TextBox32").Visible = False
oRepereForm.Model.TextBox12.Text = "f(y)"
oRepereForm.GetControl("TextBox31").Visible = False
oRepereForm.Model.CheckBox27.State = 0
oRepereForm.Model.CheckBox28.State = 0
oRepereForm.GetControl("CheckBox27").Visible = False
oRepereForm.GetControl("CheckBox28").Visible = False
oRepereForm.GetControl("Image21").Visible = False
oRepereForm.GetControl("Image22").Visible = False
oRepereForm.GetControl("Image23").Visible = False
oRepereForm.GetControl("CheckBox29").Visible = False
oRepereForm.GetControl("TextBox33").Visible = False
oRepereForm.Model.TextBox33.Enabled = oRepereForm.Model.CheckBox29.State
End Sub
Private Sub RepereForm_OptionButton9_Click()
oRepereForm.GetControl("Label52").Visible = False
oRepereForm.GetControl("Label53").Visible = False
oRepereForm.GetControl("Label54").Visible = True
oRepereForm.GetControl("Label55").Visible = True
oRepereForm.GetControl("Label56").Visible = False
oRepereForm.GetControl("Label57").Visible = False
oRepereForm.GetControl("Label58").Visible = False
oRepereForm.GetControl("Label59").Visible = False
oRepereForm.GetControl("Label60").Visible = True
oRepereForm.GetControl("Label61").Visible = True
oRepereForm.GetControl("TextBox32").Visible = True
oRepereForm.Model.TextBox12.Text = "f(t)"
oRepereForm.Model.TextBox31.Text = "g(t)"
oRepereForm.GetControl("TextBox31").Visible = True
oRepereForm.Model.CheckBox27.State = 0
oRepereForm.Model.CheckBox28.State = 0
oRepereForm.GetControl("CheckBox27").Visible = False
oRepereForm.GetControl("CheckBox28").Visible = False
oRepereForm.GetControl("Image21").Visible = False
oRepereForm.GetControl("Image22").Visible = False
oRepereForm.GetControl("Image23").Visible = False
oRepereForm.GetControl("CheckBox29").Visible = False
oRepereForm.GetControl("TextBox33").Visible = False
oRepereForm.Model.TextBox33.Enabled = oRepereForm.Model.CheckBox29.State
End Sub
Private Sub RepereForm_TextBox4_Change()
MiseAJourRepere
End Sub
Private Sub RepereForm_TextBox5_Change()
MiseAJourRepere
End Sub
Private Sub RepereForm_TextBox6_Change()
MiseAJourRepere
End Sub
Private Sub RepereForm_TextBox7_Change()
MiseAJourRepere
End Sub
Private Sub RepereForm_UserForm_Activate()
Dim i
Clear(oRepereForm, "ComboBox25")
Add(oRepereForm, "ComboBox25", "o")
Add(oRepereForm, "ComboBox25", "x")
Add(oRepereForm, "ComboBox25", "+")
Add(oRepereForm, "ComboBox25", "[]")
Add(oRepereForm, "ComboBox25", "<>")
SetListIndex(oRepereForm, "ComboBox25", 1)
Clear(oRepereForm, "ComboBox39")
Add(oRepereForm, "ComboBox39", "o")
Add(oRepereForm, "ComboBox39", "x")
Add(oRepereForm, "ComboBox39", "+")
Add(oRepereForm, "ComboBox39", "[]")
Add(oRepereForm, "ComboBox39", "<>")
SetListIndex(oRepereForm, "ComboBox39", 1)
AncienneListe = 0
Clear(oRepereForm,"ComboBox40")
For i = 1 To 5
Add(oRepereForm, "ComboBox40", Chaine("serie") & " " & Trim(Str(i)))
dim a
a = oRepereForm.Model.TextBox16.Text & ";"
a = a & oRepereForm.Model.TextBox17.Text & ";"
a = a & oRepereForm.Model.TextBox18.Text & ";"
a = a & oRepereForm.Model.CheckBox11.State & ";"
a = a & oRepereForm.Model.OptionButton1.State & ";"
a = a & oRepereForm.Model.OptionButton2.State & ";"
a = a & Trim(Str(oRepereForm.Model.Image8.Backgroundcolor)) & ";"
a = a & oRepereForm.Model.Image8.HelpText & ";"
a = a & Trim(Str(GetListIndex(oRepereForm, "ComboBox39"))) & ";"
a = a & Trim(Str(oRepereForm.Model.Image9.Backgroundcolor)) & ";"
a = a & oRepereForm.Model.Image9.HelpText
Add(oRepereForm, "ComboBox41", a
Next i
SetListIndex(oRepereForm, "ComboBox40", 0)
IndiceSerie = 0
LesListes(0) = "ListBox7"
LesListes(1) = "ListBox8"
LesListes(2) = "ListBox9"
LesListes(3) = "ListBox10"
LesListes(4) = "ListBox11"
oRepereForm.GetControl("ListBox7").Visible = False
oRepereForm.GetControl("ListBox8").Visible = False
oRepereForm.GetControl("ListBox9").Visible = False
oRepereForm.GetControl("ListBox10").Visible = False
oRepereForm.GetControl("ListBox11").Visible = False
iListeVisible = 0
MiseAJourRepere
End Sub
Private Sub RepereForm_Polices_Change()
If Polices.ListIndex >= 0 Then Exemple.Font.Name = Polices.List(Polices.ListIndex)
End Sub
Private Sub RepereForm_Souligne_Click()
Exemple.Font.Underline = Souligne.State
End Sub
Private Sub RepereForm_Taille_Change()
Exemple.Font.Size = Val(Taille)
If Val(Taille) <> SpinTaille.Value Then SpinTaille.Value = Val(Taille)
End Sub
Private Sub RepereForm_SpinTaille_Change()
If SpinTaille.Value < 0 Then
SpinTaille.Value = 0
Else
Taille = SpinTaille.Value
End If
End Sub
Private Sub RepereForm_Gras_Click()
Exemple.Font.Bold = Gras.Value
End Sub
Private Sub RepereForm_Italique_Click()
Exemple.Font.Italic = Italique.Value
End Sub
Sub RepereForm_CommandButton100()
oRepereForm.Model.Step = 1
End Sub
Sub RepereForm_CommandButton101()
oRepereForm.Model.Step = 2
End Sub
Sub RepereForm_CommandButton102()
oRepereForm.Model.Step = 3
End Sub
Sub RepereForm_CommandButton103()
oRepereForm.Model.Step = 4
End Sub
Sub RepereForm_CommandButton104()
oRepereForm.Model.Step = 5
End Sub
Sub RepereForm_CommandButton105()
oRepereForm.Model.Step = 6
RepereForm_OptionButton7_Click()
End Sub
Sub RepereForm_CommandButton106()
oRepereForm.Model.Step = 7
End Sub
Sub RepereForm_CommandButton107()
oRepereForm.Model.Step = 8
End Sub
Sub RepereForm_CommandButton108()
oRepereForm.Model.Step = 9
End Sub
</script:module>
|