Π Π°Π·ΡΠ°Π±ΠΎΡΠΊΠ° ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΠ½ΠΎΠ³ΠΎ ΠΊΠΎΠΌΠΏΠ»Π΅ΠΊΡΠ°
ΠΠ½ΡΠ΅ΡΡΠ΅ΠΉΡ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΡ ΡΠΎΡΡΠΎΠΈΡ ΠΈΠ· ΠΎΡΠ½ΠΎΠ²Π½ΠΎΠΉ ΡΠΎΡΠΌΡ ΠΈ Π²ΡΠΏΠΎΠΌΠΎΠ³Π°ΡΠ΅Π»ΡΠ½ΡΡ ΡΠΎΡΠΌ, ΡΠ°ΠΊΠΈΡ ΠΊΠ°ΠΊ ΡΠΎΡΠΌΠ° ΡΠ΅Π΄Π°ΠΊΡΠΈΡΠΎΠ²Π°Π½ΠΈΡ Π·Π°ΠΏΠΈΡΠΈ, ΡΠΎΡΠΌΠ° ΠΎΡΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΡ ΡΠ΅Π·ΡΠ»ΡΡΠ°ΡΠΎΠ² Π·Π°ΠΏΡΠΎΡΠ°, ΡΠΎΡΠΌΠ° ΠΏΠΎΡΡΡΠΎΠ΅Π½ΠΈΡ Π³ΡΠ°ΡΠΈΠΊΠΎΠ², ΡΠΎΡΠΌΠ° Π²ΡΠ±ΠΎΡΠ° Π±Π°Π·Ρ Π΄Π°Π½Π½ΡΡ . ΠΠΎΠΏΠ°ΡΡΡ Π½Π° ΡΡΠΈ ΡΠΎΡΠΌΡ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»Ρ ΠΌΠΎΠΆΠ΅Ρ ΠΏΡΠΈ ΠΏΠΎΠΌΠΎΡΠΈ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½ΠΈΡ ΠΊΠ½ΠΎΠΏΠΎΠΊ Π½Π° ΠΎΡΠ½ΠΎΠ²Π½ΠΎΠΉ ΡΠΎΡΠΌΠ΅. ΠΠΎΠΌΠΈΠΌΠΎ ΡΡΠΎΠ³ΠΎ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΠ½ΡΠΉ ΠΊΠΎΠΌΠΏΠ»Π΅ΠΊΡ ΠΏΡΠ΅Π΄ΠΎΡΡΠ°Π²Π»ΡΠ΅Ρ Π²ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎΡΡΡ ΡΠΎΠ·Π΄Π°Π²Π°ΡΡ, ΡΠ΄Π°Π»ΡΡΡ ΠΈ ΡΠ΅Π΄Π°ΠΊΡΠΈΡΠΎΠ²Π°ΡΡ Π·Π°ΠΏΠΈΡΠΈ Π² ΠΠ… Π§ΠΈΡΠ°ΡΡ Π΅ΡΡ >
Π Π°Π·ΡΠ°Π±ΠΎΡΠΊΠ° ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΠ½ΠΎΠ³ΠΎ ΠΊΠΎΠΌΠΏΠ»Π΅ΠΊΡΠ° (ΡΠ΅ΡΠ΅ΡΠ°Ρ, ΠΊΡΡΡΠΎΠ²Π°Ρ, Π΄ΠΈΠΏΠ»ΠΎΠΌ, ΠΊΠΎΠ½ΡΡΠΎΠ»ΡΠ½Π°Ρ)
- ΠΠ°Π΄Π°Π½ΠΈΠ΅ Π½Π° ΡΠ°Π·ΡΠ°Π±ΠΎΡΠΊΡ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΠ½ΠΎΠ³ΠΎ ΠΊΠΎΠΌΠΏΠ»Π΅ΠΊΡΠ°
- Π€ΡΠ½ΠΊΡΠΈΠΎΠ½Π°Π»ΡΠ½Π°Ρ ΡΡΡΡΠΊΡΡΡΠ° ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡ
- Π‘ΠΏΠ΅ΡΠΈΡΠΈΠΊΠ°ΡΠΈΡ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΠ½ΠΎΠ³ΠΎ ΠΊΠΎΠΌΠΏΠ»Π΅ΠΊΡΠ°
- Π‘ΡΡΡΠΊΡΡΡΠ½Π°Ρ Π΄ΠΈΠ°Π³ΡΠ°ΠΌΠΌΠ° ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΠ½ΠΎΠ³ΠΎ ΠΊΠΎΠΌΠΏΠ»Π΅ΠΊΡΠ°
- ΠΠ°Π½Π½ΡΠ΅ Π΄Π»Ρ ΡΠ΅ΡΡΠΈΡΠΎΠ²Π°Π½ΠΈΡ
- ΠΠ½ΡΡΡΡΠΊΡΠΈΡ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»Ρ
- ΠΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅
ΠΠ°Π΄Π°Π½ΠΈΠ΅ Π½Π° ΡΠ°Π·ΡΠ°Π±ΠΎΡΠΊΡ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΠ½ΠΎΠ³ΠΎ ΠΊΠΎΠΌΠΏΠ»Π΅ΠΊΡΠ°
Π Π°Π·ΡΠ°Π±ΠΎΡΠ°ΡΡ ΠΈΠ½ΡΠΎΡΠΌΠ°ΡΠΈΠΎΠ½Π½ΡΡ ΠΏΠΎΠ΄ΡΠΈΡΡΠ΅ΠΌΡ ΠΎΡΠ΄Π΅Π»Π° ΠΊΠ°Π΄ΡΠΎΠ².
ΠΠ½ΡΠΎΡΠΌΠ°ΡΠΈΡ, ΠΎΠ±ΡΠ°Π±Π°ΡΡΠ²Π°Π΅ΠΌΠ°Ρ Π² ΠΏΠΎΠ΄ΡΠΈΡΡΠ΅ΠΌΠ΅, Π΄ΠΎΠ»ΠΆΠ½Π° Ρ ΡΠ°Π½ΠΈΡΡΡΡ Π² ΡΠ΅ΠΊΡΡΠΎΠ²ΠΎΠΌ ΠΈΠ»ΠΈ ΡΠΈΠΏΠΈΠ·ΠΈΡΠΎΠ²Π°Π½Π½ΠΎΠΌ ΡΠ°ΠΉΠ»Π°Ρ .
ΠΠ°Π½Π½ΡΠ΅, ΠΊΠΎΡΠΎΡΡΠ΅ Π΄ΠΎΠ»ΠΆΠ½Ρ Π±ΡΡΡ ΠΎΡΡΠ°ΠΆΠ΅Π½Ρ Π² ΠΏΠΎΠ΄ΡΠΈΡΡΠ΅ΠΌΠ΅: ΡΠ°ΠΌΠΈΠ»ΠΈΡ, ΠΌΠ΅ΡΡΡ ΠΈ Π³ΠΎΠ΄ ΠΏΡΠΈΠ΅ΠΌΠ° Π½Π° ΡΠ°Π±ΠΎΡΡ, ΠΎΠ±ΡΠ°Π·ΠΎΠ²Π°Π½ΠΈΠ΅, ΡΠΏΠ΅ΡΠΈΠ°Π»ΡΠ½ΠΎΡΡΡ, ΠΏΠΎΠ», ΠΎΡΠ½ΠΎΡΠ΅Π½ΠΈΠ΅ ΠΊ Π²ΠΎΠΈΠ½ΡΠΊΠΎΠΉ ΡΠ»ΡΠΆΠ±Π΅, Π³ΠΎΠ΄ ΡΠΎΠΆΠ΄Π΅Π½ΠΈΡ.
Π‘Π²Π΅Π΄Π΅Π½ΠΈΡ ΠΎ ΡΠΎΡΡΡΠ΄Π½ΠΈΠΊΠ°Ρ ΠΏΠΎΠΏΠΎΠ»Π½ΡΡΡΡΡ ΠΏΠΎ ΠΌΠ΅ΡΠ΅ ΠΏΡΠΈΠ΅ΠΌΠ° Π½Π° ΡΠ°Π±ΠΎΡΡ.
Π ΡΠΈΡΡΠ΅ΠΌΠ΅ Π΄ΠΎΠ»ΠΆΠ½Ρ ΡΠ΅ΡΠ°ΡΡΡΡ ΡΠ»Π΅Π΄ΡΡΡΠΈΠ΅ Π·Π°Π΄Π°ΡΠΈ:
1. Π‘ΠΎΠ·Π΄Π°Π½ΠΈΠ΅ ΡΠ°ΠΉΠ»Π°.
2. ΠΠΎΠΏΠΎΠ»Π½Π΅Π½ΠΈΠ΅ ΡΠ°ΠΉΠ»Π°.
3. ΠΠΎΡΡΠ΅ΠΊΡΠΈΡΠΎΠ²ΠΊΠ° Π΄Π°Π½Π½ΡΡ Π² ΡΠ°ΠΉΠ»Π΅.
4. Π€ΠΎΡΠΌΠΈΡΠΎΠ²Π°Π½ΠΈΠ΅ ΠΎΡΠ²Π΅ΡΠΎΠ² Π½Π° Π·Π°ΠΏΡΠΎΡΡ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»Ρ:
4.1. ΠΡΠ²Π΅ΡΡΠΈ Π² Π²ΠΈΠ΄Π΅ ΡΠ°Π±Π»ΠΈΡΡ ΡΠ°ΠΌΠΈΠ»ΠΈΠΈ, ΠΎΠ±ΡΠ°Π·ΠΎΠ²Π°Π½ΠΈΠ΅, ΠΎΡΠ½ΠΎΡΠ΅Π½ΠΈΠ΅ ΠΊ Π²ΠΎΠΈΠ½ΡΠΊΠΎΠΉ ΡΠ»ΡΠΆΠ±Π΅ ΡΠΎΡΡΡΠ΄Π½ΠΈΠΊΠΎΠ² ΠΌΠ»Π°Π΄ΡΠ΅ 30 Π»Π΅Ρ;
4.2. ΠΠΏΡΠ΅Π΄Π΅Π»ΠΈΡΡ ΡΡΠ΅Π΄Π½ΠΈΠΉ Π²ΠΎΠ·ΡΠ°ΡΡ ΡΠ°Π±ΠΎΡΠ°ΡΡΠΈΡ ΠΌΡΠΆΡΠΈΠ½ ΠΈ ΠΆΠ΅Π½ΡΠΈΠ½;
4.3. ΠΡΠ²Π΅ΡΡΠΈ Π½Π° ΡΠΊΡΠ°Π½ ΡΠ°ΠΌΠΈΠ»ΠΈΠΈ ΡΠΎΡΡΡΠ΄Π½ΠΈΠΊΠΎΠ², ΠΏΡΠΈΠ½ΡΡΡΡ Π² ΡΠ΅ΠΊΡΡΠ΅ΠΌ Π³ΠΎΠ΄Ρ, Π² ΠΏΠΎΡΡΠ΄ΠΊΠ΅ ΡΠ±ΡΠ²Π°Π½ΠΈΡ ΠΈΡ Π²ΠΎΠ·ΡΠ°ΡΡΠ°;
4.4. ΠΠΎΡΡΡΠΎΠΈΡΡ Π³ΡΠ°ΡΠΈΠΊΠΈ ΠΈΠ·ΠΌΠ΅Π½Π΅Π½ΠΈΡ ΡΡΠΎΠ²Π½Ρ ΠΎΠ±ΡΠ°Π·ΠΎΠ²Π°Π½ΠΈΡ ΠΎΡ Π²ΠΎΠ·ΡΠ°ΡΡΠ°;
4.5. ΠΠΎΡΡΡΠΎΠΈΡΡ ΠΊΡΡΠ³ΠΎΠ²ΡΡ Π΄ΠΈΠ°Π³ΡΠ°ΠΌΠΌΡ, ΠΎΡΡΠ°ΠΆΠ°ΡΡΡΡ Π²ΠΎΠ·ΡΠ°ΡΡΠ½ΠΎΠ΅ ΡΠΎΠΎΡΠ½ΠΎΡΠ΅Π½ΠΈΠ΅ ΡΠ°Π±ΠΎΡΠ°ΡΡΠΈΡ : Π²ΡΠ΄Π΅Π»ΠΈΡΡ Π³ΡΡΠΏΠΏΡ Π΄ΠΎ 30 Π»Π΅Ρ, ΠΎΡ 31 Π΄ΠΎ 50 Π»Π΅Ρ, ΡΡΠ°ΡΡΠ΅ 51 Π³ΠΎΠ΄Π°;
4.6. ΠΠΎΡΡΡΠΎΠΈΡΡ ΡΡΠΎΠ»Π±ΠΈΠΊΠΎΠ²ΡΡ Π΄ΠΈΠ°Π³ΡΠ°ΠΌΠΌΡ, ΠΎΡΡΠ°ΠΆΠ°ΡΡΡΡ Π΄ΠΎΠ»Ρ ΡΠΎΡΡΡΠ΄Π½ΠΈΠΊΠΎΠ² Ρ Π²ΡΡΡΠΈΠΌ, ΡΡΠ΅Π΄Π½ΠΈΠΌ ΡΠΏΠ΅ΡΠΈΠ°Π»ΡΠ½ΡΠΌ, ΡΡΠ΅Π΄Π½ΠΈΠΌ, Π½Π΅ΠΏΠΎΠ»Π½ΡΠΌ ΡΡΠ΅Π΄Π½ΠΈΠΌ, Π½Π°ΡΠ°Π»ΡΠ½ΡΠΌ ΠΎΠ±ΡΠ°Π·ΠΎΠ²Π°Π½ΠΈΠ΅ΠΌ. Π‘ΡΠΎΠ»Π±ΠΈΠΊΠΈ Π΄ΠΈΠ°Π³ΡΠ°ΠΌΠΌΡ ΡΠ°ΡΠΏΠΎΠ»ΠΎΠΆΠΈΡΡ Π² ΠΏΠΎΡΡΠ΄ΠΊΠ΅ Π²ΠΎΠ·ΡΠ°ΡΡΠ°Π½ΠΈΡ.
Π€ΡΠ½ΠΊΡΠΈΠΎΠ½Π°Π»ΡΠ½Π°Ρ ΡΡΡΡΠΊΡΡΡΠ° ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡ
ΠΡΠΎΠ³ΡΠ°ΠΌΠΌΠ½ΡΠΉ ΠΊΠΎΠΌΠΏΠ»Π΅ΠΊΡ ΠΏΡΠ΅Π΄Π½Π°Π·Π½Π°ΡΠ΅Π½ Π΄Π»Ρ ΡΠ°Π±ΠΎΡΡ Ρ Π±Π°Π·ΠΎΠΉ Π΄Π°Π½Π½ΡΡ Π² Π²ΠΈΠ΄Π΅ ΡΠΈΠΏΠΈΠ·ΠΈΡΠΎΠ²Π°Π½Π½ΠΎΠ³ΠΎ ΡΠ°ΠΉΠ»Π° Ρ ΡΠ°ΡΡΠΈΡΠ΅Π½ΠΈΠ΅ΠΌ txt. ΠΠΎΠΌΠΏΠ»Π΅ΠΊΡ ΠΎΡΡΡΠ΅ΡΡΠ²Π»ΡΠ΅Ρ ΡΡΠ΅Π½ΠΈΠ΅, Π·Π°ΠΏΠΈΡΡ ΠΈ ΡΠΎΠ·Π΄Π°Π½ΠΈΠ΅ Π±Π°Π·Ρ.
ΠΠΎΠΌΠΈΠΌΠΎ ΡΡΠΎΠ³ΠΎ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΠ½ΡΠΉ ΠΊΠΎΠΌΠΏΠ»Π΅ΠΊΡ ΠΏΡΠ΅Π΄ΠΎΡΡΠ°Π²Π»ΡΠ΅Ρ Π²ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎΡΡΡ ΡΠΎΠ·Π΄Π°Π²Π°ΡΡ, ΡΠ΄Π°Π»ΡΡΡ ΠΈ ΡΠ΅Π΄Π°ΠΊΡΠΈΡΠΎΠ²Π°ΡΡ Π·Π°ΠΏΠΈΡΠΈ Π² ΠΠ. Π ΡΠ°ΠΊΠΆΠ΅ ΠΎΡΡΡΠ΅ΡΡΠ²Π»ΡΠ΅Ρ Π²ΡΠ±ΠΎΡΠΊΡ Π΄Π°Π½Π½ΡΡ Π½Π° ΠΎΡΠ½ΠΎΠ²Π΅ ΡΠΈΠΊΡΠΈΡΠΎΠ²Π°Π½Π½ΡΡ ΠΏΡΠ°Π²ΠΈΠ» ΠΎΡΠ±ΠΎΡΠ° ΠΈ ΠΏΠΎΡΡΡΠΎΠ΅Π½ΠΈΠ΅ Π³ΡΠ°ΡΠΈΠΊΠΎΠ² ΠΈ Π΄ΠΈΠ°Π³ΡΠ°ΠΌΠΌ.
Π‘ΠΏΠ΅ΡΠΈΡΠΈΠΊΠ°ΡΠΈΡ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΠ½ΠΎΠ³ΠΎ ΠΊΠΎΠΌΠΏΠ»Π΅ΠΊΡΠ°
ΠΡΠ½ΠΎΠ²Π½ΠΎΠΉ Π·Π°Π΄Π°ΡΠ΅ΠΉ ΡΠ²Π»ΡΠ΅ΡΡΡ ΡΠ°Π·ΡΠ°Π±ΠΎΡΠΊΠ° ΠΈΠ½ΡΠΎΡΠΌΠ°ΡΠΈΠΎΠ½Π½ΠΎΠΉ ΠΏΠΎΠ΄ΡΠΈΡΡΠ΅ΠΌΡ ΠΎΡΠ΄Π΅Π»Π° ΠΊΠ°Π΄ΡΠΎΠ². ΠΠΎΡΠΊΠΎΠ»ΡΠΊΡ Π΄Π»Ρ ΡΠ΅Π°Π»ΠΈΠ·Π°ΡΠΈΠΈ ΡΡΠ΅Π±ΡΠ΅ΡΡΡ Π΄ΡΡΠΆΠ΅ΡΡΠ²Π΅Π½Π½ΡΠΉ ΠΈΠ½ΡΠ΅ΡΡΠ΅ΠΉΡ ΡΠΎ Π±ΡΠ»ΠΎ ΠΏΡΠΈΠ½ΡΡΠΎ ΡΠ΅ΡΠ΅Π½ΠΈΠ΅ Π²Π΅ΡΡΠΈ ΡΠ°Π·ΡΠ°Π±ΠΎΡΠΊΡ Π² ΡΡΠ΅Π΄Π΅ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΠΈΡΠΎΠ²Π°Π½ΠΈΡ Delphi 7. ΠΡΠΎ ΡΠ»ΡΡΡΠ°Π΅Ρ ΠΏΠΎΡΡΠ΅Π±ΠΈΡΠ΅Π»ΡΡΠΊΠΈΠ΅ ΠΊΠ°ΡΠ΅ΡΡΠ²Π° ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΠ½ΠΎΠ³ΠΎ ΠΏΡΠΎΠ΄ΡΠΊΡΠ°, Π° ΡΠ°ΠΊΠΆΠ΅ ΠΏΠΎΠ·Π²ΠΎΠ»ΠΈΡ ΡΠΎΠ·Π΄Π°ΡΡ Π³ΡΠ°ΡΠΈΡΠ΅ΡΠΊΠΈΠΉ ΠΈΠ½ΡΠ΅ΡΡΠ΅ΠΉΡ Π΄Π»Ρ ΠΎΠΏΠ΅ΡΠ°ΡΠΈΠΎΠ½Π½ΠΎΠΉ ΡΠΈΡΡΠ΅ΠΌΡ Windows.
ΠΠ΄ΠΈΠ½ΡΡΠ²Π΅Π½Π½ΠΎΠ΅ ΡΡΠ΅Π±ΠΎΠ²Π°Π½ΠΈΠ΅ Π΄Π»Ρ Π΄Π°Π½Π½ΠΎΠ³ΠΎ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΠ½ΠΎΠ³ΠΎ ΠΏΠ°ΠΊΠ΅ΡΠ° ΡΡΠΎ Π½Π°Π»ΠΈΡΠΈΠ΅ ΠΠ‘ ΡΠ΅ΠΌΠ΅ΠΉΡΡΠ²Π° Windows.
ΠΠ½ΡΠ΅ΡΡΠ΅ΠΉΡ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΡ ΡΠΎΡΡΠΎΠΈΡ ΠΈΠ· ΠΎΡΠ½ΠΎΠ²Π½ΠΎΠΉ ΡΠΎΡΠΌΡ ΠΈ Π²ΡΠΏΠΎΠΌΠΎΠ³Π°ΡΠ΅Π»ΡΠ½ΡΡ ΡΠΎΡΠΌ, ΡΠ°ΠΊΠΈΡ ΠΊΠ°ΠΊ ΡΠΎΡΠΌΠ° ΡΠ΅Π΄Π°ΠΊΡΠΈΡΠΎΠ²Π°Π½ΠΈΡ Π·Π°ΠΏΠΈΡΠΈ, ΡΠΎΡΠΌΠ° ΠΎΡΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΡ ΡΠ΅Π·ΡΠ»ΡΡΠ°ΡΠΎΠ² Π·Π°ΠΏΡΠΎΡΠ°, ΡΠΎΡΠΌΠ° ΠΏΠΎΡΡΡΠΎΠ΅Π½ΠΈΡ Π³ΡΠ°ΡΠΈΠΊΠΎΠ², ΡΠΎΡΠΌΠ° Π²ΡΠ±ΠΎΡΠ° Π±Π°Π·Ρ Π΄Π°Π½Π½ΡΡ . ΠΠΎΠΏΠ°ΡΡΡ Π½Π° ΡΡΠΈ ΡΠΎΡΠΌΡ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»Ρ ΠΌΠΎΠΆΠ΅Ρ ΠΏΡΠΈ ΠΏΠΎΠΌΠΎΡΠΈ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½ΠΈΡ ΠΊΠ½ΠΎΠΏΠΎΠΊ Π½Π° ΠΎΡΠ½ΠΎΠ²Π½ΠΎΠΉ ΡΠΎΡΠΌΠ΅.
Π ΠΊΠ°ΡΠ΅ΡΡΠ²Π΅ Π²Ρ ΠΎΠ΄Π½ΡΡ Π΄Π°Π½Π½ΡΡ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΠ° ΠΈΡΠΏΠΎΠ»ΡΠ·ΡΠ΅Ρ ΡΠΈΠΏΠΈΠ·ΠΈΡΠΎΠ²Π°Π½Π½ΡΠΉ ΡΠ°ΠΉΠ» Π±Π°Π·Ρ Π΄Π°Π½Π½ΡΡ , Π° ΡΠ°ΠΊΠΆΠ΅ ΡΠ²Π΅Π΄Π΅Π½ΠΈΡ ΠΎ ΡΠ°Π±ΠΎΡΠ½ΠΈΠΊΠ΅ ΡΠ°ΠΊΠΈΠ΅ ΠΊΠ°ΠΊ:
Β· Π€Π°ΠΌΠΈΠ»ΠΈΡ — ΡΠ΅ΠΊΡΡΠΎΠ²ΠΎΠ΅ ΠΏΠΎΠ»Π΅ Ρ ΠΌΠ°ΠΊΡΠΈΠΌΠ°Π»ΡΠ½ΠΎΠΉ Π΄Π»ΠΈΠ½Π½ΠΎΠΉ 100 ΡΠΈΠΌΠ²ΠΎΠ»ΠΎΠ²;
Β· ΠΠ°ΡΠ° ΠΏΡΠΈΠ΅ΠΌΠ° Π½Π° ΡΠ°Π±ΠΎΡΡ — ΠΏΠΎΠ»Π΅ ΡΠΈΠΏΠ° TDate;
Β· ΠΠ±ΡΠ°Π·ΠΎΠ²Π°Π½ΠΈΠ΅ — ΡΠ΅ΠΊΡΡΠΎΠ²ΠΎΠ΅ ΠΏΠΎΠ»Π΅ Π΄Π»ΠΈΠ½Π½ΠΎΠΉ 100 ΡΠΈΠΌΠ²ΠΎΠ»ΠΎΠ²;
Β· Π‘ΠΏΠ΅ΡΠΈΠ°Π»ΡΠ½ΠΎΡΡΡ — ΡΠ΅ΠΊΡΡΠΎΠ²ΠΎΠ΅ ΠΏΠΎΠ»Π΅ Π΄Π»ΠΈΠ½Π½ΠΎΠΉ 100 ΡΠΈΠΌΠ²ΠΎΠ»ΠΎΠ²;
Β· ΠΠΎΠ» — ΠΏΠΎΠ»Π΅ ΡΠΈΠΏΠ° byte;
Β· ΠΡΠ½ΠΎΡΠ΅Π½ΠΈΠ΅ ΠΊ Π²ΠΎΠΈΠ½ΡΠΊΠΎΠΉ ΡΠ»ΡΠΆΠ±Π΅ — ΡΠ΅ΠΊΡΡΠΎΠ²ΠΎΠ΅ ΠΏΠΎΠ»Π΅ Π΄Π»ΠΈΠ½Π½ΠΎΠΉ 100 ΡΠΈΠΌΠ²ΠΎΠ»ΠΎΠ²;
Β· ΠΠΎΠ΄ ΡΠΎΠΆΠ΄Π΅Π½ΠΈΡ — ΠΏΠΎΠ»Π΅ ΡΠΈΠΏΠ° TDate.
Π ΠΊΠ°ΡΠ΅ΡΡΠ²Π΅ Π²ΡΡ ΠΎΠ΄Π½ΡΡ Π΄Π°Π½Π½ΡΡ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΡ Π²ΡΡΡΡΠΏΠ°Π΅Ρ ΡΠ°ΠΉΠ» Π±Π°Π·Ρ Π΄Π°Π½Π½ΡΡ . Π ΡΠ°ΠΊΠΆΠ΅ Π³ΡΠ°ΡΠΈΡΠ΅ΡΠΊΠΎΠ΅ ΠΎΡΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΠ΅ ΡΠ΅Π·ΡΠ»ΡΡΠ°ΡΠΎΠ² Π·Π°ΠΏΡΠΎΡΠΎΠ² ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»Ρ. ΠΠ· Π³ΡΠ°ΡΠΈΡΠ΅ΡΠΊΠΎΠΉ ΠΈΠ½ΡΠΎΡΠΌΠ°ΡΠΈΠΈ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»Ρ ΠΌΠΎΠΆΠ΅Ρ ΠΏΠΎΠ»ΡΡΠΈΡΡ ΡΠ»Π΅Π΄ΡΡΡΠΈΠ΅ ΡΠΈΠΏΡ ΠΎΠ±ΡΠ΅ΠΊΡΠΎΠ²:
Β· Π’Π°Π±Π»ΠΈΡΠ° Ρ Π΄Π°Π½Π½ΡΠΌΠΈ;
Β· ΠΡΠ°ΡΠΈΠΊ;
Β· Π’Π΅ΠΊΡΡΠΎΠ²Π°Ρ ΠΈΠ½ΡΠΎΡΠΌΠ°ΡΠΈΡ.
ΠΠΎΡΠΊΠΎΠ»ΡΠΊΡ Π²ΡΡ ΠΈΠ½ΡΠΎΡΠΌΠ°ΡΠΈΡ ΠΏΡΠΎΠ²Π΅ΡΡΠ΅ΡΡΡ ΠΏΡΠΈ Π²Π²ΠΎΠ΄Π΅ ΠΈ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»Ρ Π²ΡΠ±ΠΈΡΠ°Π΅Ρ ΡΠΎΠ»ΡΠΊΠΎ ΡΠΎ, ΡΡΠΎ ΠΌΠΎΠΆΠ΅Ρ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΡΡΡ Π² Π΄Π°Π½Π½ΠΎΠΌ ΠΏΠΎΠ»Π΅, ΡΠΎ Π»ΠΎΠ²ΠΈΡΡΡ Π²ΡΠ΅Π³ΠΎ ΠΎΠ΄Π½Π° ΠΎΡΠΈΠ±ΠΊΠ° ΡΠ²ΡΠ·Π°Π½Π½Π°Ρ Ρ ΠΏΠΎΠΏΡΡΠΊΠΎΠΉ ΡΠ΅Π΄Π°ΠΊΡΠΈΡΠΎΠ²Π°Π½ΠΈΡ ΠΏΡΡΡΠΎΠΉ ΡΡΡΠΎΠΊΠΈ ΡΠ°Π±Π»ΠΈΡΡ Π΄Π°Π½Π½ΡΡ .
Π‘ΡΡΡΠΊΡΡΡΠ½Π°Ρ Π΄ΠΈΠ°Π³ΡΠ°ΠΌΠΌΠ° ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΠ½ΠΎΠ³ΠΎ ΠΊΠΎΠΌΠΏΠ»Π΅ΠΊΡΠ°
Π‘Ρ Π΅ΠΌΠ° ΠΏΠΎΡΡΡΠΎΠ΅Π½ΠΈΡ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΠ½ΠΎΠ³ΠΎ ΡΡΠ΅Π΄ΡΡΠ²Π° ΠΈ ΠΎΡΠ½ΠΎΠ²Π½ΡΡ ΠΊΠ»Π°ΡΡΠΎΠ²:
ΠΠ°Π½Π½ΡΠ΅ Π΄Π»Ρ ΡΠ΅ΡΡΠΈΡΠΎΠ²Π°Π½ΠΈΡ
Π€Π°ΠΌΠΈΠ»ΠΈΡ | ΠΠ°ΡΠ° ΡΠΎΠΆΠ΄Π΅Π½ΠΈΡ | ΠΡΠΈΠ½ΡΡ Π½Π° ΡΠ°Π±ΠΎΡΡ | ΠΠΎΠ» | ΠΠ±ΡΠ°Π·ΠΎΠ²Π°Π½ΠΈΠ΅ | Π‘ΠΏΠ΅ΡΠΈΠ°Π»ΡΠ½ΠΎΡΡΡ | ΠΡΠ½ΠΎΡΠ΅Π½ΠΈΠ΅ ΠΊ Π²ΠΎΠΈΠ½ΡΠΊΠΎΠΉ ΡΠ»ΡΠΆΠ±Π΅ | |
ΠΠ΅ΡΡΠΎΠ² | 03.12.1956 | 12.12.2001 | ΠΌΡΠΆ | ΠΡΡΡΠ΅Π΅ | ΠΠ½ΠΆΠ΅Π½Π΅Ρ | Π Π·Π°ΠΏΠ°ΡΠ΅ | |
ΠΠ²Π°Π½ΠΎΠ² | 15.01.1990 | 11.12.2009 | ΠΌΡΠΆ | Π‘ΡΠ΅Π΄Π½Π΅Π΅ | Π’Π΅Ρ Π½ΠΈΠΊ | Π Π·Π°ΠΏΠ°ΡΠ΅ | |
Π€Π΅Π΄ΠΎΡΠΎΠ²Π° | 30.04.1964 | 04.11.2004 | ΠΆΠ΅Π½ | ΠΡΡΡΠ΅Π΅ | ΠΡΡ Π³Π°Π»ΡΠ΅Ρ | ||
Π‘ΠΈΠ΄ΠΎΡΠΎΠ² | 24.07.1992 | 0707.2010 | ΠΌΡΠΆ | ΠΠ°ΡΠ°Π»ΡΠ½ΠΎΠ΅ | ΠΡΡΡΠ΅Ρ | ΠΡΠΈΠ·ΡΠ²Π½ΠΈΠΊ | |
ΠΠ½ΡΡΡΡΠΊΡΠΈΡ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»Ρ
ΠΡΠΈ Π·Π°ΠΏΡΡΠΊΠ΅ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΡ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»Ρ ΠΏΠΎΠΏΠ°Π΄Π°Π΅Ρ, Π½ΠΎ ΠΎΡΠ½ΠΎΠ²Π½ΠΎΠ΅ ΠΎΠΊΠ½ΠΎ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΡ:
ΠΡΠ»ΠΈ Π½Π΅ΠΎΠ±Ρ ΠΎΠ΄ΠΈΠΌΠΎ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΡ ΡΠΆΠ΅ ΡΠΎΠ·Π΄Π°Π½Π½ΡΡ Π±Π°Π·Ρ ΡΠΎ Π½Π΅ΠΎΠ±Ρ ΠΎΠ΄ΠΈΠΌΠΎ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΡ ΠΊΠ½ΠΎΠΏΠΊΡ «ΠΡΠ±ΡΠ°ΡΡ Π±Π°Π·Ρ». ΠΠΎΡΠ»Π΅ ΡΡΠΎΠ³ΠΎ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»Ρ ΠΏΠΎΠΏΠ°Π΄Π΅Ρ Π½Π° ΠΎΠΊΠ½ΠΎ Π²ΡΠ±ΠΎΡΠ° ΡΠΎΠ·Π΄Π°Π½ΠΈΡ ΠΈΠ»ΠΈ ΠΎΡΠΊΡΡΡΠΈΡ ΡΡΡΠ΅ΡΡΠ²ΡΡΡΠ΅ΠΉ Π±Π°Π·Ρ.
ΠΠ»Ρ ΡΠΎΠ³ΠΎ ΡΡΠΎ Π±Ρ Π²ΡΠ±ΡΠ°ΡΡ Π±Π°Π·Ρ Π½Π΅ΠΎΠ±Ρ ΠΎΠ΄ΠΈΠΌΠΎ Π½Π°ΠΆΠ°ΡΡ Π½Π° ΠΊΠ½ΠΎΠΏΠΊΡ «…» ΠΈ Π² ΠΎΡΠΊΡΡΠ²ΡΠ΅ΠΌΡΡ ΠΎΠΊΠ½Π΅ Π·Π°Π΄Π°ΡΡ ΠΈΠΌΡ ΠΈΠ»ΠΈ Π²ΡΠ±ΡΠ°ΡΡ ΡΠΆΠ΅ ΡΡΡΠ΅ΡΡΠ²ΡΡΡΠΈΠΉ ΡΠ°ΠΉΠ» Π±Π°Π·Ρ.
ΠΠ½ΠΈΠΌΠ°Π½ΠΈΠ΅: ΠΡΠ»ΠΈ Π²ΡΠ±ΡΠ°Π½ ΡΠ΅ΠΆΠΈΠΌ ΡΠΎΠ·Π΄Π°Π½ΠΈΡ ΠΠ ΠΈ ΡΠΊΠ°Π·ΡΠ²Π°Π΅ΡΡΡ ΡΡΡΠ΅ΡΡΠ²ΡΡΡΠΈΠΉ ΡΠ°ΠΉΠ», ΡΠΎ ΠΎΠ½ Π±ΡΠ΄Π΅Ρ ΠΏΠ΅ΡΠ΅Π·Π°ΠΏΠΈΡΠ°Π½.
ΠΡΠΈ ΡΡΠΎΠΌ Π΄Π°ΠΆΠ΅ Π΅ΡΠ»ΠΈ Π½Π΅ Π·Π°Π³ΡΡΠΆΠ°ΡΡ Π±Π°Π·Ρ Π΅ΡΡΡ Π²ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎΡΡΡ ΡΠΎΠ·Π΄Π°Π²Π°ΡΡ Π½ΠΎΠ²ΡΠ΅ Π·Π°ΠΏΠΈΡΠΈ. ΠΠΎ Π·Π°Π²Π΅ΡΡΠ΅Π½ΠΈΡ ΡΠ°Π±ΠΎΡΡ ΠΈ Π·Π°ΠΊΡΡΡΠΈΡ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΡ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»Ρ Π±ΡΠ΄Π΅Ρ ΠΏΡΠ΅Π΄Π»ΠΎΠΆΠ΅Π½ΠΎ ΡΠΎΡ ΡΠ°Π½ΠΈΡΡ Π²Π½Π΅ΡΠ΅Π½Π½ΡΠ΅ ΠΈΠ·ΠΌΠ΅Π½Π΅Π½ΠΈΡ.
Π£ΠΏΡΠ°Π²Π»ΡΡΡ Π·Π°ΠΏΠΈΡΡΠΌΠΈ ΠΌΠΎΠΆΠ½ΠΎ ΠΈΡΠΏΠΎΠ»ΡΠ·ΡΡ ΡΡΠΈ ΠΊΠ½ΠΎΠΏΠΊΠΈ Π²Π½ΠΈΠ·Ρ ΡΠΊΡΠ°Π½Π°. ΠΡΠΈ ΠΏΠΎΠΌΠΎΡΠΈ ΡΡΠΈΡ ΠΊΠ½ΠΎΠΏΠΎΠΊ ΠΌΠΎΠΆΠ½ΠΎ ΡΠΎΠ·Π΄Π°Π²Π°ΡΡ. Π£Π΄Π°Π»ΡΡΡ ΠΈΠ»ΠΈ ΡΠ΅Π΄Π°ΠΊΡΠΈΡΠΎΠ²Π°ΡΡ Π·Π°ΠΏΠΈΡΠΈ.
Π‘ΡΡΠ΅ΡΡΠ²ΡΠ΅Ρ Π²ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎΡΡΡ Π²ΡΠΏΠΎΠ»Π½Π΅Π½ΠΈΡ ΠΎΠΏΡΠ΅Π΄Π΅Π»Π΅Π½Π½ΡΡ Π·Π°ΠΏΡΠΎΡΠΎΠ². ΠΠ»Ρ Π²ΡΠ±ΠΎΡΠ° Π½ΡΠΆΠ½ΠΎΠ³ΠΎ Π·Π°ΠΏΡΠΎΡΠ° Π½Π΅ΠΎΠ±Ρ ΠΎΠ΄ΠΈΠΌΠΎ Π²ΠΎΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΡΡΡ Π²ΡΠΏΠ°Π΄Π°ΡΡΠΈΠΌ ΡΠΏΠΈΡΠΊΠΎΠΌ Π² Π²Π΅ΡΡ Π½Π΅ΠΉ ΡΠ°ΡΡΠΈ ΡΠΊΡΠ°Π½Π°, ΠΏΠΎΡΠ»Π΅ ΡΠ΅Π³ΠΎ Π½Π°ΠΆΠ°ΡΡ Π½Π° ΠΊΠ½ΠΎΠΏΠΊΡ «ΠΡΠΏΠΎΠ»Π½ΠΈΡΡ Π·Π°ΠΏΡΠΎΡ». ΠΠ°ΠΊ ΡΠΎΠ»ΡΠΊΠΎ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΠ° ΠΎΡΡΡΠ΅ΡΡΠ²ΠΈΡ Π²ΡΠ±ΠΎΡΠΊΡ Π½Π° ΡΠΊΡΠ°Π½ Π±ΡΠ΄Π΅Ρ Π²ΡΠ²Π΅Π΄Π΅Π½Π° ΡΠΎΡΠΌΠ° Ρ ΡΠ΅Π·ΡΠ»ΡΡΠ°ΡΠ°ΠΌΠΈ Π·Π°ΠΏΡΠΎΡΠ°.
Π³ΡΠ°ΡΠΈΠΊ Π΄ΠΈΠ°Π³ΡΠ°ΠΌΠΌΠ° ΡΠΈΠΏΠΈΠ·ΠΈΡΠΎΠ²Π°Π½Π½ΡΠΉ ΡΠ°ΠΉΠ»
ΠΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅. ΠΡΡ ΠΎΠ΄Π½ΡΠ΅ ΡΠ΅ΠΊΡΡΡ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΠ½ΡΡ ΠΌΠΎΠ΄ΡΠ»Π΅ΠΉ
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Menus, Grids, DBGrids, DB, DBTables;
type
TWorker=record
FIO: string[100];
StartWork: TDate;
Edication: String[100];
Spec: String[100];
sex: byte;
Armi: String[100];
BirthDay: TDate;
end;
type
TForm1 = class (TForm)
MainMenu1: TMainMenu;
File1: TMenuItem;
Exit1: TMenuItem;
Button1: TButton;
Button2: TButton;
Button3: TButton;
StringGrid1: TStringGrid;
Button4: TButton;
Button5: TButton;
ComboBox1: TComboBox;
procedure Exit1Click (Sender: TObject);
procedure Button1Click (Sender: TObject);
procedure ReadData (fileName:string; new: bool);
procedure Button2Click (Sender: TObject);
procedure Button4Click (Sender: TObject);
procedure TableRowToWorker (index:integer; table: TStringGrid);
procedure AddRowToTable (row:TWorker; table: TStringGrid);
procedure EditTableRow (row:TWorker; table: TStringGrid);
procedure Button5Click (Sender: TObject);
procedure FormClose (Sender: TObject; var Action: TCloseAction);
procedure SetBase ();
procedure WriteData (fileName:string; table: TStringGrid);
procedure Button3Click (Sender: TObject);
procedure FormShow (Sender: TObject);
private
{ Private declarations }
Worker:TWorker;
Base:String;
tableDS:TDataSet;
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses Unit2, Unit3, DateUtils, Unit4, Unit5, Unit6, Unit7;
{$R *.dfm}
procedure TForm1. Exit1Click (Sender: TObject);
begin
Close;
end;
procedure TForm1. Button1Click (Sender: TObject);
begin
SetBase ();
end;
//Π²ΡΠ²ΠΎΠ΄ΠΈΡ ΡΠΎΡΠΌΡ Π²ΡΠ±ΠΎΡΠ° ΡΠ°ΠΉΠ»Π° Ρ Π±Π°Π·ΠΎΠΉ Π΄Π°Π½Π½ΡΡ
procedure TForm1. SetBase ();
var
i:integer;
begin
if Form2. ShowModal = mrOk then
begin
if Form2. RadioButton1.Checked then
begin
Base := Form2. Edit1.Text;
ReadData (Base, true);
end
else
begin
Base := Form2. Edit3.Text;
ReadData (Base, false);
end;
end;
end;
//ΠΏΠ΅ΡΠ΅Π²ΠΎΠ΄ΠΈΡ ΠΎΠ±ΡΠ΅ΠΊΡ ΡΠΈΠΏΠ° TWorker Π² ΡΡΡΠΎΠΊΡ ΡΠ°Π±Π»ΠΈΡΡ
//row — Π½ΠΎΠ²Π°Ρ ΡΡΡΠΎΠΊΠ° ΡΠΈΠΏΠ° TWorker
//table — ΡΠ°Π±Π»ΠΈΡΠ°, Π² ΠΊΠΎΡΠΎΡΡΡ Π΄ΠΎΠ±Π°Π²Π»ΡΠ΅ΡΡΡ ΡΡΡΠΎΠΊΠ°
procedure TForm1. AddRowToTable (row:TWorker; table: TStringGrid);
begin
table.Cells[0, table. RowCount — 1] := row. FIO;
table.Cells[1, table. RowCount — 1] := DateToStr (row.StartWork);
table.Cells[2, table. RowCount — 1] := row. Edication;
table.Cells[3, table. RowCount — 1] := row. Spec;
if row. sex = 0 then
table.Cells[4, table. RowCount — 1] := 'ΠΌΡΠΆ'
else
table.Cells[4, table. RowCount — 1] := 'ΠΆΠ΅Π½';
table.Cells[5, table. RowCount — 1] := row. Armi;
table.Cells[6, table. RowCount — 1] := DateToStr (row.BirthDay);
table.RowCount := table. RowCount + 1;
end;
//ΠΠ½ΠΎΡΠΈΡ ΠΈΠ·ΠΌΠ΅Π½Π΅Π½ΠΈΡ Π² ΠΎΡΡΠ΅Π΄Π°ΠΊΡΠΈΡΠΎΠ²Π°Π½Π½ΡΡ ΡΡΡΠΎΠΊΡ
//row — ΠΎΡΡΠ΅Π΄Π°ΠΊΡΠΈΡΠΎΠ²Π°Π½Π½ΡΠ΅ Π΄Π°Π½Π½ΡΠ΅ ΡΠΈΠΏΠ° TWorker
//table — ΡΠ°Π±Π»ΠΈΡΠ°, Π² ΠΊΠΎΡΠΎΡΡΡ Π²Π½ΠΎΡΡΡΡΡ ΠΈΠ·ΠΌΠ΅Π½Π΅Π½ΠΈΡ
procedure TForm1. EditTableRow (row:TWorker; table: TStringGrid);
var
i:integer;
begin
i := table.Selection.Top;
table.Cells[0, i] := row. FIO;
table.Cells[1, i] := DateToStr (row.StartWork);
table.Cells[2, i] := row. Edication;
table.Cells[3, i] := row. Spec;
if row. sex = 0 then
table.Cells[4, i] := 'ΠΌΡΠΆ'
else
table.Cells[4, i] := 'ΠΆΠ΅Π½';
table.Cells[5, i] := row. Armi;
table.Cells[6, i] := DateToStr (row.BirthDay);
end;
//ΠΡΠ΅ΠΎΠ±ΡΠ°Π·ΡΠ΅Ρ ΡΡΡΠΎΠΊΡ ΡΠ°Π±Π»ΠΈΡΡ Π² TWorker
//index — Π½ΠΎΠΌΠ΅Ρ ΡΡΡΠΎΠΊΠΈ
//table — ΡΠ°Π±Π»ΠΈΡΠ°, Π² ΠΊΠΎΡΠΎΡΠΎΠΉ Π½Π°Ρ ΠΎΠ΄ΡΡΡΡ Π΄Π°Π½Π½ΡΠ΅
procedure TForm1. TableRowToWorker (index:integer; table: TStringGrid);
var
i:integer;
begin
i := index;
Worker.FIO := table. Cells[0, i];
Worker.StartWork := StrToDate (table.Cells[1, i]);
Worker.Edication := table. Cells[2, i];
Worker.Spec := table. Cells[3, i];
if table. Cells[4, i] = 'ΠΌΡΠΆ' then
Worker.sex := 0
else
Worker.sex := 1;
Worker.Armi := table. Cells[5, i];
Worker.BirthDay := StrToDate (table.Cells[6, i]);
end;
//ΡΠΈΡΠ°Π΅Ρ Π΄Π°Π½Π½ΡΠ΅ ΠΈΠ· ΡΠ°ΠΉΠ»Π° Π² ΡΠ°Π±Π»ΠΈΡΡ
// fileName — ΠΈΠΌΡ ΡΠ°ΠΉΠ»Π° ΠΈ ΠΏΡΡΡ ΠΊ Π½Π΅ΠΌΡ
//new — ΠΏΠΎΠΊΠ°Π·ΡΠ²Π°Π΅Ρ ΠΎΡΡΡΠ²Π°Π΅ΡΡΡ ΡΡΡΠ΅ΡΡΠ²ΡΡΡΠ°Ρ Π±Π°Π·Π° ΠΈΠ»ΠΈ ΡΠΎΠ·Π΄Π°Π΅ΡΡΡ Π½ΠΎΠ²Π°Ρ
procedure TForm1. ReadData (fileName:string; new: bool);
var
F:File of TWorker;
size:integer;
begin
AssignFile (F, fileName);
if new then
begin
Rewrite (F);
end
else
begin
Reset (F);
Seek (F, 0);
while (not EOF (F)) do
begin
Read (F, Worker);
AddRowToTable (Worker, StringGrid1);
end;
end;
CloseFile (F);
end;
//ΡΠΎΠ±ΡΡΠΈΠ΅ ΠΏΡΠΈ Π½Π°ΠΆΠ°ΡΠΈΠΈ ΠΊΠ½ΠΎΠΏΠΊΠΈ ΡΠΎΠ·Π΄Π°Π½ΠΈΡ Π½ΠΎΠ²ΠΎΠΉ Π·Π°ΠΏΠΈΡΠΈ
procedure TForm1. Button2Click (Sender: TObject);
begin
Form3.editRecord := false;
if Form3. ShowModal = mrOk then
begin
Worker := Form3. Worker;
AddRowToTable (Worker, StringGrid1);
//Worker.StartWork := Form3. Edit1;
end;
end;
//ΡΠΎΠ±ΡΡΠΈΠ΅ ΠΏΡΠΈ Π½Π°ΠΆΠ°ΡΠΈΠΈ ΡΠ΅Π΄Π°ΠΊΡΠΈΡΠΎΠ²Π°Π½ΠΈΡ
procedure TForm1. Button4Click (Sender: TObject);
begin
try
Form3.editRecord := true;
TableRowToWorker (StringGrid1.Selection.Top, StringGrid1);
Form3.Worker := Worker;
if Form3. ShowModal = mrOk then
begin
Worker := Form3. Worker;
EditTableRow (Worker, StringGrid1);
end;
except
MessageDlg ('ΠΡΠΈ ΠΏΠΎΠΏΡΡΠΊΠΈ ΡΠ΅Π΄Π°ΠΊΡΠΈΡΠΎΠ²Π°Π½ΠΈΡ ΠΏΡΠΎΠΈΠ·ΠΎΡΠ»Π° ΠΎΡΠΈΠ±ΠΊΠ°', mtError,[mbOK], 0);
end;
end;
//Π€ΡΠ½ΠΊΡΠΈΡ ΡΠ΄Π°Π»Π΅Π½ΠΈΡ ΡΡΡΠΎΠΊΠΈ ΠΈΠ· TStringGrid
//RowNumber — Π½ΠΎΠΌΠ΅Ρ ΡΡΡΠΎΠΊΠΈ
//Grid — ΡΠ°Π±Π»ΠΈΡΠ° ΠΈΠ· ΠΊΠΎΡΠΎΡΠΎΠΉ ΠΏΡΠΎΠΈΡΡ ΠΎΠ΄ΠΈΡ ΡΠ΄Π°Π»Π΅Π½ΠΈΠ΅
procedure GridDeleteRow (RowNumber: Integer; Grid: TstringGrid);
var
i: Integer;
begin
Grid.Row := RowNumber;
if (Grid.Row = Grid. RowCount — 1) then
{ On the last row}
Grid.RowCount := Grid. RowCount — 1
else
begin
{ Not the last row}
for i := RowNumber to Grid. RowCount — 1 do
Grid.Rows[i] := Grid. Rows[i + 1];
Grid.RowCount := Grid. RowCount — 1;
end;
end;
//Π£Π΄Π°Π»Π΅Π½ΠΈΠ΅ ΡΡΡΠΎΠΊ
procedure TForm1. Button5Click (Sender: TObject);
var
i, n, start:integer;
begin
n := StringGrid1.Selection.Bottom — StringGrid1.Selection.Top + 1;
start:= StringGrid1.Selection.Top;
if StringGrid1.Selection.Bottom < StringGrid1.Selection.Top then
start:= StringGrid1.Selection.Bottom;
for i := 1 to n do
begin
GridDeleteRow (start + i — 1, StringGrid1);
end;
end;
procedure TForm1. FormClose (Sender: TObject; var Action: TCloseAction);
var
res:integer;
begin
if Base = '' then
begin
res := MessageDlg ('Π‘ΠΎΡ ΡΠ°Π½ΠΈΡΡ Π·Π°ΠΏΠΈΡΠΈ?', mtInformation,[mbYes, mbNo], 0);
if res = mrYes then
SetBase ()
else
exit;
end;
WriteData (Base, StringGrid1);
end;
//Π·Π°ΠΏΠΈΡΡ Π΄Π°Π½Π½ΡΡ Π² ΡΠ°ΠΉΠ» Π±Π°Π·Ρ
//fileName — ΠΈΠΌΡ ΠΈ ΠΏΡΡΡ ΠΊ ΡΠ°ΠΉΠ»Ρ Π±Π°Π·Ρ
//table — Π’Π°Π±Π»ΠΈΡΠ° Ρ Π΄Π°Π½Π½ΡΠΌΠΈ
procedure TForm1. WriteData (fileName:string; table: TStringGrid);
var
F:File of TWorker;
i:integer;
begin
AssignFile (F, fileName);
Reset (F);
Seek (F, 0);
for i := 1 to table. RowCount-2 do
begin
TableRowToWorker (i, StringGrid1);
Write (F, Worker);
end;
CloseFile (F);
end;
//Π€ΡΠ½ΠΊΡΠΈΡ Π±ΡΡΡΡΠΎΠΉ ΡΠΎΡΡΠΈΡΠΎΠ²ΠΊΠΈ
//Π — ΠΌΠ°ΡΡΠΈΠ² Π΄Π»Ρ ΡΠΎΡΡΠΈΡΠΎΠ²ΠΊΠΈ
//iLo — Π½Π°ΡΠ°Π»ΠΎ ΠΌΠ°ΡΡΠΈΠ²Π°
//iHi — ΠΊΠΎΠ½Π΅Ρ ΠΌΠ°ΡΡΠΈΠ²Π°
procedure QuickSort (var A: array of TWorker; iLo, iHi: Integer);
var
Lo, Hi: Integer;
Pivot :TDate;
T: TWorker;
begin
Lo := iLo;
Hi := iHi;
Pivot := A[(Lo + Hi) div 2]. BirthDay;
repeat
while A[Lo]. BirthDay < Pivot do Inc (Lo) ;
while A[Hi]. BirthDay > Pivot do Dec (Hi) ;
if Lo <= Hi then
begin
T := A[Lo];
A[Lo] := A[Hi];
A[Hi] := T;
Inc (Lo) ;
Dec (Hi) ;
end;
until Lo > Hi;
if Hi > iLo then QuickSort (A, iLo, Hi) ;
if Lo < iHi then QuickSort (A, Lo, iHi) ;
end;
//ΠΡΠΏΠΎΠ»Π½ΡΠ΅Ρ Π·Π°ΠΏΡΠΎΡΡ
procedure TForm1. Button3Click (Sender: TObject);
var
i:integer;
Workers:array of TWorker;
y1,m1,d1,y2,m2,d2:Word;
MAge, WAge: real;
MStch, WStch: integer;
begin
if ComboBox1. ItemIndex = 0 then
begin
SetLength (Workers, StringGrid1. RowCount — 2);
DecodeDate (Now, y2, m2,d2);
for i := 1 to StringGrid1. RowCount — 2 do
begin
TableRowToWorker (i, StringGrid1);
DecodeDate (Worker.BirthDay, y1, m1,d1);
if (abs (y2 — y1) <= 30) and (Worker.sex = 0) then
Workers[i-1] := Worker;
end;
Form4.FillTable (Workers);
Form4.ShowModal;
end
else
if ComboBox1. ItemIndex = 1 then
begin
DecodeDate (Now, y2, m2,d2);
MStch := 0;
WStch := 0;
for i := 1 to StringGrid1. RowCount — 2 do
begin
TableRowToWorker (i, StringGrid1);
DecodeDate (Worker.BirthDay, y1, m1,d1);
if (Worker.sex = 0) then
begin
MAge := MAge + y2 — y1;
MStch := MStch +1;
end
else
begin
WAge := WAge + y2 — y1;
WStch := WStch +1;
end;
end;
MAge := MAge / MStch;
WAge := WAge / WStch;
Form5.Label3.Caption := FloatToStrF (MAge, ffGeneral, 8, 2);
Form5.Label4.Caption := FloatToStrF (WAge, ffGeneral, 8, 2);
Form5.ShowModal;
end
else
if ComboBox1. ItemIndex = 2 then
begin
SetLength (Workers, StringGrid1. RowCount — 1);
DecodeDate (Now, y2, m2,d2);
for i := 1 to StringGrid1. RowCount — 2 do
begin
TableRowToWorker (i, StringGrid1);
DecodeDate (Worker.StartWork, y1, m1,d1);
if y2 = y1 then
Workers[i] := Worker;
end;
if (Length (Workers) > 3) then
QuickSort (Workers, 1, Length (Workers))
else
if Workers[1]. BirthDay < Workers[1]. BirthDay then
begin
worker := Workers[1];
Workers[1] := Workers[2];
Workers[2] := worker;
end;
Form6.FillTable (Workers);
Form6.ShowModal;
end
else
if ComboBox1. ItemIndex = 3 then
begin
SetLength (Workers, StringGrid1. RowCount — 2);
for i := 1 to StringGrid1. RowCount — 2 do
begin
TableRowToWorker (i, StringGrid1);
Workers[i-1] := Worker;
end;
Form7.FillTable (Workers);
Form7.ShowModal;
end
else
if ComboBox1. ItemIndex = 4 then
begin
SetLength (Workers, StringGrid1. RowCount — 2);
for i := 1 to StringGrid1. RowCount — 2 do
begin
TableRowToWorker (i, StringGrid1);
Workers[i-1] := Worker;
end;
Form7.FillKrug (Workers);
Form7.ShowModal;
end
else
if ComboBox1. ItemIndex = 5 then
begin
SetLength (Workers, StringGrid1. RowCount — 2);
for i := 1 to StringGrid1. RowCount — 2 do
begin
TableRowToWorker (i, StringGrid1);
Workers[i-1] := Worker;
end;
Form7.FillStolb (Workers);
Form7.ShowModal;
end;
end;
procedure TForm1. FormShow (Sender: TObject);
begin
StringGrid1.Cells[0,0] := 'Π€Π°ΠΌΠΈΠ»ΠΈΡ';
StringGrid1.Cells[1,0] := 'ΠΡΠΈΠ½ΡΡ';
StringGrid1.Cells[2,0] := 'ΠΠ±ΡΠ°Π·ΠΎΠ²Π°Π½ΠΈΠ΅';
StringGrid1.Cells[3,0] := 'Π‘ΠΏΠ΅ΡΠΈΠ°Π»ΠΈΠ·Π°ΡΠΈΡ';
StringGrid1.Cells[4,0] := 'ΠΠΎΠ»';
StringGrid1.Cells[5,0] := 'ΠΡΠ½. ΠΊ ΡΠ»ΡΠΆΠ±Π΅';
StringGrid1.Cells[6,0] := 'ΠΠ°ΡΠ° ΡΠΎΠΆΠ΄Π΅Π½ΠΈΡ';
end;
end.
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm2 = class (TForm)
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
Edit1: TEdit;
Label1: TLabel;
Label3: TLabel;
Edit3: TEdit;
Button1: TButton;
Button2: TButton;
Button3: TButton;
OpenDialog1: TOpenDialog;
SaveDialog1: TSaveDialog;
procedure RadioButton1Click (Sender: TObject);
procedure RadioButton2Click (Sender: TObject);
procedure Button2Click (Sender: TObject);
procedure Button3Click (Sender: TObject);
procedure Button1Click (Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
procedure TForm2. RadioButton1Click (Sender: TObject);
begin
Label1.Enabled := true;
Edit1.Enabled := true;
Edit3.Enabled := false;
Label3.Enabled := false;
Button2.Enabled := true;
Button3.Enabled := false;
end;
procedure TForm2. RadioButton2Click (Sender: TObject);
begin
Label1.Enabled := false;
Edit1.Enabled := false;
Button2.Enabled := false;
Edit3.Enabled := true;
Label3.Enabled := true;
Button3.Enabled := true;
end;
procedure TForm2. Button2Click (Sender: TObject);
begin
if SaveDialog1. Execute then
begin
Edit1.Text := SaveDialog1. FileName+'.txt';
end
end;
procedure TForm2. Button3Click (Sender: TObject);
begin
if OpenDialog1. Execute then
begin
Edit3.Text := OpenDialog1. FileName;
end;
end;
procedure TForm2. Button1Click (Sender: TObject);
begin
ModalResult := mrOk;
//Close;
end;
end.
unit Unit3;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls, Unit1;
type
TForm3 = class (TForm)
Label1: TLabel;
Edit1: TEdit;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
ComboBox1: TComboBox;
Edit2: TEdit;
ComboBox2: TComboBox;
Edit3: TEdit;
DateTimePicker1: TDateTimePicker;
DateTimePicker2: TDateTimePicker;
Button1: TButton;
Button2: TButton;
procedure Button1Click (Sender: TObject);
procedure Button2Click (Sender: TObject);
procedure ClearFields ();
procedure FormShow (Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
Worker:TWorker;
editRecord:bool;
end;
var
Form3: TForm3;
implementation
{$R *.dfm}
procedure TForm3. ClearFields ();
begin
Edit1.Text := '';
DateTimePicker2.Date := Now;
ComboBox1.ItemIndex := 0;
Edit2.Text := '';
ComboBox2.ItemIndex := 0;
Edit3.Text := '';
DateTimePicker1.Date := Now;
end;
procedure TForm3. Button1Click (Sender: TObject);
begin
Worker.FIO := Edit1. Text;
Worker.StartWork := DateTimePicker2. Date;
Worker.Edication := ComboBox1. Text;
Worker.Spec := Edit2. Text;
Worker.sex := ComboBox2. ItemIndex;
Worker.Armi := Edit3. Text;
Worker.BirthDay := DateTimePicker1. Date;
ModalResult := mrOK;
end;
procedure TForm3. Button2Click (Sender: TObject);
begin
ModalResult := mrCancel;
end;
procedure TForm3. FormShow (Sender: TObject);
begin
if not editRecord then
ClearFields
else
begin
Edit1.Text := Worker. FIO;
DateTimePicker2.Date := Worker. StartWork;
ComboBox1.Text := Worker. Edication;
Edit2.Text := Worker. Spec;
ComboBox2.ItemIndex := Worker. sex;
Edit3.Text := Worker. Armi;
DateTimePicker1.Date := Worker. BirthDay;
end;
end;
end.
unit Unit4;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Grids, Unit1;
type
TForm4 = class (TForm)
StringGrid1: TStringGrid;
private
{ Private declarations }
public
{ Public declarations }
procedure FillTable (Workers:array of TWorker);
end;
var
Form4: TForm4;
implementation
{$R *.dfm}
procedure TForm4. FillTable (Workers:array of TWorker);
var
i, n: integer;
begin
n:= Length (Workers);
StringGrid1.Cells[0,0] := 'Π€Π°ΠΌΠΈΠ»ΠΈΡ';
StringGrid1.Cells[1,0] := 'ΠΠ±ΡΠ°Π·ΠΎΠ²Π°Π½ΠΈΠ΅';
StringGrid1.Cells[2,0] := 'ΠΡΠ½ΠΎΡΠ΅Π½ΠΈΠ΅ ΠΊ ΡΠ»ΡΠΆΠ±Π΅';
StringGrid1.RowCount := n+1;
for i:=1 to n do
begin
StringGrid1.Cells[0,i] := Workers[i-1]. FIO;
StringGrid1.Cells[1,i] := Workers[i-1]. Edication;
StringGrid1.Cells[2,i] := Workers[i-1]. Armi;
end;
end;
end.
unit Unit6;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Grids, Unit1;
type
TForm6 = class (TForm)
StringGrid1: TStringGrid;
private
{ Private declarations }
public
procedure FillTable (Workers:array of TWorker);
{ Public declarations }
end;
var
Form6: TForm6;
implementation
{$R *.dfm}
procedure TForm6. FillTable (Workers:array of TWorker);
var
i, n: integer;
begin
n:= Length (Workers);
StringGrid1.Cells[0,0] := 'Π€Π°ΠΌΠΈΠ»ΠΈΡ';
StringGrid1.Cells[1,0] := 'ΠΠ°ΡΠ° ΡΠΎΠΆΠ΄.';
StringGrid1.RowCount := n;
for i:=1 to n-1 do
begin
StringGrid1.Cells[0,i] := Workers[i]. FIO;
StringGrid1.Cells[1,i] := DateToStr (Workers[i]. BirthDay);
end;
end;
end.
unit Unit7;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, TeEngine, TeeFunci, Series, ExtCtrls, TeeProcs, Chart, Unit1;
type
TForm7 = class (TForm)
Chart1: TChart;
Series1: TLineSeries;
TeeFunction1: TMultiplyTeeFunction;
Chart2: TChart;
Series3: TPieSeries;
Chart3: TChart;
Series2: TBarSeries;
private
{ Private declarations }
public
{ Public declarations }
procedure FillTable (Workers:array of TWorker);
procedure FillKrug (Workers:array of TWorker);
procedure FillStolb (Workers:array of TWorker);
end;
var
Form7: TForm7;
implementation
{$R *.dfm}
procedure TForm7. FillTable (Workers:array of TWorker);
var
i, n: integer;
y1,m1,d1,y2,m2,d2:Word;
yars:array[0.60] of integer;
begin
//Chart1.SeriesList.Clear;
//Chart1.SeriesList.Add (Series1);
Chart1.Visible := true;
Chart2.Visible := false;
Chart3.Visible := false;
Caption := 'ΠΠ±ΡΠ°Π·ΠΎΠ²Π°Π½ΠΈΠ΅';
Series1.Clear;
n:= Length (Workers);
DecodeDate (Now, y2, m2,d2);
for i:=1 to 60 do
yars[i-1] := 0;
for i:=1 to n do
begin
DecodeDate (Workers[i-1]. BirthDay, y1, m1,d1);
if (Workers[i-1]. Edication = 'ΠΡΡΡΠ΅Π΅') then
yars[y2-y1] := yars[y2-y1] + 5
else
if (Workers[i-1]. Edication = 'CΡΠ΅Π΄Π½Π΅ ΡΠΏΠ΅ΡΠΈΠ°Π»ΡΠ½ΠΎΠ΅') then
yars[y2-y1] := yars[y2-y1] + 4
else
if (Workers[i-1]. Edication = 'CΡΠ΅Π΄Π½Π΅Π΅') then
yars[y2-y1] := yars[y2-y1] + 3
else
if (Workers[i-1]. Edication = 'ΠΠ΅ΠΏΠΎΠ»Π½ΠΎΠ΅ ΡΡΠ΅Π΄Π½Π΅Π΅') then
yars[y2-y1] := yars[y2-y1] + 2
else
yars[y2-y1] := yars[y2-y1] + 1;
end;
for i:=1 to 60 do
Series1.AddXY (i, yars[i-1]);
end;
procedure TForm7. FillKrug (Workers:array of TWorker);
var
i, n: integer;
y1,m1,d1,y2,m2,d2: Word;
stch1,stch2,stch3: integer;
begin
//Chart1.SeriesList.Clear;
//Chart1.SeriesList.Clear;
//Chart1.SeriesList.Add (Series2);
Chart1.Visible := false;
Chart2.Visible := true;
Chart3.Visible := false;
Caption := 'ΠΠΎΠ·ΡΠ°ΡΡΠ½ΠΎΠ΅ ΡΠΎΠΎΡΠ½ΠΎΡΠ΅Π½ΠΈΠ΅';
Series3.Clear;
stch1 := 0;
stch2 := 0;
stch3 := 0;
n:= Length (Workers);
DecodeDate (Now, y2, m2,d2);
for i:=1 to n do
begin
DecodeDate (Workers[i-1]. BirthDay, y1, m1,d1);
if (y2-y1 <= 30) then
Inc (stch1)
else
if (y2-y1 <= 50) then
Inc (stch2)
else
Inc (stch3);
end;
//Series2.Add (50);
Series3.Add (stch1);
Series3.Add (stch2);
Series3.Add (stch3);
end;
procedure TForm7. FillStolb (Workers:array of TWorker);
var
i, n: integer;
stch1,stch2,stch3,stch4,stch5: integer;
begin
Chart1.Visible := false;
Chart2.Visible := false;
Chart3.Visible := true;
Caption := 'ΠΠ±ΡΠ°Π·ΠΎΠ²Π°Π½ΠΈΠ΅ ΡΠΎΡΡΡΠ΄Π½ΠΈΠΊΠΎΠ²';
Series2.Clear;
stch1 := 0;
stch2 := 0;
stch3 := 0;
stch4 := 0;
stch5 := 0;
n:= Length (Workers);
for i:=1 to n do
begin
if (Workers[i-1]. Edication = 'ΠΡΡΡΠ΅Π΅') then
Inc (stch1)
else
if (Workers[i-1]. Edication = 'CΡΠ΅Π΄Π½Π΅ ΡΠΏΠ΅ΡΠΈΠ°Π»ΡΠ½ΠΎΠ΅') then
Inc (stch2)
else
if (Workers[i-1]. Edication = 'CΡΠ΅Π΄Π½Π΅Π΅') then
Inc (stch3)
else
if (Workers[i-1]. Edication = 'ΠΠ΅ΠΏΠΎΠ»Π½ΠΎΠ΅ ΡΡΠ΅Π΄Π½Π΅Π΅') then
Inc (stch4)
else
Inc (stch5);
end;
Series2.Add (stch1);
Series2.Add (stch2);
Series2.Add (stch3);
Series2.Add (stch4);
Series2.Add (stch5);
end;
end.