Розрахунок вартості пластикових віконних конструкцій і дверей

[ виправити ] текст може містити помилки, будь ласка перевіряйте перш ніж використовувати.

скачати

Міністерство освіти і науки Російської Федерації
Федеральне агентство з освіти
Державне освіту установи
«Оренбурзький державний університет»
КОЛЕДЖ ЕЛЕКТРОНІКИ І БІЗНЕСУ
Кафедра обчислювальної техніки і математики
КУРСОВИЙ ПРОЕКТ
з дисципліни «Технологія розробки програмних продуктів»
Тема роботи «Розрахунок вартості пластикових віконних конструкцій і дверей»
КОГУ 220105.4008.05П3
Керівник роботи
__________Іштерякова Т.І.
«___»_____________ 2008
Виконавець
Студент гр. 37-П-3
___________Береговой В.С.
«___»_____________ 2008
Оренбург 2008
Міністерство Освіти і науки Російської Федерації
Федеральне агентство з освіти
Державне освіту установи
«Оренбурзький державний університет»
КОЛЕДЖ ЕЛЕКТРОНІКИ І БІЗНЕСУ
Кафедра обчислювальної техніки і математики
Завдання на курсовий проект
З дисципліни «Технологія розробки програмних продуктів»
Тема роботи «Розрахунок вартості пластикових віконних конструкцій і дверей»
Вихідні дані:
Прайс-лист вартості віконних конструкцій,
види віконних конструкцій,
технічні допуски віконних конструкцій,
дані про замовлення і замовника
_________________________
Дата видачі завдання: «21» лютого 2008 р.
Керівник: _____________Іштерякова Т. І.
Виконавець:
Студент гр. 37-П-3 _________Береговой В.С.
Дата захисту завдання: «»______ 2008 р
Оренбург 2008

Анотація
У даному курсовому проекті представлена ​​програма «Розрахунок вартості пластикових віконних конструкцій».
Основною метою програми є спрощення та автоматизація розрахунків вартості пластикових віконних конструкцій. Можливості програми дозволяють формувати звіти, робити розрахунки вартості різних пластикових віконних конструкцій, зберігати всі замовлення у файли, виводити на друк звіти.
Даний програмний продукт написаний у середовищі Delphi 7 і був заснований на модульному програмуванні. Для реалізації даної програми на ЕОМ був застосований мову Borland Delphi 7.0.
Delphi - прекрасна система візуального об'єктно-орієнтованого програмування, однаково відповідна і новачкам, і досвідченим програмістам. Новачкові вона дозволяє з невеликими витратами сил і часу створювати прикладні програми, які зовні не відрізняються від програм, створених професіоналами, і задовольняють всі вимоги Windows.
Розроблена програма призначена для роботи тільки в середовищі Windows або інших Windows - подібних систем.

The summary
In the given academic year project the program «Calculation of cost of plastic window designs» is submitted.
The basic purpose of the program is simplification and automation of calculations of cost of plastic window designs. Opportunities of the program allow forming reports, to make calculations of cost of various plastic window designs, to keep all orders in files, to print reports.
The given software product is written in Delphi 7 environment and has been based on modular programming. Language Borland Delphi has been applied for realization of the given program on the Borland Delphi 7.0.
Delphi - the fine system of visual object-oriented programming equally suitable both to beginners, and skilled programmers. She allows the beginner with small expenses of forces and time to create applied programs which are externally indistinguishable from the programs created by professionals, and meet all requirements Windows.
The developed program is intended for work only in Windows environment or others Windows - similar systems.

Зміст
Вступ 4
1 Постановка задачі 5
1.1 Структура взаємодії вхідний і вихідний інформації 5
1.2 Вимоги до програмно-апаратного оточення 5
1.3 Вимоги до функцій, що виконуються системою 5
1.4 Вимоги до ергономіки та технічної естетики інтерфейсу 5
1.5 Вимоги до надійності та зберігання інформації 7
2 Пояснювальна записка 6
2.1 Метод рішення 7
2.2 Структурна схема програми 7
2.3 Діалоговий режим 8
2.4 Ескіз та специфікація типових об'єктів управління графічного інтерфейсу 8
3 Керівництво системного програміста 8
3.1 Схема взаємодії модулів 9
3.2 Опис модулів 9
3.3 Налагодження та перевірка програми 9
3.3.1 Тестування програмного продукту. Способи тестування. 10
3.3.2 Повідомлення системному програмісту. 11
4 Керівництво оператора
4.1 Виконання програми 11
4.2 Повідомлення оператору 13
Висновок 13
Список використаних джерел 14
Додаток А - Вхідні і вихідні документи 17
Додаток Б - Текст програми 18

Введення
Робота фірми «Урал Строй Монтаж» пов'язана з пластиковими вікнами та дверима: установка, виміри, прийом замовлень, і т.д. При прийомі замовлень доводиться проводити всі розрахунки вручну, це дуже ускладнює процес. Для прискорення і спрощення роботи розроблена програма «Урал Строй Монтаж», яка виконує всі поставлені завдання.
Програмний продукт дозволяє додавати дані про замовника та замовленні в базу даних, видаляти і переглядати вже наявні в ній дані. Здійснюються функції запитів і друку звітів, а також дозволяє значно спростити розрахунок вартості замовлень. Розрахунок здійснюється з урахуванням додаткової комплектації віконних конструкцій (тонування, підвіконня, ламінування, і т.д.). Передбачений у програмі розрахунок вартості віконних конструкцій дозволяє самостійно вибирати форму і тип віконних модулів, завдяки чому з допомогою програми можна розрахувати вартість віконних конструкцій практично будь-якого типу. Всі замовлення розраховані за допомогою програми автоматично зберігаються в папку замовлень, також програма дозволяє робити різні операції з цими файлами, наприклад друк, перегляд, редагування і т.д. Так як фірма «Урал Строй Монтаж» працює тільки з виробником віконних конструкцій «Exprof», то всі ціни, параметри, технічні допуски цього виробника є стандартом для програми. Але в програмі є можливість налаштувати всі параметри самостійно, тому програмний продукт можна легко налаштувати на іншого виробника, якщо це буде необхідно.
Інтерфейс даного програмного продукту простий, будь-яка людина зможе легко розібратися в програмі і працювати з нею, так вона заснована на користувачів з мінімальними знаннями про комп'ютери. Програма «Розрахунок вартості пластикових віконних конструкцій і дверей» розроблена в середовищі програмування Delphi 7.
1 Постановка завдання
Розробити програму «Розрахунок вартості пластикових віконних конструкцій» з урахуванням розрахунку вартості замовляються виробів, а також збереженням замовлень у файли. У програмі будуть реалізовані можливості додавання даних про замовлення, висновок звітів на друк, а також розрахунок вартості віконних конструкцій з додатковою комплектацією.
1.1 Схема взаємодії вхідний і вихідний інформації
Відомості про
замовника та замовленні
Блок-схема: дисплей: Відомості про замовника та замовленні Схема взаємодії вхідний і вихідний інформації зображена на малюнку 1.


Дані про
замовника
Відомості про замовника
Блок-схема: документ: Відомості про замовника Дані про
розмірах

Завдання


Замовлення
Блок-схема: документ: Замовлення Дані про
замовленні
<№ Замовлення>. Rtf
Циліндр: <№ Замовлення>. Rtf


Малюнок 1 - Схема взаємодії вхідний і вихідний інформації

Вхідна інформація по завданню визначаються як дані, що надходять на вхід завдання і використовуються для її вирішення. Функція обробки вхідної інформації полягає в наступному: обробка введення, зберігання даних, що вводяться.
Вихідна інформація по завданню може бути представлена ​​у вигляді документів (типу лістингу), файл БД. У даній програмі вихідна інформація буде представлена ​​у вигляді: звіту, в якому містяться відомості про замовника та замовленні.
Функція обробки вихідної інформації полягає у формуванні документів виводяться на друк; пошук необхідних даних.
1.2 Вимоги до програмно-апаратного оточення
Мінімальними системними вимогами для даного завдання можуть послужити засоби обчислювальної техніки не нижче:
- Процесор: Pentium III і вище;
- ОЗУ не менше 128Мб;
- Відеокарта з пам'яттю не менш 64Мб;
- Звукова карта;
- CD-ROM;
- Монітор.
Програмне забезпечення працездатності програми «Розрахунок вартості пластикових віконних конструкцій»:
- ОС: Windows XP;
- Microsoft Office;
- Delphi 7.

1. 3 Вимоги до функцій, що виконується системою
Розроблений програмний продукт «Розрахунок вартості пластикових віконних конструкцій» повинен задовольняти ергономічним вимогам. Програма повинна: ​​додавати, видаляти, переглядати дані про замовлення і замовника у файлах, виводити звіти на друк, записувати і читати даних у файлах, а також проводити розрахунки вартості замовлень.
1.5 Вимоги до ергономіки та технічної естетики інтерфейсу
користувача
Ергономіка - науково прикладна дисципліна, що займається вивченням і створенням ефективних систем, керованих людиною. Ергономіка вивчає рух людини в процесі виробничої діяльності, витрати його енергії, продуктивність і інтенсивність при конкретних видах робіт.
Програма відрізняється зручним і простим у використанні інтерфейсом. Також у програмі буде передбачено збереження поточних налаштувань програми, для різних користувачів.
Технічна естетика - це теоретична і методологічна дисципліна, предметом якої є: по-перше, можливості та обмеження, що доставляються мистецтвом техніці, а технікою - мистецтву, а по-друге, способи їх співіснування і взаімоосуществленія.
Тому користувачі можуть з даною програмою працювати в будь-який час, а для цього спеціально зроблений, не сильно впливає на очі і нервову систему, інтерфейс. М'які кольори, правильне співвідношення компонентів в інтерфейсі, мало сильно викликають квітів.

1.6 Вимоги до надійності та зберігання
Для надійності дану програму можна зберігати на жорсткому диску, але так як працювати з нею можуть як бухгалтера, так і економісти, то доводиться застосовувати змінні носії, тобто дискети, CD-диски. Дана програма займає мало місця на диску, тому її легко переміщати на змінні носії, але все ж для повної надійності програму «Урал Строй Монтаж» краще зберігати на вінчестері (HDD), у зв'язку з тим, що несподівано може знадобитися зміна структури завдання, або внесення будь - яких змін в базу даних. Для установки програми необхідно 20 МБ пам'яті на жорсткому диски і не менше 128 МБ оперативної пам'яті.

2 Пояснювальна записка
Розробити програму «Розрахунок вартості пластикових віконних конструкцій» з урахуванням розрахунку вартості замовляються виробів, а також збереженням замовлень у файли. У програмі будуть реалізовані можливості додавання даних про замовлення, висновок звітів на друк, а також розрахунок вартості віконних конструкцій з додатковою комплектацією.
2. 1 Метод рішення
Об'єктно-орієнтоване програмування являє собою спосіб програмування, що нагадує процес людського мислення.
Модульне програмування - організація програми як сукупності невеликих незалежних блоків, званих модулями, структура і поведінка яких підкоряються певним правилам.
Використання модульного програмування дозволяє спростити тестування програми і виявлення помилок.
Модуль складається із заголовка, в якому після ключового слова "unit" вказується ім'я модуля, та чотирьох розділів: інтерфейсу, реалізації, ініціалізації і деініціалізацію.
У розділі інтерфейсу розміщуються опису ідентифікаторів, які повинні бути доступні всім модулями і програмам, що використовують цей модуль і містить його ім'я в списку uses. У розділі інтерфейсу оголошуються типи, константи, змінні і підпрограми. При цьому для підпрограм вказуються тільки їх заголовки. Інші використовувані модулі вказуються у списку "uses". Цей розділ починається ключовим словом "interface".
У розділі реалізації розташовується код підпрограм, заголовки яких були приведені в розділі інтерфейсу. Тут можна описувати типи, оголошувати константи і змінні і описувати підпрограми, які використовуються тільки в цьому модулі і за його межами не видно. Розділ реалізації починається ключовим словом "implementation".
При розробці програми були використані наступні можливості Delphi: використання різних компонентів, що дозволяють створити як загальний вигляд програми, так і реалізовувати функціональні завдання програми. Функції інформації представляють собою введення даних користувачів, збереження і завантаження даних на диску, користувач може додавати дані і зберігати їх у файл. Для створення приємного інтерфейсу використовувалися компоненти також із середовища Delphi.
2.2 Структурна схема програми
Розроблена програма має досить зручну для роботи користувача структуру, відповідна основній вимозі, висунутій до структури програми. Меню програми представляє собою структурну схему представлену на малюнку 2.

Основне завдання
Новий
Відкрити
Замовлення
Зберегти
Друк
Параметри
Новий
Документація


Дані
Інструменти
Звіти
Шаблони
Розрахунок вартості
Замовлення
Допомога
Конвертор валют
Про програму
Довідка
Про автора



Рисунок 2 - Структурна схема програми
2.3 Діалоговий режим
Діалоговий режим - взаємодія користувача з програмним продуктом таким чином, що ведеться обмін повідомленнями, що впливають на обробку даних.
У діалоговому режимі під впливом користувача здійснюється запуск функцій обробки, зміна властивостей об'єктів, відбувається настроювання параметрів, видача інформації на друк.
У даному програмному продукті використовується діалоговий режим з жорстким сценарієм діалогу, який представлений у вигляді меню - діалог ініціалізується програмою; користувачеві пропонується вибір альтернативи функцій обробки з фіксованого переліку. Користувачеві пропонується вибір з п'яти пунктів меню: замовлення, інструменти, база даних, допомога, довідка. Меню має ієрархічний вигляд, тому що при виборі одного пункту меню з'являється підменю і так далі;
Пункт меню «Замовлення» надає користувачеві можливість працювати зі звітами: створити новий, відкрити старий, зберегти і вивести на друк, а також дозволяє змінювати налаштування програми в підменю «параметри».
Пункт меню «Дані» містить підпункти «Замовлення», «Звіти». При виборі одного з пунктів користувачеві надається можливість роботи з файлами замовлень або звітів збережених у каталозі «БД».
Пункт меню «Інструменти» містить підпункти: «Шаблони», «Розрахунок вартості» і «Конвертор валют». При виборі пункту меню «Шаблони», на екрані з'являється вікно дозволяє користувачеві створювати ескізи вікон для подальшої роботи з ними. При виборі пункту меню «Розрахунок вартості», на екрані з'являється вікно дозволяє користувачеві проводити розрахунок вартості пластикових віконних конструкцій. При виборі пункту меню «Конвертор валют», на екрані з'являється вікно дозволяє користувачеві конвертувати, отриманий при розрахунку вартості, результат з однієї валюти в іншу.
Пункт меню «Допомога» містить підменю: «Про програму» - інформація про програму; «Про автора» - інформація про автора.
Пункт меню «Довідка» - повна інформація щодо роботи з програмою.

2.4 Ескіз та специфікація типових об'єктів управління графічного
інтерфейсу
Ескіз графічного інтерфейсу користувача представлений на малюнку 2.

Рисунок 3 - Графічний інтерфейс користувача
Для створення діалогового вікна використовувалися об'єкти:
Смуга меню (MainMenu) - пропонує вибір основних функцій обробки інформації, представлені в програмі, наприклад, «Інструменти»;
Мітка (Label) - постійний текст, який не підлягає зміні при роботі користувача з екранною формою, наприклад, «П.І.Б. Замірника »;
Стандартна кнопка (Button) - служить для видачі команд на виконання певних функціональних дій.
Командна кнопка (BitBtn) - служить для видачі команд на виконання певних функціональних дій, на поверхні кнопки розташований малюнок, наприклад, «Готово»;
Односторонній редактор (Edit) - для відображення і зміни тексту, наприклад, при додаванні тексту у файл;
Багаторядковий редактор (Memo) - для введення великого об'єму текстової інформації;
RadioGroup - група залежних перемикачів, містить спеціальні властивості для обслуговування декількох пов'язаних залежних перемикачів.
Memo - багаторядковий текстовий редактор, використовується для введення і відображення багаторядкового тексту.
MainMenu - головне меню програми, дозволяє створювати та обслуговувати складні ієрархічні меню.
Image - малюнок, призначений для відображення малюнків, в тому числі піктограм.
StringGrid - таблиця рядків, володіє потужними можливостями для подання текстової інформації в табличному вигляді.
PrintDialog - друк, реалізує стандартне діалогове вікно вибору параметрів для друку документів.
Combobox-спливаючий список, містить список альтернативних значень для вибору.
ScrollBar-смуга прокрутки, служить для прокручування списків і елементів, що виходять за певну обмежену область.

3 Посібник програміста
3.1 Схема взаємодії модулів
Схема взаємодії модулів представлена ​​на малюнку 4.
Unit 12
Unit 16
Unit 15
Unit 10
Unit 11
Unit 7
Unit 10
Unit 1
Unit 5
Unit 6
Unit 3
Unit 7
Unit 8
Unit 13
Unit 9
Unit 20
Unit 14
Unit 4
Unit 22
Unit 19
Unit18
Unit 2
Unit 17
Unit 21
Підпис: Unit 2, Підпис: Unit 17, Підпис: Unit 21
Unit 15



Рисунок 4 - Схема взаємодії модулів

3.2 Опис модулів
Програма включає в себе 22 модулі, кожен з яких виконує певні функції:
Unit1 - головний модуль програми, при виклику модуля до виконання на екрані з'явитися головне вікно програми, що містить меню і панель управління;
Unit2 - викликається з меню «Замовлення - Параметри», здійснює поява на екран вікна «Параметри», для зміни налаштувань програми.
Unit3 - викликається з меню «Допомога - Про програму», здійснює поява на екран вікна «Про програму», для перегляду відомостей про програму;
Unit4 - викликається з меню «Допомога - Про автора», здійснює поява на екран вікна «Про автора», для перегляду відомостей про автора;
Unit5 - викликається з меню, здійснює поява на екран вікна «Довідка», вікно містить інформацію по роботі з програмою;
Unit6-здійснює створення ескізів пластикових вікон;
Unit7 - викликається при виборі пункту меню «Інструменти», здійснює поява на екран вікна «Розрахунок вартості. Вікно дозволяє виробляти підготовку всіх параметрів перед розрахунком;
Unit8 - викликається вікна «Розрахунок вартості», здійснює поява на екран вікна «Розрахунок», і дозволяє проводити розрахунок пластикових віконних конструкцій;
Unit9 - викликається з меню, здійснює поява на екран вікна «Конвертор валют», для конвертації результатів розрахунків з однієї валюти в іншу;
Unit10 - викликається з меню, здійснює поява на екран вікна «Звіт», для перегляду, друку і запису даних у файл;
Unit11 - викликається з меню, здійснює поява на екран вікна «Нове замовлення», введення кількості виробів;
Unit12 - викликається при виборі пункту меню «База даних - Замовлення», здійснює поява на екран вікна «Замовлення». Вікно дозволяє робити операції над файлами замовлень;
Unit13 - викликається з вікно «Параметри», здійснює поява на екран вікна «Технічні допуски», вікно дозволяє змінювати технічні характеристики віконних модулів;
Unit14 - викликається з вікна «Розрахунок», здійснює розрахунок знижки на вартість віконних конструкцій;
Unit15 - викликається з вікна «Розрахунок», здійснює розрахунок вартості ламінування віконних конструкцій;
Unit16 - викликається з вікна «Нове замовлення», здійснює введення даних про замовника та замовлення;
Unit17 - викликається з вікна «Розрахунок», здійснює розрахунок вартості тонування віконних конструкцій;
Unit18 - викликається з вікна «Розрахунок», здійснює розрахунок вартості підвіконь;
Unit19 - викликається з вікна «Розрахунок», здійснює розрахунок вартості профілю;
Unit20 - викликається з вікна «Розрахунок», здійснює розрахунок вартості імпоста;
Unit21 - викликається з вікна «Параметри», дозволяє змінювати ціни на підвіконня;
Unit22 - викликається з вікна «Параметри», дозволяє змінювати ціни на тонування;

3. 3 Регулювання і перевірка програми
У розробленого програмного продукту є можливість змінювати ціни на віконні конструкції та додаткову комплектацію, а також максимальні і мінімальні розміри віконних модулів, тому перед початком роботи з програмою необхідно ввести всі параметри. Якщо цього не зробити, то розрахунок вартості буде проведений за стандартними параметрами, що може привести до невірних результатів. Налаштування параметрів можна зробити, вибравши в меню «Замовлення» - «Параметри».
3. 3. 1 Тестування програмного продукту. Способи тестування
Тестування є діяльність із перевірки програмного коду і документації. Вона повинна заздалегідь плануватися і систематично проводитися спеціально призначеним незалежним тестувальником. Робота тестувальника починається до затвердження специфікацій вимог. Він перевіряє вимоги до програмного продукту на повноту і можливість тестування, визначає методи тестування.
Для кожного програмного виробу повинен існувати набір тестів, перевіряючий його коректність. Існує кілька рівнів тестування, дозволяють повністю перевірити програмне виріб. Кожен рівень має свої цілі і компоненти. Можна виділити п'ять рівнів тестування: модульне; інтеграційне; системне; вихідна; приймальне.
Модульне тестування являє собою процес перевірки окремих програмних процедур і підпрограм, що входять до складу програм або програмних систем. Модульне тестування проводиться безпосереднім розробником і дозволяє перевіряти всі внутрішні структури і потоки даних в кожному модулі. Цей вид тестування є частиною праці.
Інтеграційне тестування проводиться для перевірки спільної роботи окремих модулів і передує тестування всієї системи як єдиного цілого. У ході інтеграційного тестування перевіряються зв'язку між модулями, їх сумісність і функціональність. Воно здійснюється незалежним тестувальником і входить до складу етапу тестування.
Системне тестування призначене для перевірки програмної системи в цілому, її організації та функціонування на відповідність специфікаціям вимог замовника. Його проводить незалежний тестувальник після успішного завершення інтеграційного тестування.
Вихідна тестування - завершальний етап тестування, на якому перевіряється готовність ПП до поставки замовнику. Даний вид тестування проводить незалежний тестувальник.
Приймальне тестування - тестування проводиться організацією, що відповідає за інсталяцію, супровід програмної системи і навчання кінцевого користувача.
При розробці програмного продукту я використовував модульне тестування, покрокове виконання і відладку. У ході тестування в програмі були виявлені такі місця, де дії користувачів треба додатково проконтролювати, щоб подальша робота програми проходила правильно.
У таких місцях програми передбачені такі перевірки як:
- На коректність введення даних;
- На наявність необхідних файлів для роботи програми;
- На правильні і послідовні виконання дій у роботі з програмою;
- На наявність в операційній системі Microsoft Word.

3. 3. 2 Повідомлення системному програмісту
У розробленому програмному продукті необхідно враховувати особливість структури файлу, в який записуються дані про ціни, також необхідно враховувати операції з файлом структури бази даних, передбачити помилки вводу / виводу.
Так як в програмному продукті відбувається безпосередній запис у файл даних необхідно враховувати програмні помилки які існують двох типів. Програмна помилка - розбіжність між програмою і її специфікацією, причому тоді і тільки тоді, коли специфікація існує і вона правильна. Програмна помилка - ситуація, коли програма не робить того, чого користувач від неї цілком обгрунтовано очікує.
Збої в роботі програми можуть відбуватися через брак пам'яті або відсутності інших необхідних системних ресурсів. У кожної програми свої межі, програма може не справлятися з підвищеними навантаженнями, наприклад із занадто великими обсягами даних.
Так в розробленому програмному продукті присутні наступні обмеження: кожен файл замовлення в середньому має розмір 15 кілобайт, тому програма обмежується тільки розміром жорсткого диску та об'ємом оперативної пам'яті, тому що при розрахунку вартості програмі необхідно в середньому 70 мегабайт пам'яті.
Для установки програми, необхідно запустити саморозпаковується архів, вибрати папку в яку потрібно встановити програму на жорсткому диску, і архів самостійно скопіює всі файли і створить ярлик на робочому столі.
Якщо скопіювати програму на будь-яке інше пристрій або диск програма може працювати некоректно.

4 Керівництво оператора
Розроблений програмний продукт забезпечений діалоговими вікнами і попереджуючими повідомленнями, які допоможуть операторові легко експлуатувати програму.
4. 1 Виконання програми
Під час виконання програми основні операції введення забезпечені повідомленнями і попередженнями. У головному вікні програми видно поточної номер замовлення, також всі елементи мають спливаючі підказки. Головне вікно показує режим редагування, час, дату, має панель для введення даних про замовника та замовленні.
У програмі кожна операція з файлами - видалення, редагування, додавання замовлень забезпечена додатковим діалоговим вікном.
Дополнітельнітельная інформація щодо виконання програмного продукту міститься у пункті 2.3 Діологовий режим.
4. 2 Повідомлення оператору
При роботі програми, тобто безпосередньому введенні даних і подальшого запису реєстраційних даних у файл з'являється діалогове вікно зображене на малюнку 5.

Малюнок 5 - Діалогове вікно
Якщо запис у файл відбувається без основних даних то, буде виведено діалогове вікно зображене на малюнку 6.

Малюнок 6 - Діалогове вікно
Якщо не введений жоден номер замовника, то з'явиться діалогове вікно зображене на малюнку 7.

Малюнок 7 - Діалогове вікно
Якщо спробувати зробити розрахунок, не завантаживши дані про ціну з файлу, то з'явиться діалогове вікно зображене на малюнку 8.


Рисунок 8 - Діалогове вікно

Висновок
Результатом курсового проекту є програма, виконана в середовищі Delphi, з використанням додаткових компонентів, і розроблена за всіма правилами розробки програмного продукту.
Програма передбачає виконання суворо обмежених функцій, необхідних для співробітників фірми.
У програмі використані і закріплені практично всі навики програмування в середовищі Delphi 7.
За час роботи над роботою я закріпив навички роботи з інтегрованим середовищем програмування Delphi 7.0, а так само роботу з нестандартними компонентами. При розробці даної програми мені довелося зіткнутися з безліччю проблем. Але завдяки використанню різної літератури, а також раніше отриманого досвіду вдалося обійти або вирішити більшість цих проблем. Накопичений мною досвід, безсумнівно, стане в нагоді в майбутньому, при розробці програм.

Список використаних джерел
Попов В. М. Програмування в T. Pascal. - М.: Просвещение, 1997.
Макарова І. Р. Інформатика. - М.: Фінанси і статистика, 2003.
Рудаков О. В. Технологія розробки програмних продуктів. - М.: Академія, 2004.
Хомоненко А. Гофман В. Delphi 7 у оригіналі. - М.: Просвещение, 2004.
Нікіфоров В. В. Основи розробки програмних продуктів. - М.: Просвещение, 2004.
Марченко А. І. Програмування в середовищі T. Pascal. - Київ: Юніор, 1997.
Немнюгин С. А. Програмування на мові високого рівня. - М.: Просвещение, 1996.
Вендров А. М. Проектування програмного забезпечення економічних інформаційних систем. - М.: Фінанси і статистика, 2000. - 352 с.
Соммервіл І. Інженерія програмного забезпечення. - М.: СПб.: Київ: Вид. Дім «Вільямс», 2002. - 624 с.

Додаток А
Вхідні документи
Додаток Б
Текст програми
program Project1;

uses
Forms,
Unit1 in 'Unit1.pas' {Form1},
Unit2 in 'Unit2.pas' {Form2},
Unit3 in 'Unit3.pas' {Form3},
Unit4 in 'Unit4.pas' {Form4},
Unit6 in 'Unit6.pas' {Form6},
Unit7 in 'Unit7.pas' {Form7},
Unit12 in 'Unit12.pas' {Form12},
Unit13 in 'Unit13.pas' {Form13},
Unit11 in 'Unit11.pas' {Form11},
Unit16 in 'Unit16.pas' {Form16},
Unit8 in 'Unit8.pas' {Form8},
Unit9 in 'Unit9.pas' {Form9},
Unit5 in 'Unit5.pas' {Form5},
Unit15 in 'Unit15.pas' {Form15},
Unit17 in 'Unit17.pas' {Form17},
Unit18 in 'Unit18.pas' {Form18},
Unit19 in 'Unit19.pas' {Form19},
Unit20 in 'Unit20.pas' {Form20},
Unit21 in 'Unit21.pas' {Form21},
Unit22 in 'Unit22.pas' {Form22},
Unit10 in 'Unit10.pas' {Form10},
Unit14 in 'Unit14.pas' {Form14};
{$ R *. res}
begin
Application.Initialize;
Application.Title: = 'УралСтройМонтаж';
Application.CreateForm (TForm1, Form1);
Application.CreateForm (TForm2, Form2);
Application.CreateForm (TForm3, Form3);
Application.CreateForm (TForm4, Form4);
Application.CreateForm (TForm6, Form6);
Application.CreateForm (TForm7, Form7);
Application.CreateForm (TForm12, Form12);
Application.CreateForm (TForm13, Form13);
Application.CreateForm (TForm11, Form11);
Application.CreateForm (TForm16, Form16);
Application.CreateForm (TForm8, Form8);
Application.CreateForm (TForm9, Form9);
Application.CreateForm (TForm5, Form5);
Application.CreateForm (TForm15, Form15);
Application.CreateForm (TForm17, Form17);
Application.CreateForm (TForm18, Form18);
Application.CreateForm (TForm19, Form19);
Application.CreateForm (TForm20, Form20);
Application.CreateForm (TForm21, Form21);
Application.CreateForm (TForm22, Form22);
Application.CreateForm (TForm10, Form10);
Application.CreateForm (TForm14, Form14);
Application.Run;
end.

unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Menus, ExtCtrls, StdCtrls, XPMan, ComCtrls, Unit9, Mask, Buttons, jpeg, Unit11, syncobjs, ImgList;
type

TForm1 = class (TForm)
MainMenu1: TMainMenu;
N1: TMenuItem; N2: TMenuItem;
N19: TMenuItem; N18: TMenuItem;
N4: TMenuItem; N3: TMenuItem;
N5: TMenuItem; N6: TMenuItem;
N7: TMenuItem; N8: TMenuItem;
N9: TMenuItem; N10: TMenuItem;
N12: TMenuItem; N13: TMenuItem;
N15: TMenuItem; N16: TMenuItem;
N17: TMenuItem; Panel1: TPanel;
Label4: TLabel; Label1: TLabel;
Edit1: TEdit; Label2: TLabel; Edit2: TEdit;
Label3: TLabel; Label6: TLabel; SaveDialog1: TSaveDialog;
OpenDialog1: TOpenDialog; PrintDialog1: TPrintDialog;
XPManifest1: TXPManifest; Memo1: TMemo;
N20: TMenuItem; ControlBar1: TControlBar;
FontDialog1: TFontDialog; SpeedButton4: TSpeedButton;
SpeedButton1: TSpeedButton; SpeedButton2: TSpeedButton;
SpeedButton3: TSpeedButton; SpeedButton5: TSpeedButton;
SpeedButton6: TSpeedButton; SpeedButton7: ​​TSpeedButton;
SpeedButton8: TSpeedButton; SpeedButton9: TSpeedButton;
DateTimePicker1: TDateTimePicker; Timer1: TTimer; N11: TMenuItem;
Image1: TImage; Image2: TImage; Label9: TLabel; SpeedButton13: TSpeedButton;
SpeedButton14: TSpeedButton; Label8: TLabel; MaskEdit3: TMaskEdit;
Label7: TLabel; MaskEdit2: TMaskEdit; Label10: TLabel;
Label5: TLabel; Label12: TLabel; Memo4: TMemo; Timer2: TTimer;
RichEdit1: TRichEdit; SpeedButton11: TSpeedButton; Label11: TLabel;
N14: TMenuItem; procedure N5Click (Sender: TObject);
procedure N16Click (Sender: TObject); procedure N17Click (Sender: TObject);
procedure N7Click (Sender: TObject); procedure N9Click (Sender: TObject);
procedure N10Click (Sender: TObject); procedure N3Click (Sender: TObject);
procedure N18Click (Sender: TObject); procedure N19Click (Sender: TObject);
procedure N11Click (Sender: TObject); procedure N13Click (Sender: TObject);
procedure N2Click (Sender: TObject); procedure SpeedButton3Click (Sender: TObject);
procedure SpeedButton1Click (Sender: TObject);
procedure SpeedButton4Click (Sender: TObject);
procedure SpeedButton7Click (Sender: TObject);
procedure SpeedButton6Click (Sender: TObject);
procedure SpeedButton5Click (Sender: TObject);
procedure SpeedButton2Click (Sender: TObject);
procedure Timer1Timer (Sender: TObject);
procedure SpeedButton11Click (Sender: TObject);
procedure N20Click (Sender: TObject); procedure FormCreate (Sender: TObject);
procedure SpeedButton13Click (Sender: TObject);
procedure SpeedButton9Click (Sender: TObject);
procedure Edit1KeyPress (Sender: TObject; var Key: Char);
procedure Edit2KeyPress (Sender: TObject; var Key: Char);
procedure SpeedButton8Click (Sender: TObject);
procedure SpeedButton14Click (Sender: TObject);
private
{Private declarations}
public
{Public declarations}
end;
var
CheckEvent: TEvent; Form1: TForm1; dir: string; kolok: integer;
prof, spak, mon, got: string; fiozam, fiozak, adres, data, itog, domtel, sottel: string;
implementation
uses Unit2, Unit3, Unit4, Unit5, Unit6, Unit7, Unit8, Unit10, Unit12,
Unit15;
{$ R *. dfm}
procedure TForm1.N5Click (Sender: TObject);
begin form2.Showmodal end;
procedure TForm1.N16Click (Sender: TObject);
begin form3.Showmodal end;
procedure TForm1.N17Click (Sender: TObject);
begin form4.Showmodal end;
procedure TForm1.N7Click (Sender: TObject);
var dlg: Word; begin
dlg: = MessageDlg ('Ви
точно хочете вийти ???', mtConfirmation, mbYesNoCancel, 0);
if dlg = mrYes then close; end;
procedure TForm1.N9Click (Sender: TObject);
begin form6.Showmodal; end;
procedure TForm1.N10Click (Sender: TObject);
begin form7.Showmodal; end;
procedure TForm1.N3Click (Sender: TObject);
begin Form1.PrintDialog1.Execute; end;
procedure TForm1.N18Click (Sender: TObject);
begin if Form1.SaveDialog1.Execute then
RichEdit1.Lines.SaveToFile (SaveDialog1.FileName); end;
procedure TForm1.N19Click (Sender: TObject);
begin if form1.OpenDialog1.Execute then
RichEdit1.Lines.LoadFromFile (OpenDialog1.FileName); end;
procedure TForm1.N11Click (Sender: TObject);
begin form9.Showmodal; end;
procedure TForm1.N13Click (Sender: TObject);
begin form12.Showmodal; end;
procedure TForm1.N2Click (Sender: TObject);
begin form11.Show; end;
procedure TForm1.SpeedButton3Click (Sender: TObject);
begin RichEdit1.Paragraph.Alignment: = taLeftJustify; end;
procedure TForm1.SpeedButton1Click (Sender: TObject);
begin RichEdit1.Paragraph.Alignment: = taRightJustify; end;
procedure TForm1.SpeedButton4Click (Sender: TObject);
begin if FontDialog1.Execute then
RichEdit1.SelAttributes.Assign (FontDialog1.Font);
RichEdit1.SetFocus; end;
procedure TForm1.SpeedButton7Click (Sender: TObject);
begin if Form1.SaveDialog1.Execute then
RichEdit1.Lines.SaveToFile (SaveDialog1.FileName); end;
procedure TForm1.SpeedButton6Click (Sender: TObject);
begin if form1.OpenDialog1.Execute then
RichEdit1.Lines.LoadFromFile (OpenDialog1.FileName); end;
procedure TForm1.SpeedButton5Click (Sender: TObject);
var f: Integer;
begin for f: = 0 to ComponentCount - 1 do begin
if (Components [f] is TEdit) then (Components [f] as TEdit). Text: ='';
if (Components [f] is TMaskEdit) then (Components [f] as TMaskEdit). Text: ='';
if (Components [f] is TMemo) then (Components [f] as TMemo). Text: =''; end;
RichEdit1.Clear;
prof :=''; spak :=''; mon :=''; got :=''; got :=''; adres :=''; fiozam :=''; fiozak :='';
Showmessage ('Введіть всі дані на замовлення!'); End;
procedure TForm1.SpeedButton2Click (Sender: TObject);
begin RichEdit1.Paragraph.Alignment: = taCenter; end;
procedure TForm1.Timer1Timer (Sender: TObject);
begin Label5.Caption: = 'Дата' + dateToStr (date);
Label11.Caption: = 'Номер замовлення:' + intToStr (nzak);
Label9.Caption: = 'Час' + TimeToStr (Time); end;
procedure TForm1.SpeedButton11Click (Sender: TObject);
begin if (Edit1.Text ='') or (Edit2.Text ='') or (Memo1.Text ='')
then showmessage ('Не введені обов'язкові параметри!')
else if (MaskEdit3.Text = '- -') and (MaskEdit2.Text = '(8)') then
showmessage ('Введіть хоча б один номер телефону!') else
begin fiozam: = Edit1.Text; fiozak: = Edit2.Text;
adres: = Memo1.Text; domtel: = MaskEdit3.Text;
sottel: = MaskEdit2.Text; data: = datetostr (DateTimePicker1.Date);
got: = memo4.Text; Form7.Showmodal; end; end;
procedure TForm1.N20Click (Sender: TObject);
begin form5.Showmodal; end;
procedure TForm1.FormCreate (Sender: TObject);
var f: textfile; s: string;
begin CheckEvent: = TEvent.Create (nil, false, true, 'MYPROGRAM_CHECKEXIST');
if CheckEvent.WaitFor (10) <> wrSignaled then
begin Showmessage ('Програма вже запущена!');
Self.Close; halt; end;
DateTimePicker1.Date: = Date; odn :='';
dir: = ExtractFilePath (Application.ExeName);
AssignFile (f, dir + '\ nzak.txt');
Reset (f); Read (f, s); nzak: = StrToInt (s); CloseFile (f); end;
function Search_And_Replace (RichEdit: TRichEdit;
SearchText, ReplaceText: string): Boolean;
var startpos, Position, endpos: integer;
begin startpos: = 0;
with RichEdit do begin endpos: = Length (RichEdit.Text);
Lines.BeginUpdate;
while FindText (SearchText, startpos, endpos, [stMatchCase ])<>- 1 do
begin endpos: = Length (RichEdit.Text) - startpos;
Position: = FindText (SearchText, startpos, endpos, [stMatchCase]);
Inc (startpos, Length (SearchText)); SetFocus; SelStart: = Position;
SelLength: = Length (SearchText); richedit.clearselection;
SelText: = ReplaceText; end;
Lines.EndUpdate; end; end;
procedure TForm1.SpeedButton13Click (Sender: TObject);
Var b, a: string; begin
if (fiozam ='') or (fiozak ='') or (adres ='')
then showmessage ('Не введені обов'язкові параметри!') else
if prof =''then Showmessage ('Введіть інформацію про замовлення!') else
begin RichEdit1.Lines.LoadFromFile (dir + '\ Звіти \ ЕвроДом.rtf');
Search_And_Replace (Richedit1, '№ 1', prof);
Search_And_Replace (Richedit1, '№ 2', spak);
Search_And_Replace (Richedit1, '№ 4', mon);
Search_And_Replace (Richedit1, '№ 3', got);
if (SOB ='') and (Lam ='') and (So9 ='') then b: =''
else if (SOB ='') or (Lam ='') or (So9 ='') then begin
if SOB =''then b: = Lam + ';' + So9 + ';' + ton;
if Lam =''then b: = SOB + ';' + So9 + ';' + ton;
if So9 =''then b: = SOB + ';' + Lam + ';' + ton;
if (Lam ='') and (So9 ='') then b: = SOB + ';' + ton end
else b: = SOB + ';' + Lam + ';' + So9 + ';' + ton;
Search_And_Replace (Richedit1, '# B', b);
a: = MarkP +'('+ RazPod +')'+ Podsen + 'у.о';
if a = '() у.о' then a :='';
Search_And_Replace (Richedit1, '# A', a);
if sottel = '(8)' then
Search_And_Replace (Richedit1, '# 6', '')
else
Search_And_Replace (Richedit1, '# 6', sottel);
Search_And_Replace (Richedit1, '# C', itog);
Search_And_Replace (Richedit1, '# 5', domtel);
Search_And_Replace (Richedit1, '# 1', fiozam);
Search_And_Replace (Richedit1, '# 2', data);
Search_And_Replace (Richedit1, '# 3', fiozak);
Search_And_Replace (Richedit1, '# 4', adres);
end; end;
procedure TForm1.SpeedButton9Click (Sender: TObject);
begin
RichEdit1.Perform (EM_UNDO, 0, 0); end;
procedure TForm1.Edit1KeyPress (Sender: TObject; var Key: Char);
var / / цифрова маска
vrLength, vrSelStart: byte;
begin
with Sender as TEdit do begin
vrLength: = Length (Text); / / визначаємо довжину тексту
vrSelStart: = SelStart; / / визначаємо положення курсору
end;
case Key of 'А' .. 'Я': begin end;
'А' .. 'я': begin end;
# 8: begin end;
# 32: begin end;
# 46:
else
Key: = # 0; / / "погасити" всі інші клавіші
end; end;
procedure TForm1.Edit2KeyPress (Sender: TObject; var Key: Char);
var / / цифрова маска
vrLength, vrSelStart: byte;
begin
with Sender as TEdit do
begin
vrLength: = Length (Text);
vrSelStart: = SelStart;
end;
case Key of 'А' .. 'Я': begin end;
'А' .. 'я': begin end;
# 8: begin end;
# 32: begin end;
# 46:
else
Key: = # 0; / / "погасити" всі інші клавіші end; end;
procedure TForm1.SpeedButton8Click (Sender: TObject);
begin RichEdit1.Print ('Друк звіту "); end;
procedure TForm1.SpeedButton14Click (Sender: TObject);
begin if RichEdit1.Text <>''then begin
form10.qrimage1.Picture.LoadFromFile (dir + '\ temp \' + '1. bmp ');
form10.qrimage2.Picture.LoadFromFile (dir + '\ temp \' + '2. bmp ');
form10.qrimage3.Picture.LoadFromFile (dir + '\ temp \' + '3. bmp ');
form10.qrimage4.Picture.LoadFromFile (dir + '\ temp \' + '4. bmp ');
form10.qrimage5.Picture.LoadFromFile (dir + '\ temp \' + '5. bmp ');
form10.qrimage6.Picture.LoadFromFile (dir + '\ temp \' + '6. bmp ');
form10.Show; end
else Showmessage ('Спочатку створіть звіт!'); end; end.
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Buttons, StdCtrls, Spin, jpeg, Unit1, ExtCtrls;
type
TForm2 = class (TForm)
Image1: TImage; GroupBox1: TGroupBox; Label1: TLabel;
Label2: TLabel; Label3: TLabel; Label4: TLabel;
Label5: TLabel; Label6: TLabel; Label7: TLabel;
Label8: TLabel; Label9: TLabel; SpinEdit1: TSpinEdit;
SpinEdit2: TSpinEdit; SpinEdit3: TSpinEdit; SpinEdit4: TSpinEdit;
SpinEdit5: TSpinEdit; SpinEdit6: TSpinEdit; SpinEdit7: TSpinEdit;
SpinEdit8: TSpinEdit; SpinEdit9: TSpinEdit; SpinEdit10: TSpinEdit;
SpinEdit11: TSpinEdit; SpinEdit12: TSpinEdit; GroupBox2: TGroupBox;
Label10: TLabel; Label11: TLabel; Label12: TLabel; Label13: TLabel;
Label14: TLabel; Label15: TLabel; Label16: TLabel; Label17: TLabel;
Label18: TLabel; SpinEdit13: TSpinEdit; SpinEdit14: TSpinEdit;
SpinEdit15: TSpinEdit; SpinEdit16: TSpinEdit; SpinEdit17: TSpinEdit;
SpinEdit18: TSpinEdit; SpinEdit19: TSpinEdit; SpinEdit20: TSpinEdit;
SpinEdit21: TSpinEdit; SpinEdit22: TSpinEdit; SpinEdit23: TSpinEdit;
SpinEdit24: TSpinEdit; SpeedButton4: TSpeedButton; SpeedButton3: TSpeedButton;
SpeedButton2: TSpeedButton; SpeedButton1: TSpeedButton;
SpeedButton6: TSpeedButton; SpeedButton7: ​​TSpeedButton;
procedure SpeedButton1Click (Sender: TObject);
procedure SpeedButton2Click (Sender: TObject);
procedure SpeedButton3Click (Sender: TObject);
procedure SpeedButton4Click (Sender: TObject);
procedure SpeedButton6Click (Sender: TObject);
procedure SpeedButton7Click (Sender: TObject);
private
{Private declarations}
public
{Public declarations}
end;
var Form2: TForm2;
implementation
uses Unit13, Unit14, Unit21, Unit22;
{$ R *. dfm}
procedure TForm2.SpeedButton1Click (Sender: TObject);
begin close; end;
procedure TForm2.SpeedButton2Click (Sender: TObject);
Var s: string;
f: textfile;
begin
{$ I-}
AssignFile (f, dir + '\ Ціни \ Вікна');
{$ I +}
If IOResult = 0 then begin
s: = dir + '\ Ціни \ Вікна';
Rewrite (f, s + '\ Exprof58mm24.dat');
Writeln (f, SpinEdit1.Value);
Writeln (f, SpinEdit2.Value);
Writeln (f, SpinEdit3.Value);
CloseFile (f);
Rewrite (f, s + '\ Exprof58mm32.dat');
Writeln (f, SpinEdit4.Value);
Writeln (f, SpinEdit5.Value);
Writeln (f, SpinEdit6.Value);
CloseFile (f);
Rewrite (f, s + '\ Exprof101mm24.dat');
Writeln (f, SpinEdit7.Value);
Writeln (f, SpinEdit8.Value);
Writeln (f, SpinEdit9.Value);
CloseFile (f);
Rewrite (f, s + '\ Exprof101mm32.dat');
Writeln (f, SpinEdit10.Value);
Writeln (f, SpinEdit11.Value);
Writeln (f, SpinEdit12.Value);
CloseFile (f);
end else Exit;
{$ I-}
AssignFile (f, dir + '\ Ціни \ Двері');
{$ I +}
If IOResult = 0 then begin
s: = dir + '\ Ціни \ Двері';
Rewrite (f, s + '\ Exprof58mm24.dat');
Writeln (f, SpinEdit13.Value);
Writeln (f, SpinEdit14.Value);
Writeln (f, SpinEdit15.Value);
CloseFile (f);
Rewrite (f, s + '\ Exprof58mm32.dat');
Writeln (f, SpinEdit16.Value);
Writeln (f, SpinEdit17.Value);
Writeln (f, SpinEdit18.Value);
CloseFile (f);
Rewrite (f, s + '\ Exprof101mm24.dat');
Writeln (f, SpinEdit19.Value);
Writeln (f, SpinEdit20.Value);
Writeln (f, SpinEdit21.Value);
CloseFile (f);
Rewrite (f, s + '\ Exprof101mm32.dat');
Writeln (f, SpinEdit22.Value);
Writeln (f, SpinEdit23.Value);
Writeln (f, SpinEdit24.Value);
CloseFile (f); end else Exit;
ShowMessage ('Дані збережені успішно!'); End;
procedure TForm2.SpeedButton3Click (Sender: TObject);
begin
SpinEdit1.Value: = 58; SpinEdit2.Value: = 167;
SpinEdit3.Value: = 172; SpinEdit4.Value: = 67;
SpinEdit5.Value: = 175; SpinEdit6.Value: = 181;
SpinEdit7.Value: = 68; SpinEdit8.Value: = 195;
SpinEdit9.Value: = 201; SpinEdit10.Value: = 79;
SpinEdit11.Value: = 204; SpinEdit12.Value: = 212;
SpinEdit13.Value: = 152; SpinEdit14.Value: = 157;
SpinEdit15.Value: = 176; SpinEdit16.Value: = 165;
SpinEdit17.Value: = 170; SpinEdit18.Value: = 187;
SpinEdit19.Value: = 180; SpinEdit20.Value: = 188;
SpinEdit21.Value: = 0; SpinEdit22.Value: = 194;
SpinEdit23.Value: = 200; SpinEdit24.Value: = 0; end;
procedure TForm2.SpeedButton4Click (Sender: TObject);
begin form13.show; end;
procedure TForm2.SpeedButton6Click (Sender: TObject);
begin form21.Show; end;
procedure TForm2.SpeedButton7Click (Sender: TObject);
begin form22.Show; end; end.
unit Unit3;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, jpeg, ExtCtrls;
type
TForm3 = class (TForm)
Image1: TImage; Label1: TLabel; Label2: TLabel; Label3: TLabel;
Label4: TLabel; Label5: TLabel; SpeedButton1: TSpeedButton;
procedure BitBtn1Click (Sender: TObject);
procedure SpeedButton1Click (Sender: TObject);
private
{Private declarations}
public
{Public declarations}
end;
var Form3: TForm3;
implementation
{$ R *. dfm}
procedure TForm3.BitBtn1Click (Sender: TObject);
begin close end;
procedure TForm3.SpeedButton1Click (Sender: TObject);
begin close; end; end.
unit Unit4;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, jpeg, ExtCtrls;
type
TForm4 = class (TForm)
Image1: TImage; Label1: TLabel; Label3: TLabel; Label2: TLabel;
Label4: TLabel; Label5: TLabel; SpeedButton1: TSpeedButton;
procedure SpeedButton1Click (Sender: TObject);
private
{Private declarations}
public
{Public declarations}
end;
var Form4: TForm4;
implementation
{$ R *. dfm}
procedure TForm4.SpeedButton1Click (Sender: TObject);
begin close; end; end.
unit Unit5;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls, ExtCtrls, jpeg, unit1, Buttons;
type
TForm5 = class (TForm)
TreeView1: TTreeView; Timer1: TTimer; RichEdit1: TRichEdit; Image1: TImage;
Label3: TLabel; Label2: TLabel; Label1: TLabel; Bevel1: TBevel; Bevel2: TBevel;
SpeedButton2: TSpeedButton; SpeedButton1: TSpeedButton;
procedure Timer1Timer (Sender: TObject);
procedure SpeedButton2Click (Sender: TObject);
private
{Private declarations}
public
{Public declarations}
end;
var Form5: TForm5;
implementation
{$ R *. dfm}
procedure TForm5.Timer1Timer (Sender: TObject);
begin
if TreeView1.Selected <> nil then begin
label3.Caption: = TreeView1.Selected.Text;
if TreeView1.Selected.Text = 'Рішення задач' then
RichEdit1.Lines.LoadFromFile (dir + '\ Довідка \ Основні задачі.rtf');
if TreeView1.Selected.Text = 'УралСтройМантаж' then
RichEdit1.Lines.LoadFromFile (dir + '\ Довідка \ УралСтройМонтаж.rtf');
if TreeView1.Selected.Text = 'Опис інтерфейсу' then
RichEdit1.Lines.LoadFromFile (dir + '\ Довідка \ Інтерфейс.rtf');
if TreeView1.Selected.Text = 'Розрахунок вартості' then
RichEdit1.Lines.LoadFromFile (dir + '\ Довідка \ Расчет.rtf');
if TreeView1.Selected.Text = 'Системні вимоги' then
RichEdit1.Lines.LoadFromFile (dir + '\ Довідка \ Системні требованія.rtf');
if TreeView1.Selected.Text = 'Створення шаблонів' then
RichEdit1.Lines.LoadFromFile (dir + '\ Довідка \ Шаблон.rtf');
if TreeView1.Selected.Text = 'Встановлення цін' then
RichEdit1.Lines.LoadFromFile (dir + '\ Довідка \ Цени.rtf'); end; end;
procedure TForm5.SpeedButton2Click (Sender: TObject);
begin Close; end; end.
unit Unit6;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls, unit1, Buttons, ComCtrls, Unit7, jpeg;
type
TForm6 = class (TForm)
Panel1: TPanel; SpeedButton1: TSpeedButton; SpeedButton2: TSpeedButton;
SpeedButton3: TSpeedButton; SpeedButton5: TSpeedButton;
SpeedButton6: TSpeedButton; SpeedButton4: TSpeedButton;
SpeedButton14: TSpeedButton; SpeedButton15: TSpeedButton;
SpeedButton16: TSpeedButton; Panel2: TPanel;
UpDown2: TUpDown; UpDown1: TUpDown; SpeedButton11: TSpeedButton;
Image1: TImage; SpeedButton7: ​​TSpeedButton; SpeedButton8: TSpeedButton;
SpeedButton9: TSpeedButton; procedure SpeedButton1Click (Sender: TObject);
procedure SpeedButton16Click (Sender: TObject);
procedure SpeedButton2Click (Sender: TObject);
procedure SpeedButton14Click (Sender: TObject);
procedure SpeedButton15Click (Sender: TObject);
procedure SpeedButton3Click (Sender: TObject);
procedure SpeedButton4Click (Sender: TObject);
procedure SpeedButton6Click (Sender: TObject);
procedure SpeedButton5Click (Sender: TObject);
procedure UpDown1Click (Sender: TObject; Button: TUDBtnType);
procedure UpDown2Click (Sender: TObject; Button: TUDBtnType);
procedure Panel2MouseDown (Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure SpeedButton11Click (Sender: TObject);
procedure SpeedButton9Click (Sender: TObject);
procedure SpeedButton8Click (Sender: TObject);
private
procedure CmFocusChanged (var Msg: TCmFocusChanged);
message cm_FocusChanged;
{Private declarations}
public
{Public declarations}
end;
var Msg1: TCmFocusChanged; Form6: TForm6; c: string;
implementation
{$ R *. dfm}
procedure TForm6.SpeedButton1Click (Sender: TObject);
begin
b1: = TBitBtn.Create (Self);
nam: = nam + '# Глухий';
with b1 do begin
b1.Hint: = '1 ';
Left: = 20;
Top: = 20;
Width: = 60;
Height: = 100;
Parent: = Panel2;
Glyph.LoadFromFile (dir + '\ Іконки \ глухой.bmp'); end; end;
procedure TForm6.CmFocusChanged (var Msg: TCmFocusChanged);
begin Msg1: = Msg; end;
procedure TForm6.SpeedButton2Click (Sender: TObject);
begin
nam: = nam + '# Поворотний';
b1: = TBitBtn.Create (Self);
with b1 do begin
b1.Hint: = '2 ';
Left: = 20;
Top: = 20;
Width: = 60;
Height: = 100;
Parent: = Panel2;
Glyph.LoadFromFile (dir + '\ Іконки \ поворотний.bmp'); end; end;
procedure TForm6.SpeedButton14Click (Sender: TObject);
begin
nam: = nam + '# Поворотний';
b1: = TBitBtn.Create (Self);
with b1 do begin
b1.Hint: = '2 ';
Left: = 20;
Top: = 20;
Width: = 60;
Height: = 100;
Parent: = Panel2;
Glyph.LoadFromFile (dir + '\ Іконки \ поворотний1.bmp'); end; end;
procedure TForm6.SpeedButton15Click (Sender: TObject);
begin
nam: = nam + '# Поворотний';
b1: = TBitBtn.Create (Self);
with b1 do begin
b1.Hint: = '2 ';
Left: = 20;
Top: = 20;
Width: = 60;
Height: = 100;
Parent: = Panel2;
Glyph.LoadFromFile (dir + '\ Іконки \ поворотний1.bmp'); end; end;
procedure TForm6.SpeedButton16Click (Sender: TObject);
begin
nam: = nam + '# Відкидний';
b1: = TBitBtn.Create (Self);
with b1 do begin
b1.Hint: = '3 ';
Left: = 20;
Top: = 20;
Width: = 60;
Height: = 100;
Glyph.LoadFromFile (dir + '\ Іконки \ откідной.bmp');
Parent: = Panel2; end; end;
procedure TForm6.SpeedButton3Click (Sender: TObject);
begin
nam: = nam + '# Відкидний';
b1: = TBitBtn.Create (Self);
with b1 do begin
b1.Hint: = '3 ';
Left: = 20;
Top: = 20;
Width: = 60;
Height: = 100;
Glyph.LoadFromFile (dir + '\ Іконки \ откідной.bmp');
Parent: = Panel2; end; end;
procedure TForm6.SpeedButton4Click (Sender: TObject);
begin
nam: = nam + '# балкон1';
b1: = TBitBtn.Create (Self);
with b1 do begin
b1.Hint: = '4 ';
Left: = 20;
Top: = 20;
Width: = 60;
Height: = 100;
Glyph.LoadFromFile (dir + '\ Іконки \ балкон1.bmp');
Parent: = Panel2; end; end;
procedure TForm6.SpeedButton6Click (Sender: TObject);
begin
nam: = nam + '# Вхід';
b1: = TBitBtn.Create (Self);
with b1 do begin
b1.Hint: = '6 ';
Left: = 20;
Top: = 20;
Width: = 60;
Height: = 100;
Glyph.LoadFromFile (dir + '\ Іконки \ вход.bmp');
Parent: = Panel2; end; end;
procedure TForm6.SpeedButton5Click (Sender: TObject);
begin
nam: = nam + '# Балкон2';
b1: = TBitBtn.Create (Self);
with b1 do begin
b1.Hint: = '5 ';
Left: = 20;
Top: = 20;
Width: = 60;
Height: = 100;
Glyph.LoadFromFile (dir + '\ Іконки \ балкон2.bmp');
Parent: = Panel2; end; end;
procedure TForm6.UpDown1Click (Sender: TObject; Button: TUDBtnType);
begin
if Msg1.Sender.ClassName = 'TBitBtn' then
msg1.Sender.Width: = UpDown1.Position * 3;
end;
procedure TForm6.UpDown2Click (Sender: TObject; Button: TUDBtnType);
begin
if Msg1.Sender.ClassName = 'TBitBtn' then
msg1.Sender.Height: = UpDown2.Position * 3;
end;
procedure TForm6.Panel2MouseDown (Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
const
SC_DragMove = $ F012; {a magic number}
begin
ReleaseCapture;
if Msg1.Sender.ClassName = 'TBitBtn' then
msg1.Sender.perform (WM_SysCommand, SC_DragMove, 0);
end;
procedure TForm6.SpeedButton11Click (Sender: TObject);
Var p: integer;
begin
if Msg1.Sender.ClassName = 'TBitBtn' then begin
if msg1.Sender.Hint = '1 'then begin p: = pos (' # Глухий ', nam); delete (nam, p, 7); msg1.Sender.Destroy; end;
if msg1.Sender.Hint = '2 'then begin p: = pos (' # Поворотний ', nam); delete (nam, p, 11); msg1.Sender.Destroy; end;
if msg1.Sender.Hint = '3 'then begin p: = pos (' # Відкидний ', nam); delete (nam, p, 9); msg1.Sender.Destroy; end;
if msg1.Sender.Hint = '4 'then begin p: = pos (' # балкон1 ', nam); delete (nam, p, 8); msg1.Sender.Destroy; end;
if msg1.Sender.Hint = '5 'then begin p: = pos (' # Балкон2 ', nam); delete (nam, p, 8); msg1.Sender.Destroy; end;
if msg1.Sender.Hint = '6 'then begin p: = pos (' # Вхід ', nam); delete (nam, p, 5); msg1.Sender.Destroy; end; end; end;
procedure TForm6.SpeedButton9Click (Sender: TObject);
var
B: TBitmap;
srcRect, dstRect: TRect;
begin
B: = TBitmap.Create;
with dstRect do begin
Left: = 0;
Top: = 0;
Right: = Panel2.Width +1;
Bottom: = Panel2.Height +1;
end;
with srcRect do begin
Left: = Panel2.Left +15;
Right: = Panel2.Left + Panel2.Width +12;
Top: = Panel2.Top;
Bottom: = Panel2.Top + Panel2.Height +12;
end;
B. Width: = Panel2.Width;
B. Height: = Panel2.Height;
B.Canvas.CopyRect (dstRect, Self.Canvas, srcRect);
B. PixelFormat: = pf1bit;
B. SaveToFile (dir + '\ Шаблони \' + nam + '. Bmp');
ShowMessage ('Шаблон успішно зберігся!');
B. Free; end;
procedure TForm6.SpeedButton8Click (Sender: TObject);
begin close; end; end.
unit Unit7;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, unit1, ComCtrls, Buttons, Grids, Spin, jpeg;
type
TForm7 = class (TForm)
Panel1: TPanel; Panel2: TPanel; SpeedButton1: TSpeedButton;
SpeedButton2: TSpeedButton; SpeedButton3: TSpeedButton;
SpeedButton5: TSpeedButton; SpeedButton6: TSpeedButton;
SpeedButton9: TSpeedButton; SpeedButton10: TSpeedButton;
Image1: TImage; SpeedButton7: ​​TSpeedButton; SpeedButton8: TSpeedButton;
ComboBox1: TComboBox; Label4: TLabel; Label3: TLabel;
ComboBox3: TComboBox; Label2: TLabel; ComboBox2: TComboBox;
UpDown1: TUpDown; UpDown2: TUpDown; Image2: TImage;
OpenDialog1: TOpenDialog; SpeedButton4: TSpeedButton;
SpeedButton14: TSpeedButton; SpeedButton15: TSpeedButton;
SpeedButton16: TSpeedButton; SpeedButton11: TSpeedButton;
SpeedButton12: TSpeedButton; SpeedButton13: TSpeedButton;
SpeedButton17: TSpeedButton; Label1: TLabel; Label5: TLabel; Label6: TLabel;
Label7: TLabel;
procedure SpeedButton1Click (Sender: TObject);
procedure SpeedButton2Click (Sender: TObject);
procedure SpeedButton3Click (Sender: TObject);
procedure SpeedButton4Click (Sender: TObject);
procedure SpeedButton5Click (Sender: TObject);
procedure SpeedButton6Click (Sender: TObject);
procedure Panel2MouseDown (Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure ComboBox1Change (Sender: TObject);
procedure FormCreate (Sender: TObject);
procedure SpeedButton8Click (Sender: TObject);
procedure SpeedButton9Click (Sender: TObject);
procedure UpDown1Click (Sender: TObject; Button: TUDBtnType);
procedure UpDown2Click (Sender: TObject; Button: TUDBtnType);
procedure SpeedButton11Click (Sender: TObject);
procedure SpeedButton13Click (Sender: TObject);
procedure SpeedButton12Click (Sender: TObject);
procedure SpeedButton14Click (Sender: TObject);
procedure SpeedButton15Click (Sender: TObject);
procedure SpeedButton16Click (Sender: TObject);
procedure SpeedButton17Click (Sender: TObject);
procedure SpeedButton10Click (Sender: TObject);
procedure SpeedButton7Click (Sender: TObject);
procedure FormShow (Sender: TObject);
private
{Private declarations}
public
procedure CmFocusChanged (var Msg: TCmFocusChanged);
message cm_FocusChanged;
{Public declarations}
end; const n = 15;
var Form7: TForm7; j, pay1, okn, tek: integer; b1: TBitBtn; fail, put, Activ, odn: string;
Msg1: TCmFocusChanged; nam: string;
implementation
uses Unit9, Unit8;
{$ R *. dfm}
procedure TForm7.CmFocusChanged (var Msg: TCmFocusChanged);
begin Msg1: = Msg; end;
procedure TForm7.SpeedButton1Click (Sender: TObject);
begin
b1: = TBitBtn.Create (Self);
nam: = nam + '# Глухий';
with b1 do begin
b1.Hint: = '1 ';
Left: = 20;
Top: = 20;
Width: = 60;
Height: = 100;
Parent: = Panel2;
Glyph.LoadFromFile (dir + '\ Іконки \ глухой.bmp'); end; end;
procedure TForm7.SpeedButton2Click (Sender: TObject);
begin
nam: = nam + '# Поворотний';
b1: = TBitBtn.Create (Self);
with b1 do begin
b1.Hint: = '2 ';
Left: = 20;
Top: = 20;
Width: = 60;
Height: = 100;
Parent: = Panel2;
Glyph.LoadFromFile (dir + '\ Іконки \ поворотний.bmp'); end; end;
procedure TForm7.SpeedButton3Click (Sender: TObject);
begin
nam: = nam + '# Відкидний';
b1: = TBitBtn.Create (Self);
with b1 do begin
b1.Hint: = '3 ';
Left: = 20;
Top: = 20;
Width: = 60;
Height: = 100;
Glyph.LoadFromFile (dir + '\ Іконки \ откідной.bmp');
Parent: = Panel2; end; end;
procedure TForm7.SpeedButton4Click (Sender: TObject);
begin
nam: = nam + '# балкон1';
b1: = TBitBtn.Create (Self);
with b1 do begin
b1.Hint: = '4 ';
Left: = 20;
Top: = 20;
Width: = 60;
Height: = 100;
Glyph.LoadFromFile (dir + '\ Іконки \ балкон1.bmp');
Parent: = Panel2; end; end;
procedure TForm7.SpeedButton5Click (Sender: TObject);
begin
nam: = nam + '# Балкон2';
b1: = TBitBtn.Create (Self);
with b1 do begin
b1.Hint: = '5 ';
Left: = 20;
Top: = 20;
Width: = 60;
Height: = 100;
Glyph.LoadFromFile (dir + '\ Іконки \ балкон2.bmp');
Parent: = Panel2; end; end;
procedure TForm7.SpeedButton6Click (Sender: TObject);
begin
nam: = nam + '# Вхід';
b1: = TBitBtn.Create (Self);
with b1 do begin
b1.Hint: = '6 ';
Left: = 20;
Top: = 20;
Width: = 60;
Height: = 100;
Glyph.LoadFromFile (dir + '\ Іконки \ вход.bmp');
Parent: = Panel2; end; end;
procedure TForm7.Panel2MouseDown (Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
const
SC_DragMove = $ F012; {a magic number}
begin
ReleaseCapture;
if Msg1.Sender.ClassName = 'TBitBtn' then
msg1.Sender.perform (WM_SysCommand, SC_DragMove, 0);
end;
procedure TForm7.ComboBox1Change (Sender: TObject);
begin
if ComboBox1.Text = 'Віконні модулі' then begin
SpeedButton1.Visible: = True; SpeedButton2.Visible: = True;
SpeedButton14.Visible: = True; SpeedButton15.Visible: = True;
SpeedButton16.Visible: = True; SpeedButton3.Visible: = True;
SpeedButton4.Visible: = False; SpeedButton5.Visible: = False;
SpeedButton6.Visible: = False; end else begin
SpeedButton4.Visible: = True; SpeedButton5.Visible: = True;
SpeedButton6.Visible: = True; SpeedButton1.Visible: = False;
SpeedButton2.Visible: = False; SpeedButton3.Visible: = False;
SpeedButton14.Visible: = False; SpeedButton15.Visible: = False;
SpeedButton16.Visible: = False; end; end;
procedure TForm7.FormCreate (Sender: TObject);
begin okn: = 1;
SpeedButton1.Visible: = False; SpeedButton2.Visible: = False;
SpeedButton3.Visible: = False; SpeedButton4.Visible: = False;
SpeedButton5.Visible: = False; SpeedButton6.Visible: = False;
SpeedButton14.Visible: = False; SpeedButton15.Visible: = False;
SpeedButton16.Visible: = False; end;
procedure TForm7.SpeedButton8Click (Sender: TObject);
begin
if (Combobox3.Text ='') or (Combobox2.Text ='') then
Showmessage ('Вкажіть тип профілю і ст.-пакету')
else begin
prof: = Combobox3.Text;
spak: = Combobox2.Text;
close; end; end;
procedure TForm7.SpeedButton9Click (Sender: TObject);
var B: TBitmap; srcRect, dstRect: TRect;
begin
if (put ='') or (nam ='') then Showmessage ('Спочатку завантажте ціну !!!')
else begin
B: = TBitmap.Create;
with dstRect do begin
Left: = 0;
Top: = 0;
Right: = Panel2.Width +1;
Bottom: = Panel2.Height +1; end;
with srcRect do begin
Left: = Panel2.Left +145;
Right: = Panel2.Left + Panel2.Width +145;
Top: = Panel2.Top +10;
Bottom: = Panel2.Top + Panel2.Height +10; end;
B. Width: = Panel2.Width;
B. Height: = Panel2.Height;
B.Canvas.CopyRect (dstRect, Self.Canvas, srcRect);
B. PixelFormat: = pf1bit;
B. SaveToFile (dir + '\ temp \' + inttostr (okn) + '. Bmp');
B. Free; form8.Show; end; end;
procedure TForm7.UpDown1Click (Sender: TObject; Button: TUDBtnType);
begin
if Msg1.Sender.ClassName = 'TBitBtn' then
msg1.Sender.Width: = UpDown1.Position * 3; end;
procedure TForm7.UpDown2Click (Sender: TObject; Button: TUDBtnType);
begin
if Msg1.Sender.ClassName = 'TBitBtn' then
msg1.Sender.Height: = UpDown2.Position * 3; end;
procedure TForm7.SpeedButton11Click (Sender: TObject);
Var p: integer; begin
if Msg1.Sender.ClassName = 'TBitBtn' then begin
if msg1.Sender.Hint = '1 'then begin p: = pos (' # Глухий ', nam); delete (nam, p, 7); msg1.Sender.Destroy; end;
if msg1.Sender.Hint = '2 'then begin p: = pos (' # Поворотний ', nam); delete (nam, p, 11); msg1.Sender.Destroy; end;
if msg1.Sender.Hint = '3 'then begin p: = pos (' # Відкидний ', nam); delete (nam, p, 9); msg1.Sender.Destroy; end;
if msg1.Sender.Hint = '4 'then begin p: = pos (' # балкон1 ', nam); delete (nam, p, 8); msg1.Sender.Destroy; end;
if msg1.Sender.Hint = '5 'then begin p: = pos (' # Балкон2 ', nam); delete (nam, p, 8); msg1.Sender.Destroy; end;
if msg1.Sender.Hint = '6 'then begin p: = pos (' # Вхід ', nam); delete (nam, p, 5); msg1.Sender.Destroy; end; end; end;
procedure TForm7.SpeedButton13Click (Sender: TObject);
var B: TBitmap; srcRect, dstRect: TRect;
begin
B: = TBitmap.Create;
with dstRect do begin
Left: = 0;
Top: = 0;
Right: = Panel2.Width +1;
Bottom: = Panel2.Height +1; end;
with srcRect do begin
Left: = Panel2.Left +145;
Right: = Panel2.Left + Panel2.Width +145;
Top: = Panel2.Top +10;
Bottom: = Panel2.Top + Panel2.Height +10; end;
B. Width: = Panel2.Width;
B. Height: = Panel2.Height;
B.Canvas.CopyRect (dstRect, Self.Canvas, srcRect);
B. PixelFormat: = pf1bit;
B. SaveToFile (dir + '\ Шаблони \' + nam + '. Bmp');
ShowMessage ('Шаблон успішно зберігся!');
B. Free; end;
procedure TForm7.SpeedButton12Click (Sender: TObject);
Var s: string; d, a: integer;
begin
if form7.OpenDialog1.Execute then begin
image2.Top: = Panel2.Top-10;
image2.Left: = Panel2.Left-130;
image2.AutoSize: = true;
image2.Transparent: = FaLSE;
Image2.Picture.LoadFromFile (OpenDialog1.FileName);
nam: = OpenDialog1.FileName;
getdir (0, s); d: = pos (s, nam); a: = pos ('#', nam);
delete (nam, d, a-1); d: = pos ('.', nam);
delete (nam, d, 4); end; end;
procedure TForm7.SpeedButton14Click (Sender: TObject);
begin
nam: = nam + '# Поворотний';
b1: = TBitBtn.Create (Self);
with b1 do begin
b1.Hint: = '2 ';
Left: = 20;
Top: = 20;
Width: = 60;
Height: = 100;
Parent: = Panel2;
Glyph.LoadFromFile (dir + '\ Іконки \ поворотний1.bmp'); end; end;
procedure TForm7.SpeedButton15Click (Sender: TObject);
begin
nam: = nam + '# Поворотний';
b1: = TBitBtn.Create (Self);
with b1 do begin
b1.Hint: = '2 ';
Left: = 20;
Top: = 20;
Width: = 60;
Height: = 100;
Parent: = Panel2;
Glyph.LoadFromFile (dir + '\ Іконки \ поворотний2.bmp'); end; end;
procedure TForm7.SpeedButton16Click (Sender: TObject);
begin
nam: = nam + '# Відкидний';
b1: = TBitBtn.Create (Self);
with b1 do begin
b1.Hint: = '3 ';
Left: = 20;
Top: = 20;
Width: = 60;
Height: = 100;
Glyph.LoadFromFile (dir + '\ Іконки \ откідной2.bmp');
Parent: = Panel2; end; end;
procedure TForm7.SpeedButton17Click (Sender: TObject);
begin
if (Combobox1.Text ='') or (Combobox3.Text ='') or (Combobox2.Text ='') then
Showmessage ('Введіть всі необхідні дані!') Else begin
if combobox1.Text = 'Віконні модулі' then
fail: = '\ Ціни \ Вікна \'
else fail: = '\ Ціни \ Двері \';
if (Combobox3.Text = 'Exprof58mm') and (Combobox2.Text = 'Однокамерний') then
Put: = fail + 'Exprof58mm24.dat';
if (Combobox3.Text = 'Exprof58mm') and (Combobox2.Text = 'Двокамерний') then
Put: = fail + 'Exprof58mm32.dat';
if (Combobox3.Text = 'Exprof58mm') and (Combobox2.Text = 'Одне скло') then begin
Put: = fail + 'Exprof58mm24.dat';
odn: = '1 '; end;
if (Combobox3.Text = 'Exprof101mm') and (Combobox2.Text = 'Однокамерний') then
Put: = fail + 'Exprof101mm24.dat';
if (Combobox3.Text = 'Exprof101mm') and (Combobox2.Text = 'Двокамерний') then
Put: = fail + 'Exprof101mm32.dat';
if (Combobox3.Text = 'Exprof101mm') and (Combobox2.Text = 'Одне скло') then begin
Put: = fail + 'Exprof101mm24.dat'; odn: = '1 ';
end; Showmessage ('Ціна успішно завантажена!'); end; end;
procedure TForm7.SpeedButton10Click (Sender: TObject);
var f: LongInt;
begin
if itog <>''then begin
if kolok> 0 then kolok: = kolok-1;
tek: = tek +1;
label7.Caption: = inttostr (kolok);
label5.Caption: = inttostr (tek);
end else Showmessage ('Спочатку розрахувати попереднє вікно!');
nam :=''; okn: = okn +1;
for f: = 0 to ComponentCount - 1 do begin
if (Components [f] is TBitBtn) then
(Components [f] as TBitBtn). Visible: = false; end; end;
procedure TForm7.SpeedButton7Click (Sender: TObject);
begin Form7.Free; end;
procedure TForm7.FormShow (Sender: TObject);
begin tek: = 1;
label7.Caption: = inttostr (kolok);
label5.Caption: = inttostr (tek); end; end.
unit Unit8;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Spin, Unit7, unit1, Buttons, ComCtrls, jpeg, ExtCtrls, Grids;
type
TForm8 = class (TForm)
Image1: TImage; Label4: TLabel; SpeedButton2: TSpeedButton;
SpeedButton9: TSpeedButton; Label9: TLabel; SpeedButton3: TSpeedButton;
SpeedButton1: TSpeedButton; Label6: TLabel; Label5: TLabel; SpinEdit1: TSpinEdit;
SpinEdit2: TSpinEdit; Label2: TLabel; Label1: TLabel; Label3: TLabel;
StringGrid1: TStringGrid; Bevel3: TBevel; Label7: TLabel; Label8: TLabel;
Bevel1: TBevel; Label14: TLabel; Bevel2: TBevel; Label13: TLabel; Label10: TLabel;
SpeedButton5: TSpeedButton; SpeedButton6: TSpeedButton; Label11: TLabel;
Label12: TLabel; SpeedButton7: ​​TSpeedButton; SpeedButton8: TSpeedButton;
SpeedButton4: TSpeedButton; Label15: TLabel; SpeedButton10: TSpeedButton;
SpeedButton11: TSpeedButton; SpeedButton12: TSpeedButton;
StringGrid2: TStringGrid; Label16: TLabel; Label17: TLabel; Label18: TLabel;
Label19: TLabel; SpeedButton13: TSpeedButton; SpeedButton14: TSpeedButton;
Label20: TLabel; procedure SpeedButton1Click (Sender: TObject);
procedure SpeedButton2Click (Sender: TObject);
procedure SpeedButton9Click (Sender: TObject);
procedure SpeedButton3Click (Sender: TObject);
procedure FormCreate (Sender: TObject);
procedure StringGrid1SelectCell (Sender: TObject; ACol, ARow: Integer;
var CanSelect: Boolean);
procedure SpeedButton4Click (Sender: TObject);
procedure SpeedButton5Click (Sender: TObject);
procedure SpeedButton6Click (Sender: TObject);
procedure SpeedButton7Click (Sender: TObject);
procedure SpeedButton10Click (Sender: TObject);
procedure SpeedButton11Click (Sender: TObject);
procedure SpeedButton12Click (Sender: TObject);
procedure SpeedButton8Click (Sender: TObject);
procedure SpeedButton13Click (Sender: TObject);
procedure FormShow (Sender: TObject);
procedure SpeedButton14Click (Sender: TObject);
private
{Private declarations}
public
{Public declarations}
end;
var Form8: TForm8; p: integer; n, path, one, two, tri, minv, minh, maxv, maxh: string;
plos, res: real; l, h, impost, pay, stol, e, dob: integer; start: Boolean;
Razpod, Markp, Podsen, So9, Lam, SOB, Ton, Maskit: string;
implementation
uses Unit15, Unit17, Unit18, Unit19, Unit20, Unit9, Unit14;
{$ R *. dfm}
procedure TForm8.SpeedButton1Click (Sender: TObject);
begin
WinExec ('c: / windows/system32/calc.exe', SW_showNormal);
end;
procedure TForm8.SpeedButton2Click (Sender: TObject);
var f: Integer;
begin
if StringGrid2.Cells [4,1 ]<>'' then
ton: = 'Тонування:' + ton;
if StringGrid2.Cells [0,1 ]<>'' then
SOB: = 'Загальна площа:' + StringGrid2.Cells [0,1];
if StringGrid2.Cells [6,1 ]<>'' then
itog: = StringGrid2.Cells [6,1] + 'у.о.';
if StringGrid2.Cells [3,1] = "так" then
So9: = 'Профіль SO9 Враховано';
if StringGrid2.Cells [1,1 ]<>'' then
mon: = StringGrid2.Cells [1,1];
if StringGrid2.Cells [5,1 ]<>'' then
Lam: = 'Ламінування:' + StringGrid2.Cells [5,1];
for f: = 0 to ComponentCount - 1 do begin
if (Components [f] is TSpinEdit) then
(Components [f] as TSpinEdit). Value: = 0;
Stringgrid1.Cols [0]. Clear; Stringgrid1.Cols [1]. Clear;
Stringgrid1.Cols [2]. Clear; Stringgrid1.Cols [3]. Clear;
Stringgrid2.Rows [1]. Clear; SpeedButton5.Visible: = false;
SpeedButton6.Visible: = False; SpeedButton7.Visible: = false;
SpeedButton10.Visible: = false; SpeedButton11.Visible: = false;
SpeedButton14.Visible: = false; SpeedButton8.Visible: = false; end; close; end;
procedure TForm8.SpeedButton9Click (Sender: TObject);
label 1,2,3,4,5,6;
Var i, b: integer; nam1: string; f, dop: textfile;
begin b: = 1;
SpeedButton3.Visible: = true; SpeedButton9.Visible: = false;
{$ I-}
AssignFile (f, dir + put);
{$ I +}
If IOResult = 0 then begin
Reset (f);
while not EoF (f) do begin
readln (f, one);
readln (f, two);
readln (f, tri); end; CloseFile (f); end;
nam1: = nam; delete (nam1, 1,1); nam1: = nam1 +'#';
for i: = 1 to length (nam1) do begin
if nam1 [i ]<>'#' then n: = n + nam1 [i]
else begin if n = 'Глухий' then begin
Label4.Caption: = 'Глухий';
pay: = strtoint (one);
if odn = '1 'then
pay: = pay-6;
impost: = impost +1;
{$ I-}
AssignFile (dop, dir + '\ Технічні допуски \ Глухий модуль.dat');
{$ I +}
If IOResult = 0 then begin
Reset (dop);
while not EoF (dop) do begin
readln (dop, minv);
readln (dop, minh);
readln (dop, maxv);
readln (dop, maxh); end; CloseFile (dop); end;
SpinEdit1.MinValue: = strtoint (minh);
SpinEdit1.MaxValue: = strtoint (maxh);
SpinEdit2.MinValue: = strtoint (minv);
SpinEdit2.MaxValue: = strtoint (maxv);
SpinEdit1.Value: = strtoint (minh);
SpinEdit2.Value: = strtoint (minv);
ShowMessage ('Введіть розміри і натисніть "ОК"');
1: application.ProcessMessages;
if start = true then begin l: = spinedit1.Value;
h: = spinedit2.Value;
plos: = (l * h) * 0.000001;
if (plos <= 0.5) then
res: = (plos * pay) + ((plos * pay) / 100) * 30
else res: = plos * pay;
if StringGrid1.RowCount <b then StringGrid1.RowCount: = b +1;
StringGrid1.Cells [0, b]: = 'Глухий';
StringGrid1.Cells [1, b]: = floattostr (plos);
StringGrid1.Cells [2, b]: = floattostr (res);
b: = b +1;
start: = false; SpinEdit1.Value: = 0;
SpinEdit2.Value: = 0; end else goto 1;
end;
if n = 'Поворотний' then begin
Label4.Caption: = 'Поворотний';
pay: = strtoint (two);
if odn = '1 'then
pay: = pay-6;
{$ I-}
AssignFile (dop, dir + '\ Технічні допуски \ Поворотний модуль.dat');
{$ I +}
If IOResult = 0 then begin
Reset (dop);
while not EoF (dop) do begin
readln (dop, minv);
readln (dop, minh);
readln (dop, maxv);
readln (dop, maxh); end; CloseFile (dop); end;
SpinEdit1.MinValue: = strtoint (minh);
SpinEdit1.MaxValue: = strtoint (maxh);
SpinEdit2.MinValue: = strtoint (minv);
SpinEdit2.MaxValue: = strtoint (maxv);
SpinEdit1.Value: = strtoint (minh);
SpinEdit2.Value: = strtoint (minv);
ShowMessage ('Введіть розміри і натисніть "ОК"');
2: application.ProcessMessages;
if start = true then begin l: = spinedit1.Value;
h: = spinedit2.Value;
plos: = (l * h) * 0.000001;
if plos <= 0.5 then
res: = (plos * pay) + ((plos * pay) / 100) * 30
else res: = plos * pay;
if StringGrid1.RowCount <b then StringGrid1.RowCount: = b +1;
StringGrid1.Cells [0, b]: = 'Поворотний';
StringGrid1.Cells [1, b]: = floattostr (plos);
StringGrid1.Cells [2, b]: = floattostr (res);
b: = b +1;
start: = false; SpinEdit1.Value: = 0;
SpinEdit2.Value: = 0; end else goto 2; end;
if n = 'Відкидний' then begin
Label4.Caption: = 'Відкидний';
pay: = strtoint (tri);
if odn = '1 'then
pay: = pay-6;
{$ I-}
AssignFile (dop, dir + '\ Технічні допуски \ Поворотно-откідной.dat');
{$ I +}
If IOResult = 0 then begin
Reset (dop);
while not EoF (dop) do begin
readln (dop, minv);
readln (dop, minh);
readln (dop, maxv);
readln (dop, maxh); end; CloseFile (dop); end;
SpinEdit1.MinValue: = strtoint (minh);
SpinEdit1.MaxValue: = strtoint (maxh);
SpinEdit2.MinValue: = strtoint (minv);
SpinEdit2.MaxValue: = strtoint (maxv);
SpinEdit1.Value: = strtoint (minh);
SpinEdit2.Value: = strtoint (minv);
ShowMessage ('Введіть розміри і натисніть "ОК"');
3: application.ProcessMessages;
if start = true then begin l: = spinedit1.Value;
h: = spinedit2.Value;
plos: = (l * h) * 0.000001;
if plos <= 0.5 then
res: = (plos * pay) + ((plos * pay) / 100) * 30
else res: = plos * pay;
if StringGrid1.RowCount <b then StringGrid1.RowCount: = b +1;
StringGrid1.Cells [0, b]: = 'Відкидний';
StringGrid1.Cells [1, b]: = floattostr (plos);
StringGrid1.Cells [2, b]: = floattostr (res);
b: = b +1;
start: = false; SpinEdit1.Value: = 0;
SpinEdit2.Value: = 0; end else goto 3; end;
if n = 'балкон1' then begin
Label4.Caption: = 'Балконна-поворотна двері';
pay: = strtoint (one);
if odn = '1 'then
pay: = pay-6;
{$ I-}
AssignFile (dop, dir + '\ Технічні допуски \ Балконна поворотная.dat');
{$ I +}
If IOResult = 0 then begin
Reset (dop);
while not EoF (dop) do begin
readln (dop, minv);
readln (dop, minh);
readln (dop, maxv);
readln (dop, maxh); end; CloseFile (dop); end;
SpinEdit1.MinValue: = strtoint (minh);
SpinEdit1.MaxValue: = strtoint (maxh);
SpinEdit2.MinValue: = strtoint (minv);
SpinEdit2.MaxValue: = strtoint (maxv);
SpinEdit1.Value: = strtoint (minh);
SpinEdit2.Value: = strtoint (minv);
ShowMessage ('Введіть розміри і натисніть "ОК"');
4: application.ProcessMessages;
if start = true then begin l: = spinedit1.Value;
h: = spinedit2.Value;
plos: = (l * h) * 0.000001;
if plos <= 0.5 then
res: = (plos * pay) + ((plos * pay) / 100) * 30
else res: = plos * pay;
if StringGrid1.RowCount <b then StringGrid1.RowCount: = b +1;
StringGrid1.Cells [0, b]: = 'Балкон. поворотна ';
StringGrid1.Cells [1, b]: = floattostr (plos);
StringGrid1.Cells [2, b]: = floattostr (res);
b: = b +1;
start: = false; SpinEdit1.Value: = 0;
SpinEdit2.Value: = 0; end else goto 4;
end;
if n = 'Балкон2' then begin
Label4.Caption: = 'Балконна-поворотно-відкидна двері';
pay: = strtoint (two);
if odn = '1 'then
pay: = pay-6;
{$ I-}
AssignFile (dop, dir + '\ Технічні допуски \ Поворотно-откідная.dat');
{$ I +}
If IOResult = 0 then begin
Reset (dop);
while not EoF (dop) do begin
readln (dop, minv);
readln (dop, minh);
readln (dop, maxv);
readln (dop, maxh); end; CloseFile (dop); end;
SpinEdit1.MinValue: = strtoint (minh);
SpinEdit1.MaxValue: = strtoint (maxh);
SpinEdit2.MinValue: = strtoint (minv);
SpinEdit2.MaxValue: = strtoint (maxv);
SpinEdit1.Value: = strtoint (minh);
SpinEdit2.Value: = strtoint (minv);
ShowMessage ('Введіть розміри і натисніть "ОК"');
5: application.ProcessMessages;
if start = true then begin l: = spinedit1.Value;
h: = spinedit2.Value;
plos: = (l * h) * 0.000001;
if plos <= 0.5 then
res: = (plos * pay) + ((plos * pay) / 100) * 30
else res: = plos * pay;
if StringGrid1.RowCount <b then StringGrid1.RowCount: = b +1;
StringGrid1.Cells [0, b]: = 'Балкон. поворот-откід ';
StringGrid1.Cells [1, b]: = floattostr (plos);
StringGrid1.Cells [2, b]: = floattostr (res);
b: = b +1;
start: = false; SpinEdit1.Value: = 0;
SpinEdit2.Value: = 0; end else goto 5; end;
if n = 'Вхід' then begin
Label4.Caption: = 'Вхідні двері';
pay: = strtoint (tri);
if odn = '1 'then
pay: = pay-6;
{$ I-}
AssignFile (dop, dir + '\ Технічні допуски \ Вхідна дверь.dat');
{$ I +}
If IOResult = 0 then begin
Reset (dop);
while not EoF (dop) do begin
readln (dop, minv);
readln (dop, minh);
readln (dop, maxv);
readln (dop, maxh); end; CloseFile (dop); end;
SpinEdit1.MinValue: = strtoint (minh);
SpinEdit1.MaxValue: = strtoint (maxh);
SpinEdit2.MinValue: = strtoint (minv);
SpinEdit2.MaxValue: = strtoint (maxv);
SpinEdit1.Value: = strtoint (minh);
SpinEdit2.Value: = strtoint (minv);
ShowMessage ('Введіть розміри і натисніть "ОК"');
6: application.ProcessMessages;
if start = true then begin l: = spinedit1.Value;
h: = spinedit2.Value;
plos: = (l * h) * 0.000001;
if plos <= 0.5 then
res: = (plos * pay) + ((plos * pay) / 100) * 30
else res: = plos * pay;
if StringGrid1.RowCount <b then StringGrid1.RowCount: = b +1;
StringGrid1.Cells [0, b]: = 'Вхідні двері';
StringGrid1.Cells [1, b]: = floattostr (plos);
StringGrid1.Cells [2, b]: = floattostr (res);
b: = b +1;
start: = false; SpinEdit1.Value: = 0;
SpinEdit2.Value: = 0; end else goto 6;
end; n :=''; end; end; dob: = b;
ShowMessage ('Розрахунок вартості завершено !!!');
SpeedButton3.Visible: = false; SpeedButton9.Visible: = true;
SpeedButton2.Visible: = True; SpeedButton12.Visible: = True; end;
procedure TForm8.SpeedButton3Click (Sender: TObject);
begin start: = true; end;
procedure TForm8.FormCreate (Sender: TObject);
begin e: = 0;
start: = false;
StringGrid2.Cells [0,0]: = 'Площа'; StringGrid2.Cells [1,0]: = 'Монтаж';
StringGrid2.Cells [2,0]: = 'Підвіконня'; StringGrid2.Cells [3,0]: = 'Профіль SO9';
StringGrid2.Cells [4,0]: = 'Тонування'; StringGrid2.Cells [5,0]: = 'Ламін.';
StringGrid2.Cells [6,0]: = 'Підсумок'; end;
procedure TForm8.StringGrid1SelectCell (Sender: TObject; ACol,
ARow: Integer; var CanSelect: Boolean);
begin
Label14.Caption: = StringGrid1.Cells [0, ARow];
stol: = Arow; end;
procedure TForm8.SpeedButton4Click (Sender: TObject);
Var sen, sen1: real;
begin
if (label14.Caption = 'Поворотний') or (label14.Caption = 'Відкидний') then
if StringGrid1.Cells [3, stol] <> "так" then
begin
sen1: = strtofloat (StringGrid1.Cells [2, stol]);
sen: = sen1 +16;
StringGrid1.Cells [2, stol]: = floattostr (sen);
StringGrid1.Cells [3, stol]: = "так";
ShowMessage ('Розрахунок закінчено!'); End
else Showmessage ('На цьому модулі вже стоїть маскітка!')
else Showmessage ('На даний модуль не можна ставити маскітку!'); end;
procedure TForm8.SpeedButton5Click (Sender: TObject);
begin
if Form8.StringGrid2.Cells [5,1] =''then
form15.Showmodal else
Showmessage ('Вікно можна ламінувати тільки один раз!'); End;
procedure TForm8.SpeedButton6Click (Sender: TObject);
begin
if Form8.StringGrid2.Cells [4,1] =''then
form17.Show else
Showmessage ('Вікно можна тонувати тільки один раз!'); End;
procedure TForm8.SpeedButton7Click (Sender: TObject);
begin
if Form8.StringGrid2.Cells [2,1] = "так" then
Showmessage ('На вікно можна ставити тільки один підвіконня!')
else Form18.Showmodal; end;
procedure TForm8.SpeedButton10Click (Sender: TObject);
begin
if Form8.StringGrid2.Cells [3,1] <> "так" then
form19.Showmodal
else Showmessage ('На цьому вікні профіль вже врахований!'); end;
procedure TForm8.SpeedButton11Click (Sender: TObject);
begin
if impost> = 2 then begin e: = e +1;
if e <= (impost-1) then
form20.Showmodal
else showmessage ('Ви перевищили число!'); end
else showmessage ('Імпост вважається тільки між двома глухими модулями!');
end;
procedure TForm8.SpeedButton12Click (Sender: TObject);
Var i: integer; p2, s: real; beginp2: = 0; s: = 0;
for i: = 1 to dob do
if StringGrid1.Cells [1, i ]<>'' then
p2: = p2 + Strtofloat (StringGrid1.Cells [1, i]);
StringGrid2.Cells [0,1]: = Floattostr (p2);
for i: = 1 to dob do
if StringGrid1.Cells [2, i ]<>'' then
s: = s + strtofloat (StringGrid1.Cells [2, i]);
if impost = 1 then
s: = s + p2 * 7;
StringGrid2.Cells [6,1]: = floattostr (s);
SpeedButton12.Visible: = false; SpeedButton5.Visible: = true;
SpeedButton6.Visible: = true; SpeedButton7.Visible: = true;
SpeedButton10.Visible: = true; SpeedButton11.Visible: = true;
SpeedButton14.Visible: = true; SpeedButton8.Visible: = true; end;
procedure TForm8.SpeedButton8Click (Sender: TObject);
Var pl, sen: real;
begin
if StringGrid2.Cells [1,1] <> "так" then
begin
pl: = strtofloat (StringGrid2.Cells [6,1]);
sen: = (pl/100) * 12;
sen: = sen + pl;
StringGrid2.Cells [6,1]: = floattostr (sen);
StringGrid2.Cells [1,1]: = "так";
ShowMessage ('Розрахунок закінчено!'); End
else Showmessage ('На цьому вікні монтаж вже розрахований!') end;
procedure TForm8.SpeedButton13Click (Sender: TObject);
begin
if StringGrid2.Cells [6,1 ]<>'' then
Form9.Edit5.Text: = StringGrid2.Cells [6,1];
form9.Show; end;
procedure TForm8.FormShow (Sender: TObject);
begin
SpeedButton3.Visible: = false;
SpeedButton9.Visible: = true;
StringGrid1.Cells [0,0]: = 'Модулі';
StringGrid1.Cells [1,0]: = 'Площа';
StringGrid1.Cells [2,0]: = 'Вартість';
StringGrid1.Cells [3,0]: = 'Москітка'; end;
procedure TForm8.SpeedButton14Click (Sender: TObject);
begin form14.show; end; end.
unit Unit9;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Mask, Buttons, jpeg, ExtCtrls;
type
TForm9 = class (TForm)
Image1: TImage; Label1: TLabel; Label2: TLabel; Label3: TLabel; Label4: TLabel;
Label5: TLabel; Label6: TLabel; RadioButton1: TRadioButton;
RadioButton2: TRadioButton; RadioButton3: TRadioButton;
SpeedButton1: TSpeedButton; Edit1: TEdit; Edit2: TEdit; Edit3: TEdit; Edit4: TEdit;
Edit5: TEdit; procedure SpeedButton1Click (Sender: TObject);
procedure Edit1KeyPress (Sender: TObject; var Key: Char);
procedure Edit2KeyPress (Sender: TObject; var Key: Char);
procedure Edit3KeyPress (Sender: TObject; var Key: Char);
procedure Edit4KeyPress (Sender: TObject; var Key: Char);
procedure Edit5KeyPress (Sender: TObject; var Key: Char);
private
{Private declarations}
public
{Public declarations}
end;
var Form9: TForm9;
implementation
{$ R *. dfm}
procedure TForm9.SpeedButton1Click (Sender: TObject);
Var evro, dol, rub: real; kursE, kursD: real;
begin
kursD: = 0; kursE: = 0; evro: = 0; dol: = 0; rub: = 0;
If RadioButton1.Checked = True then begin
kursD: = Strtofloat (Edit2.Text);
dol: = Strtofloat (Edit4.Text);
Edit3.Text: = floattoStr (dol * kursD); end;
If RadioButton2.Checked = True then begin
kursE: = Strtofloat (Edit1.Text);
evro: = Strtofloat (Edit5.Text);
Edit3.Text: = floattoStr (evro * kursE); end;
If RadioButton3.Checked = True then begin
kursE: = Strtofloat (Edit1.Text);
kursD: = Strtofloat (Edit2.Text);
evro: = Strtofloat (Edit5.Text);
Edit4.Text: = floattoStr ((evro * kursE) / kursD); end; end;
procedure TForm9.Edit1KeyPress (Sender: TObject; var Key: Char);
var vrPos, vrLength, vrSelStart: byte;
const I: byte = 1;
begin
with Sender as TEdit do
begin
vrLength: = Length (Text);
vrPos: = Pos (',', Text);
vrSelStart: = SelStart; end;
case Key of '0 '.. '9':
begin
if (vrPos> 0) and (vrLength - vrPos> I) and (vrSelStart> = vrPos) then
Key: = # 0;
end; ',', '.':
begin
if (vrPos> 0) or (vrSelStart = 0) or (vrLength = 0) then
Key: = # 0 else Key: = # 44; end; # 8:; else Key: = # 0; end; end;
procedure TForm9.Edit2KeyPress (Sender: TObject; var Key: Char);
var vrPos, vrLength, vrSelStart: byte;
const I: byte = 1;
begin
with Sender as TEdit do
begin
vrLength: = Length (Text);
vrPos: = Pos (',', Text);
vrSelStart: = SelStart; end;
case Key of '0 '.. '9':
begin
if (vrPos> 0) and (vrLength - vrPos> I) and (vrSelStart> = vrPos) then
Key: = # 0; end; ',', '.':
begin
if (vrPos> 0) or (vrSelStart = 0) or (vrLength = 0) then
Key: = # 0 else Key: = # 44; end; # 8:; else Key: = # 0; end; end;
procedure TForm9.Edit3KeyPress (Sender: TObject; var Key: Char);
var vrPos, vrLength, vrSelStart: byte;
const I: byte = 1;
begin
with Sender as TEdit do
begin
vrLength: = Length (Text);
vrPos: = Pos (',', Text);
vrSelStart: = SelStart; end;
case Key of '0 '.. '9':
begin
if (vrPos> 0) and (vrLength - vrPos> I) and (vrSelStart> = vrPos) then
Key: = # 0; end; ',', '.':
begin
if (vrPos> 0) or (vrSelStart = 0) or (vrLength = 0) then Key: = # 0
else Key: = # 44; end; # 8:; else Key: = # 0; end; end;
procedure TForm9.Edit4KeyPress (Sender: TObject; var Key: Char);
var vrPos, vrLength, vrSelStart: byte;
const I: byte = 1;
begin
with Sender as TEdit do
begin
vrLength: = Length (Text);
vrPos: = Pos (',', Text);
vrSelStart: = SelStart; end;
case Key of '0 '.. '9':
begin
if (vrPos> 0) and (vrLength - vrPos> I) and (vrSelStart> = vrPos) then
Key: = # 0; end; ',', '.':
begin
if (vrPos> 0) or (vrSelStart = 0) or (vrLength = 0) then
Key: = # 0 else Key: = # 44; end; # 8:; else Key: = # 0; end; end;
procedure TForm9.Edit5KeyPress (Sender: TObject; var Key: Char);
var vrPos, vrLength, vrSelStart: byte;
const I: byte = 1;
begin
with Sender as TEdit do
begin
vrLength: = Length (Text);
vrPos: = Pos (',', Text);
vrSelStart: = SelStart; end;
case Key of '0 '.. '9':
begin
if (vrPos> 0) and (vrLength - vrPos> I) and (vrSelStart> = vrPos) then
Key: = # 0; end; ',', '.':
begin
if (vrPos> 0) or (vrSelStart = 0) or (vrLength = 0) then
Key: = # 0 else Key: = # 44; end; # 8:; else Key: = # 0; end; end; end.
unit Unit10;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, QRCtrls, QuickRpt, ExtCtrls, StdCtrls, QRPrntr, ImgList, Buttons,
RpBase, RpSystem, RpDefine, RpRave;
type
TForm10 = class (TForm)
QuickRep1: TQuickRep; QRSubDetail1: TQRSubDetail; QRLabel5: TQRLabel;
QRRichText1: TQRRichText; QRLabel1: TQRLabel; QRLabel2: TQRLabel;
QRLabel3: TQRLabel; QRImage1: TQRImage; QRImage2: TQRImage;
QRImage3: TQRImage; QRImage4: TQRImage; QRImage5: TQRImage;
QRImage6: TQRImage; Image1: TImage; SpeedButton2: TSpeedButton;
SpeedButton1: TSpeedButton; procedure FormCreate (Sender: TObject);
procedure SpeedButton1Click (Sender: TObject);
procedure SpeedButton2Click (Sender: TObject);
private
{Private declarations}
public
{Public declarations}
end;
var Form10: TForm10; nzak: integer;
implementation
uses Unit1, unit7;
{$ R *. dfm}
procedure TForm10.FormCreate (Sender: TObject);
begin QrrichText1.ParentRichEdit: = Form1.RichEdit1; end;
procedure TForm10.SpeedButton1Click (Sender: TObject);
Var h: integer; f: textfile; s: string; dlg: Word;
begin
AssignFile (f, dir + '\ nzak.txt');
Reset (f);
Read (f, s);
nzak: = StrToInt (s);
nzak: = nzak +1;
s: = IntToStr (nzak);
CloseFile (f);
rewrite (f);
write (f, s);
closefile (f);
Form1.RichEdit1.Lines.SaveToFile (dir + '\ БД \' + fiozak + '(№' + inttostr (nzak )+')'+'. rtf ');
dlg: = MessageDlg ('Ви хочете зберегти замовлення?', mtConfirmation, mbYesNoCancel, 0);
if dlg = mrYes then
QuickRep1.PrintBackground else
for h: = 1 to 6 do
image1.Picture.SaveToFile (dir + '\ temp \' + inttostr (h) + '. bmp');
Form1.RichEdit1.Lines.Clear; Close; end;
procedure TForm10.SpeedButton2Click (Sender: TObject);
begin
QuickRep1.Preview; end; end.
unit Unit11;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Buttons, StdCtrls, Spin, jpeg, ExtCtrls;
type
TForm11 = class (TForm)
Image1: TImage; SpeedButton2: TSpeedButton; SpeedButton1: TSpeedButton;
Label1: TLabel; SpinEdit1: TSpinEdit; procedure SpeedButton1Click (Sender: TObject);
procedure SpeedButton2Click (Sender: TObject);
private
{Private declarations}
public
{Public declarations}
end;
var Form11: TForm11;
implementation
uses Unit16, Unit1;
{$ R *. dfm}
procedure TForm11.SpeedButton1Click (Sender: TObject);
begin close; end;
procedure TForm11.SpeedButton2Click (Sender: TObject);
begin
kolok: = SpinEdit1.Value;
form16.show;
SpinEdit1.Value: = 1; close; end; end.
unit Unit12;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Buttons, StdCtrls, Spin, Mask, ComCtrls, Grids, jpeg, ExtCtrls, ShellAPI, Unit1;
type
TForm12 = class (TForm)
GroupBox2: TGroupBox; Label1: TLabel; Image1: TImage;
SpeedButton4: TSpeedButton; RichEdit1: TRichEdit; SpeedButton2: TSpeedButton;
SpeedButton1: TSpeedButton; SpeedButton5: TSpeedButton; ListBox1: TListBox;
procedure SpeedButton1Click (Sender: TObject);
procedure SpeedButton4Click (Sender: TObject);
procedure SpeedButton5Click (Sender: TObject);
procedure ListBox1Enter (Sender: TObject);
procedure FormKeyPress (Sender: TObject; var Key: Char);
procedure FormShow (Sender: TObject);
private
FPrefix: array [0 .. 255] of char;
{Private declarations}
public
{Public declarations}
end;
var Form12: TForm12; Count: integer;
implementation
{$ R *. dfm}
procedure TForm12.SpeedButton1Click (Sender: TObject);
begin close; end;
procedure TForm12.SpeedButton4Click (Sender: TObject);
begin
richedit1.Lines.LoadFromFile (dir + '\ БД \' + listbox1.Items.Strings [listbox1.ItemIndex]);
end;
procedure TForm12.SpeedButton5Click (Sender: TObject);
begin
RichEdit1.Print ('Роздруківка замовлення');
end;
procedure TForm12.ListBox1Enter (Sender: TObject);
begin
FPrefix [0]: = # 0;
Label1.Caption: = StrPas (FPrefix);
end;
procedure TForm12.FormKeyPress (Sender: TObject; var Key: Char);
Var curKey: array [0 .. 1] of char;
ndx: integer;
begin
if ActiveControl = ListBox1 then begin
if key = # 8 {Backspace (клавіша повернення)} then begin
if FPrefix [0] <> # 0 then begin
FPrefix [StrLen (FPrefix) - 1]: = # 0; end end else begin
curKey [0]: = Key;
curKey [1]: = # 0;
StrCat (FPrefix, curKey);
ndx: = SendMessage (ListBox1.Handle, LB_FINDSTRING,
-1, Longint (@ FPrefix));
if ndx <> LB_ERR then
ListBox1.ItemIndex: = ndx; end;
Label1.Caption: = StrPas (FPrefix);
Key: = # 0; end; end;
procedure TForm12.FormShow (Sender: TObject);
var F: TSearchRec; Path: string; Attr: Integer;
begin
Path: = dir + '\ БД \ *. rtf';
Attr: = faAnyFile;
FindFirst (Path, Attr, F);
if F.name <>''then
begin
ListBox1.Items.Add (F.name); {Додавання в TListBox імені знайденого файлу}
while FindNext (F) = 0 do
ListBox1.Items.Add (F.name); end; FindClose (F); end; end.
unit Unit13;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Grids, StdCtrls, Buttons, unit1, jpeg, ExtCtrls;
type
TForm13 = class (TForm)
Image1: TImage; SpeedButton3: TSpeedButton; SpeedButton2: TSpeedButton;
SpeedButton1: TSpeedButton; StringGrid1: TStringGrid; Label2: TLabel; Label3: TLabel;
Label1: TLabel; procedure FormCreate (Sender: TObject);
procedure SpeedButton1Click (Sender: TObject);
procedure SpeedButton2Click (Sender: TObject);
procedure SpeedButton3Click (Sender: TObject);
private
{Private declarations}
public
{Public declarations}
end;
var Form13: TForm13;
implementation
{$ R *. dfm}
procedure TForm13.FormCreate (Sender: TObject);
begin
Form13.StringGrid1.Cells [0,0]: = 'Найменування';
Form13.StringGrid1.Cells [0,1]: = 'Глухий модуль';
Form13.StringGrid1.Cells [0,2]: = 'Поворотний модуль';
Form13.StringGrid1.Cells [0,3]: = 'Поворотно-відкидний';
Form13.StringGrid1.Cells [0,4]: = 'Вхідні двері';
Form13.StringGrid1.Cells [0,5]: = 'Балконна поворотна';
Form13.StringGrid1.Cells [0,6]: = 'Поворотно-відкидна';
Form13.StringGrid1.Cells [1,0]: = 'Висота (мм) х;
Form13.StringGrid1.Cells [2,0]: = 'Ширина (мм) х;
Form13.StringGrid1.Cells [3,0]: = 'Висота (мм) х;
Form13.StringGrid1.Cells [4,0]: = 'Ширина (мм)'; end;
procedure TForm13.SpeedButton1Click (Sender: TObject);
begin
Form13.StringGrid1.Cells [1,1]: = inttostr (470);
Form13.StringGrid1.Cells [1,2]: = inttostr (520);
Form13.StringGrid1.Cells [1,3]: = inttostr (520);
Form13.StringGrid1.Cells [1,4]: = inttostr (1000);
Form13.StringGrid1.Cells [1,5]: = inttostr (410);
Form13.StringGrid1.Cells [1,6]: = inttostr (410);
Form13.StringGrid1.Cells [2,1]: = inttostr (400);
Form13.StringGrid1.Cells [2,2]: = inttostr (410);
Form13.StringGrid1.Cells [2,3]: = inttostr (410);
Form13.StringGrid1.Cells [2,4]: = inttostr (530);
Form13.StringGrid1.Cells [2,5]: = inttostr (410);
Form13.StringGrid1.Cells [2,6]: = inttostr (410);
Form13.StringGrid1.Cells [3,1]: = inttostr (2135);
Form13.StringGrid1.Cells [3,2]: = inttostr (2250);
Form13.StringGrid1.Cells [3,3]: = inttostr (2250);
Form13.StringGrid1.Cells [3,4]: = inttostr (2250);
Form13.StringGrid1.Cells [3,5]: = inttostr (2250);
Form13.StringGrid1.Cells [3,6]: = inttostr (2250);
Form13.StringGrid1.Cells [4,1]: = inttostr (2135);
Form13.StringGrid1.Cells [4,2]: = inttostr (800);
Form13.StringGrid1.Cells [4,3]: = inttostr (800);
Form13.StringGrid1.Cells [4,4]: = inttostr (990);
Form13.StringGrid1.Cells [4,5]: = inttostr (800);
Form13.StringGrid1.Cells [4,6]: = inttostr (800); end;
procedure TForm13.SpeedButton2Click (Sender: TObject);
Var s: string; f: textfile;
begin
{$ I-}
AssignFile (f, dir + '\ Технічні допуски \');
{$ I +}
If IOResult = 0 then begin
s: = dir + '\ Технічні допуски \';
Rewrite (f, s + '\ Глухий модуль.dat');
Writeln (f, Form13.StringGrid1.Cells [1,1]);
Writeln (f, Form13.StringGrid1.Cells [2,1]);
Writeln (f, Form13.StringGrid1.Cells [3,1]);
Writeln (f, Form13.StringGrid1.Cells [4,1]);
CloseFile (f);
Rewrite (f, s + '\ Поворотний модуль.dat');
Writeln (f, Form13.StringGrid1.Cells [1,2]);
Writeln (f, Form13.StringGrid1.Cells [2,2]);
Writeln (f, Form13.StringGrid1.Cells [3,2]);
Writeln (f, Form13.StringGrid1.Cells [4,2]);
CloseFile (f);
Rewrite (f, s + '\ Поворотно-откідной.dat');
Writeln (f, Form13.StringGrid1.Cells [1,3]);
Writeln (f, Form13.StringGrid1.Cells [2,3]);
Writeln (f, Form13.StringGrid1.Cells [3,3]);
Writeln (f, Form13.StringGrid1.Cells [4,3]);
CloseFile (f);
Rewrite (f, s + '\ Вхідна дверь.dat');
Writeln (f, Form13.StringGrid1.Cells [1,4]);
Writeln (f, Form13.StringGrid1.Cells [2,4]);
Writeln (f, Form13.StringGrid1.Cells [3,4]);
Writeln (f, Form13.StringGrid1.Cells [4,4]);
CloseFile (f);
Rewrite (f, s + '\ Балконна поворотная.dat');
Writeln (f, Form13.StringGrid1.Cells [1,5]);
Writeln (f, Form13.StringGrid1.Cells [2,5]);
Writeln (f, Form13.StringGrid1.Cells [3,5]);
Writeln (f, Form13.StringGrid1.Cells [4,5]);
CloseFile (f);
Rewrite (f, s + '\ Поворотно-откідная.dat');
Writeln (f, Form13.StringGrid1.Cells [1,6]);
Writeln (f, Form13.StringGrid1.Cells [2,6]);
Writeln (f, Form13.StringGrid1.Cells [3,6]);
Writeln (f, Form13.StringGrid1.Cells [4,6]);
CloseFile (f); ShowMessage ('Дані збережені успішно!'); End
else Exit; end;
procedure TForm13.SpeedButton3Click (Sender: TObject);
begin close; end; end.
unit Unit14;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Buttons, StdCtrls, Spin, jpeg, ExtCtrls;
type
TForm14 = class (TForm)
Image1: TImage; Label20: TLabel; SpinEdit1: TSpinEdit; Label1: TLabel;
SpeedButton14: TSpeedButton;
private
{Private declarations}
public
{Public declarations}
end;
var Form14: TForm14;
implementation
{$ R *. dfm}
end.
unit Unit15;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Buttons, StdCtrls, jpeg, ExtCtrls;
type
TForm15 = class (TForm)
Image1: TImage; RadioButton1: TRadioButton; RadioButton2: TRadioButton;
SpeedButton8: TSpeedButton; procedure SpeedButton8Click (Sender: TObject);
private
{Private declarations}
public
{Public declarations}
end;
var Form15: TForm15;
implementation
uses Unit8;
{$ R *. dfm}
procedure TForm15.SpeedButton8Click (Sender: TObject);
Var sum, t: real;
begin
if Form8.StringGrid2.Cells [5,1] =''then begin
If RadioButton1.Checked = true then begin
t: = strtofloat (Form8.StringGrid2.Cells [6,1]);
sum: = t + ((t/100) * 30);
Form8.StringGrid2.Cells [6,1]: = floattostr (sum);
Form8.StringGrid2.Cells [5,1]: = 'Одна сторона';
Close; end;
If RadioButton2.Checked = true then begin
t: = strtofloat (Form8.StringGrid2.Cells [6,1]);
sum: = t + ((t/100) * 40);
Form8.StringGrid2.Cells [6,1]: = floattostr (sum);
Form8.StringGrid2.Cells [5,1]: = 'Дві сторони'; Close; end; end; end; end.
unit Unit16;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, unit1, Mask, ExtCtrls, jpeg, ComCtrls;
type
TForm16 = class (TForm)
Image1: TImage; Label1: TLabel; Edit1: TEdit; Edit2: TEdit; Label2: TLabel;
Label3: TLabel; Memo1: TMemo; Label6: TLabel; SpeedButton1: TSpeedButton;
SpeedButton2: TSpeedButton; DateTimePicker1: TDateTimePicker;
MaskEdit2: TMaskEdit; MaskEdit3: TMaskEdit; Label8: TLabel; Label7: TLabel;
Label10: TLabel; Memo4: TMemo; Label4: TLabel;
procedure SpeedButton2Click (Sender: TObject);
procedure SpeedButton1Click (Sender: TObject);
procedure Edit1KeyPress (Sender: TObject; var Key: Char);
procedure Edit2KeyPress (Sender: TObject; var Key: Char);
procedure FormCreate (Sender: TObject);
private
{Private declarations}
public
{Public declarations}
end;
var Form16: TForm16;
implementation
uses Unit10, Unit7;
{$ R *. dfm}
procedure TForm16.SpeedButton2Click (Sender: TObject);
Var f: Integer;
begin
if (Edit1.Text ='') or (Edit2.Text ='') or (Memo1.Text ='') then
Showmessage ('Спочатку введіть необхідну інформацію!') Else
if (MaskEdit3.Text ='') and (MaskEdit2.Text = '(8)') then
Showmessage ('Введіть хоча б один номер телефону!')
else begin
fiozam: = Edit1.Text;
fiozak: = Edit2.Text;
adres: = Memo1.Text;
got: = Memo4.Text;
data: = datetostr (DateTimePicker1.Date);
domtel: = MaskEdit3.Text;
sottel: = MaskEdit2.Text;
for f: = 0 to ComponentCount - 1 do begin
if (Components [f] is TEdit) then
(Components [f] as TEdit). Text :='';
if (Components [f] is TMemo) then
(Components [f] as TMemo). Text :='';
if (Components [f] is TMaskEdit) then
(Components [f] as TMaskEdit). Text :='';
form7.Show; Close; end; end; end;
procedure TForm16.SpeedButton1Click (Sender: TObject);
begin Close; end;
procedure TForm16.Edit1KeyPress (Sender: TObject; var Key: Char);
var vrLength, vrSelStart: byte;
begin
with Sender as TEdit do
begin
vrLength: = Length (Text);
vrSelStart: = SelStart; end;
case Key of 'А' .. 'Я': begin end;
'А' .. 'я': begin end;
# 8: begin end;
# 32: begin end;
# 46:
else Key: = # 0; end; end;
procedure TForm16.Edit2KeyPress (Sender: TObject; var Key: Char);
var vrLength, vrSelStart: byte;
begin
with Sender as TEdit do
begin
vrLength: = Length (Text);
vrSelStart: = SelStart; end;
case Key of 'А' .. 'Я': begin end;
'А' .. 'я': begin end;
# 8: begin end;
# 32: begin end;
# 46: else Key: = # 0; end; end;
procedure TForm16.FormCreate (Sender: TObject);
begin datetimepicker1.Date: = Date; end; end.
unit Unit17;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Buttons, StdCtrls, jpeg, unit1, ExtCtrls, unit8;
type
TForm17 = class (TForm)
Image1: TImage; SpeedButton8: TSpeedButton; SpeedButton1: TSpeedButton;
ComboBox1: TComboBox; ComboBox2: TComboBox; ComboBox3: TComboBox;
RadioButton1: TRadioButton; RadioButton2: TRadioButton;
RadioButton3: TRadioButton; procedure RadioButton1Click (Sender: TObject);
procedure RadioButton2Click (Sender: TObject);
procedure RadioButton3Click (Sender: TObject);
procedure SpeedButton8Click (Sender: TObject);
procedure ComboBox1Change (Sender: TObject);
procedure ComboBox2Change (Sender: TObject);
procedure ComboBox3Change (Sender: TObject);
procedure SpeedButton1Click (Sender: TObject);
private
{Private declarations}
public
{Public declarations}
end;
var plo, zen: real; Form17: TForm17; senton: string; t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12
, T13, h1, h2, h3, h4, h5, h6, h7, h8, r1, r2, r3, r4: string;
implementation
uses Unit22;
{$ R *. dfm}
procedure TForm17.RadioButton1Click (Sender: TObject);
Var f: textfile;
begin
if RadioButton1.Checked = True then begin
ComboBox1.Enabled: = True;
ComboBox2.Enabled: = False;
ComboBox3.Enabled: = False;
{$ I-}
AssignFile (f, dir + '\ Ціни \ Тонування \ Prof.dat');
{$ I +}
If IOResult = 0 then begin
Reset (f);
while not EoF (f) do begin
readln (f, t1); readln (f, t2);
readln (f, t3); readln (f, t4);
readln (f, t5); readln (f, t6);
readln (f, t7); readln (f, t8);
readln (f, t9); readln (f, t10);
readln (f, t11); readln (f, t12);
readln (f, t13); end end
else begin Exit; Showmessage ('Помилка читання файлу ціни');
CloseFile (f); end; end; end;
procedure TForm17.RadioButton2Click (Sender: TObject);
Var f: textfile;
begin
if RadioButton2.Checked = True then begin
ComboBox1.Enabled: = False;
ComboBox2.Enabled: = True;
ComboBox3.Enabled: = False;
{$ I-}
AssignFile (f, dir + '\ Ціни \ Тонування \ Dekor.dat');
{$ I +}
If IOResult = 0 then begin
Reset (f);
while not EoF (f) do begin
readln (f, r1); readln (f, r2);
readln (f, r3); readln (f, r4); end end
else begin Exit; Showmessage ('Помилка читання файлу ціни');
CloseFile (f); end; end; end;
procedure TForm17.RadioButton3Click (Sender: TObject);
Var f: textfile;
begin
if RadioButton3.Checked = True then begin
ComboBox1.Enabled: = False;
ComboBox2.Enabled: = False;
ComboBox3.Enabled: = True;
{$ I-}
AssignFile (f, dir + '\ Ціни \ Тонування \ Udar.dat');
{$ I +}
If IOResult = 0 then begin
Reset (f);
while not EoF (f) do begin
readln (f, h1); readln (f, h2);
readln (f, h3); readln (f, h4);
readln (f, h5); readln (f, h6);
readln (f, h7); readln (f, h8); end end
else begin Exit; Showmessage ('Помилка читання файлу ціни');
CloseFile (f); end; end; end;
procedure TForm17.SpeedButton8Click (Sender: TObject);
Var f: Integer;
begin
if Form8.StringGrid2.Cells [4,1] =''then begin
if (RadioButton1.Checked <> true) and (RadioButton2.Checked <> true) and
(RadioButton3.Checked <> true) then
Showmessage ('Спочатку що-небудь потрібно вибрати!')
else
if (Combobox1.Text ='') and (Combobox2.Text ='') and
(Combobox3.Text ='') then
Showmessage ('Виберіть конкретний тип тонування!')
else begin
plo: = StrtoFloat (Form8.StringGrid2.Cells [0,1]);
zen: = strtofloat (Form8.StringGrid2.Cells [6,1]) + (strtofloat (senton) * plo);
Form8.StringGrid2.Cells [6,1]: = floattostr (zen);
Form8.StringGrid2.Cells [4,1]: = ton;
for f: = 0 to ComponentCount - 1 do
if (Components [f] is TCombobox) then
(Components [f] as TCombobox). Items.Clear; Close; end;
end else begin
Showmessage ('Вікно можна тонувати тільки один раз!');
Close; end; end;
procedure TForm17.ComboBox1Change (Sender: TObject);
begin
if ComboBox1.Text = 'R Silver 20' then begin
ton: = ComboBox1.Text;
senton: = t1; end;
if ComboBox1.Text = 'R Silver 35' then begin
ton: = ComboBox1.Text;
senton: = t2; end;
if ComboBox1.Text = 'R Silver 50' then begin
ton: = ComboBox1.Text;
senton: = t3; end;
if ComboBox1.Text = 'R Grey 10' then begin
ton: = ComboBox1.Text;
senton: = t4; end;
if ComboBox1.Text = 'R Blue 15' then begin
ton: = ComboBox1.Text;
senton: = t5; end;
if ComboBox1.Text = 'R Gold 15' then begin
ton: = ComboBox1.Text;
senton: = t6; end;
if ComboBox1.Text = 'R Green 10' then begin
ton: = ComboBox1.Text;
senton: = t7; end;
if ComboBox1.Text = 'R Bronze 10' then begin
ton: = ComboBox1.Text;
senton: = t8; end;
if ComboBox1.Text = 'HP Natural 20' then begin
ton: = ComboBox1.Text;
senton: = t9; end;
if ComboBox1.Text = 'HP Natural 35' then begin
ton: = ComboBox1.Text;
senton: = t10; end;
if ComboBox1.Text = 'HP Bronze 35' then begin
ton: = ComboBox1.Text;
senton: = t11; end;
if ComboBox1.Text = 'HP Blue 35' then begin
ton: = ComboBox1.Text;
senton: = t12; end;
if ComboBox1.Text = 'HP Green 30' then begin
ton: = ComboBox1.Text;
senton: = t13; end; end;
procedure TForm17.ComboBox2Change (Sender: TObject);
begin
if ComboBox2.Text = 'Matt White' then begin
ton: = ComboBox2.Text;
senton: = r1; end;
if ComboBox2.Text = 'Matt Bronze' then begin
ton: = ComboBox2.Text;
senton: = r2; end;
if ComboBox2.Text = 'Matt Silver' then begin
ton: = ComboBox2.Text;
senton: = r3; end;
if ComboBox2.Text = 'Black Out' then begin
ton: = ComboBox2.Text;
senton: = r4; end; end;
procedure TForm17.ComboBox3Change (Sender: TObject);
begin
if ComboBox3.Text = '100 MIC Silver 20 'then begin
ton: = ComboBox3.Text;
senton: = h1; end;
if ComboBox3.Text = 'Safety 2 MIL' then begin
ton: = ComboBox3.Text;
senton: = h2; end;
if ComboBox3.Text = 'Safety 4 MIL' then begin
ton: = ComboBox3.Text;
senton: = h3; end;
if ComboBox3.Text = 'Safety 7 MIL' then begin
ton: = ComboBox3.Text;
senton: = h4; end;
if ComboBox3.Text = 'Клас захисту А1' then begin
ton: = ComboBox3.Text;
senton: = h5; end;
if ComboBox3.Text = 'Клас захисту А2' then begin
ton: = ComboBox3.Text;
senton: = h6; end;
if ComboBox3.Text = 'Клас захисту А3' then begin
ton: = ComboBox3.Text;
senton: = h7; end;
if ComboBox3.Text = 'Скло 4мм' then begin
ton: = ComboBox3.Text;
senton: = h8; end; end;
procedure TForm17.SpeedButton1Click (Sender: TObject);
begin form22.Show; end; end.
unit Unit18;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Buttons, StdCtrls, Spin, jpeg, ExtCtrls, unit1, unit8;
type
TForm18 = class (TForm)
Image1: TImage; Label1: TLabel; Label2: TLabel; SpeedButton8: TSpeedButton;
RadioButton1: TRadioButton; RadioButton2: TRadioButton; ComboBox1: TComboBox;
SpinEdit1: TSpinEdit; CheckBox1: TCheckBox;
procedure SpeedButton8Click (Sender: TObject);
private
{Private declarations}
public
{Public declarations}
end;
var Form18: TForm18;
h100, h150, h200, h250, h300, h350, h400, h450, h500, h600, h700, h800: string;
implementation
{$ R *. dfm}
procedure TForm18.SpeedButton8Click (Sender: TObject);
Var f: textfile; k: integer; l, z: real;
begin l: = 0; z: = 0;
if Form8.StringGrid2.Cells [2,1] = "так" then begin
Showmessage ('На вікно можна ставити тільки один підвіконня!');
Close; end else
if (RadioButton1.Checked <> true) and (RadioButton2.Checked <> true)
then Showmessage ('Спочатку що-небудь потрібно вибрати!')
else
if (Combobox1.Text ='') or (SpinEdit1.Value <= 0) then
Showmessage ('Введіть всі необхідні дані!')
else begin
if RadioButton2.Checked = True then begin
markP: = 'Ulьtra';
{$ I-}
AssignFile (f, dir + '\ Ціни \ Підвіконня \ Ultra.dat');
{$ I +}
If IOResult = 0 then begin Reset (f);
while not EoF (f) do begin
readln (f, h100); readln (f, h150);
readln (f, h200); readln (f, h250);
readln (f, h300); readln (f, h350);
readln (f, h400); readln (f, h450);
readln (f, h500); readln (f, h600);
readln (f, h700); readln (f, h800); end;
if Combobox1.Text = '100 'then begin
l: = (SpinEdit1.Value * 0.001) * strtofloat (h100);
podsen: = floattostr (l);
razpod: = '100 '+' x '+ inttostr (SpinEdit1.Value);
if CheckBox1.Checked = true then l: = l +2.1;
z: = strtofloat (Form8.StringGrid2.Cells [6,1]) + l;
Form8.StringGrid2.Cells [6,1]: = floattostr (z);
Form8.StringGrid2.Cells [2,1]: = "так"; end;
if Combobox1.Text = '150 'then begin
l: = (SpinEdit1.Value * 0.001) * strtofloat (h150);
podsen: = floattostr (l);
razpod: = '150 '+' x '+ inttostr (SpinEdit1.Value);
if CheckBox1.Checked = true then l: = l +2.1;
z: = strtofloat (Form8.StringGrid2.Cells [6,1]) + l;
Form8.StringGrid2.Cells [6,1]: = floattostr (z);
Form8.StringGrid2.Cells [2,1]: = "так"; end;
if Combobox1.Text = '200 'then begin
l: = (SpinEdit1.Value * 0.001) * strtofloat (h200);
podsen: = floattostr (l);
razpod: = '200 '+' x '+ inttostr (SpinEdit1.Value);
if CheckBox1.Checked = true then l: = l +2.1;
z: = strtofloat (Form8.StringGrid2.Cells [6,1]) + l;
Form8.StringGrid2.Cells [6,1]: = floattostr (z);
Form8.StringGrid2.Cells [2,1]: = "так"; end;
if Combobox1.Text = '250 'then begin
l: = (SpinEdit1.Value * 0.001) * strtofloat (h250);
podsen: = floattostr (l);
razpod: = '250 '+' x '+ inttostr (SpinEdit1.Value);
if CheckBox1.Checked = true then l: = l +2.1;
z: = strtofloat (Form8.StringGrid2.Cells [6,1]) + l;
Form8.StringGrid2.Cells [6,1]: = floattostr (z);
Form8.StringGrid2.Cells [2,1]: = "так"; end;
if Combobox1.Text = '300 'then begin
l: = (SpinEdit1.Value * 0.001) * strtofloat (h300);
podsen: = floattostr (l);
razpod: = '300 '+' x '+ inttostr (SpinEdit1.Value);
if CheckBox1.Checked = true then l: = l +2.1;
z: = strtofloat (Form8.StringGrid2.Cells [6,1]) + l;
Form8.StringGrid2.Cells [6,1]: = floattostr (z);
Form8.StringGrid2.Cells [2,1]: = "так"; end;
if Combobox1.Text = '350 'then begin
l: = (SpinEdit1.Value * 0.001) * strtofloat (h350);
podsen: = floattostr (l);
razpod: = '350 '+' x '+ inttostr (SpinEdit1.Value);
if CheckBox1.Checked = true then l: = l +2.1;
z: = strtofloat (Form8.StringGrid2.Cells [6,1]) + l;
Form8.StringGrid2.Cells [6,1]: = floattostr (z);
Form8.StringGrid2.Cells [2,1]: = "так"; end;
if Combobox1.Text = '400 'then begin
l: = (SpinEdit1.Value * 0.001) * strtofloat (h400);
podsen: = floattostr (l);
razpod: = '400 '+' x '+ inttostr (SpinEdit1.Value);
if CheckBox1.Checked = true then l: = l +2.1;
z: = strtofloat (Form8.StringGrid2.Cells [6,1]) + l;
Form8.StringGrid2.Cells [6,1]: = floattostr (z);
Form8.StringGrid2.Cells [2,1]: = "так"; end;
if Combobox1.Text = '450 'then begin
l: = (SpinEdit1.Value * 0.001) * strtofloat (h450);
podsen: = floattostr (l);
razpod: = '450 '+' x '+ inttostr (SpinEdit1.Value);
if CheckBox1.Checked = true then l: = l +2.1;
z: = strtofloat (Form8.StringGrid2.Cells [6,1]) + l;
Form8.StringGrid2.Cells [6,1]: = floattostr (z);
Form8.StringGrid2.Cells [2,1]: = "так"; end;
if Combobox1.Text = '500 'then begin
l: = (SpinEdit1.Value * 0.001) * strtofloat (h500);
podsen: = floattostr (l);
razpod: = '500 '+' x '+ inttostr (SpinEdit1.Value);
if CheckBox1.Checked = true then l: = l +2.1;
z: = strtofloat (Form8.StringGrid2.Cells [6,1]) + l;
Form8.StringGrid2.Cells [6,1]: = floattostr (z);
Form8.StringGrid2.Cells [2,1]: = "так"; end;
if Combobox1.Text = '600 'then begin
l: = (SpinEdit1.Value * 0.001) * strtofloat (h600);
podsen: = floattostr (l);
razpod: = '600 '+' x '+ inttostr (SpinEdit1.Value);
if CheckBox1.Checked = true then l: = l +2.1;
z: = strtofloat (Form8.StringGrid2.Cells [6,1]) + l;
Form8.StringGrid2.Cells [6,1]: = floattostr (z);
Form8.StringGrid2.Cells [2,1]: = "так"; end;
if Combobox1.Text = '700 'then begin
l: = (SpinEdit1.Value * 0.001) * strtofloat (h700);
podsen: = floattostr (l);
razpod: = '700 '+' x '+ inttostr (SpinEdit1.Value);
if CheckBox1.Checked = true then l: = l +2.1;
z: = strtofloat (Form8.StringGrid2.Cells [6,1]) + l;
Form8.StringGrid2.Cells [6,1]: = floattostr (z);
Form8.StringGrid2.Cells [2,1]: = "так"; end;
if Combobox1.Text = '800 'then begin
l: = (SpinEdit1.Value * 0.001) * strtofloat (h800);
podsen: = floattostr (l);
razpod: = '800 '+' x '+ inttostr (SpinEdit1.Value);
if CheckBox1.Checked = true then l: = l +2.1;
z: = strtofloat (Form8.StringGrid2.Cells [6,1]) + l;
Form8.StringGrid2.Cells [6,1]: = floattostr (z);
Form8.StringGrid2.Cells [2,1]: = "так"; end;
end else begin Exit;
Showmessage ('Помилка читання файлу ціни'); end; CloseFile (f); Close; end;
if RadioButton1.Checked = True then begin
markP: = 'Moller';
{$ I-}
AssignFile (f, dir + '\ Ціни \ Підвіконня \ Moller.dat');
{$ I +}
If IOResult = 0 then begin
Reset (f);
while not EoF (f) do begin
readln (f, h150); readln (f, h200);
readln (f, h250); readln (f, h300);
readln (f, h350); readln (f, h400);
readln (f, h450); readln (f, h500);
readln (f, h600); end;
if (Combobox1.Text = '100 ') or (Combobox1.Text = '700') or (Combobox1.Text = '800 ') then
Showmessage ('Такого розміру немає, виберіть інший!')
else begin
if Combobox1.Text = '150 'then begin
l: = (SpinEdit1.Value * 0.001) * strtofloat (h150);
podsen: = floattostr (l);
razpod: = '150 '+' x '+ inttostr (SpinEdit1.Value);
if CheckBox1.Checked = true then l: = l +2.1;
z: = strtofloat (Form8.StringGrid2.Cells [6,1]) + l;
Form8.StringGrid2.Cells [6,1]: = floattostr (z);
Form8.StringGrid2.Cells [2,1]: = "так"; end;
if Combobox1.Text = '200 'then begin
l: = (SpinEdit1.Value * 0.001) * strtofloat (h200);
podsen: = floattostr (l);
razpod: = '200 '+' x '+ inttostr (SpinEdit1.Value);
if CheckBox1.Checked = true then l: = l +2.1;
z: = strtofloat (Form8.StringGrid2.Cells [6,1]) + l;
Form8.StringGrid2.Cells [6,1]: = floattostr (z);
Form8.StringGrid2.Cells [2,1]: = "так"; end;
if Combobox1.Text = '250 'then begin
l: = (SpinEdit1.Value * 0.001) * strtofloat (h250);
podsen: = floattostr (l);
razpod: = '250 '+' x '+ inttostr (SpinEdit1.Value);
if CheckBox1.Checked = true then l: = l +2.1;
z: = strtofloat (Form8.StringGrid2.Cells [6,1]) + l;
Form8.StringGrid2.Cells [0,6]: = floattostr (z);
Form8.StringGrid2.Cells [2,1]: = "так"; end;
if Combobox1.Text = '300 'then begin
l: = (SpinEdit1.Value * 0.001) * strtofloat (h300);
podsen: = floattostr (l);
razpod: = '300 '+' x '+ inttostr (SpinEdit1.Value);
if CheckBox1.Checked = true then l: = l +2.1;
z: = strtofloat (Form8.StringGrid2.Cells [6,1]) + l;
Form8.StringGrid2.Cells [6,1]: = floattostr (z);
Form8.StringGrid2.Cells [2,1]: = "так"; end;
if Combobox1.Text = '350 'then begin
l: = (SpinEdit1.Value * 0.001) * strtofloat (h350);
podsen: = floattostr (l);
razpod: = '350 '+' x '+ inttostr (SpinEdit1.Value);
if CheckBox1.Checked = true then l: = l +2.1;
z: = strtofloat (Form8.StringGrid2.Cells [6,1]) + l;
Form8.StringGrid2.Cells [6,1]: = floattostr (z);
Form8.StringGrid2.Cells [2,1]: = "так"; end;
if Combobox1.Text = '400 'then begin
l: = (SpinEdit1.Value * 0.001) * strtofloat (h400);
podsen: = floattostr (l);
razpod: = '400 '+' x '+ inttostr (SpinEdit1.Value);
if CheckBox1.Checked = true then l: = l +2.1;
z: = strtofloat (Form8.StringGrid2.Cells [6,1]) + l;
Form8.StringGrid2.Cells [6,1]: = floattostr (z);
Form8.StringGrid2.Cells [2,1]: = "так"; end;
if Combobox1.Text = '450 'then begin
l: = (SpinEdit1.Value * 0.001) * strtofloat (h450);
podsen: = floattostr (l);
razpod: = '450 '+' x '+ inttostr (SpinEdit1.Value);
if CheckBox1.Checked = true then l: = l +2.1;
z: = strtofloat (Form8.StringGrid2.Cells [6,1]) + l;
Form8.StringGrid2.Cells [6,1]: = floattostr (z);
Form8.StringGrid2.Cells [2,1]: = "так"; end;
if Combobox1.Text = '500 'then begin
l: = (SpinEdit1.Value * 0.001) * strtofloat (h500);
podsen: = floattostr (l);
razpod: = '500 '+' x '+ inttostr (SpinEdit1.Value);
if CheckBox1.Checked = true then l: = l +2.1;
z: = strtofloat (Form8.StringGrid2.Cells [6,1]) + l;
Form8.StringGrid2.Cells [6,1]: = floattostr (z);
Form8.StringGrid2.Cells [2,1]: = "так"; end;
if Combobox1.Text = '600 'then begin
l: = (SpinEdit1.Value * 0.001) * strtofloat (h600);
podsen: = floattostr (l);
razpod: = '600 '+' x '+ inttostr (SpinEdit1.Value);
if CheckBox1.Checked = true then l: = l +2.1;
z: = strtofloat (Form8.StringGrid2.Cells [6,1]) + l;
Form8.StringGrid2.Cells [6,1]: = floattostr (z);
Form8.StringGrid2.Cells [2,1]: = "так"; end; Close
end; end else begin Exit; Showmessage ('Помилка читання файлу ціни'); end;
CloseFile (f); end; end; end; end.
unit Unit19;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Buttons, StdCtrls, unit8, Spin, jpeg, ExtCtrls;
type
TForm19 = class (TForm)
Image1: TImage; Label13: TLabel; SpinEdit1: TSpinEdit; SpeedButton8: TSpeedButton;
Label1: TLabel; procedure SpeedButton8Click (Sender: TObject);
private
{Private declarations}
public
{Public declarations} end;
var Form19: TForm19;
implementation
{$ R *. dfm}
procedure TForm19.SpeedButton8Click (Sender: TObject);
Var pl, sum: real; k: integer;
begin
if Form8.StringGrid2.Cells [3,1] <> "так" then
begin
pl: = strtofloat (Form8.StringGrid2.Cells [6,1]);
sum: = SpinEdit1.Value * 0.003;
sum: = pl + sum;
Form8.StringGrid2.Cells [6,1]: = floattostr (sum);
Form8.StringGrid2.Cells [3,1]: = "так";
Close; endelse Showmessage ('На цьому вікні профіль вже врахований!') End; end.
unit Unit20;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Buttons, StdCtrls, Spin, jpeg, ExtCtrls;
type
TForm20 = class (TForm)
Image1: TImage; Label13: TLabel; SpinEdit1: TSpinEdit; Label1: TLabel;
SpeedButton8: TSpeedButton; procedure SpeedButton8Click (Sender: TObject);
private
{Private declarations}
public
{Public declarations} end;
var Form20: TForm20;
implementation
uses Unit8;
{$ R *. dfm}
procedure TForm20.SpeedButton8Click (Sender: TObject);
Var pl, sum: real; k: integer;
begin
pl: = strtofloat (Form8.StringGrid2.Cells [6,1]);
sum: = SpinEdit1.Value * 0.025;
sum: = pl + sum;
Form8.StringGrid2.Cells [6,1]: = floattostr (sum);
if (Components [k] is TSpinEdit) then
(Components [k] as TSpinEdit). Value: = 0; Close end; end.
unit Unit21;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Grids, Buttons, jpeg, unit1, ExtCtrls;
type
TForm21 = class (TForm)
StringGrid3: TStringGrid; Image1: TImage; SpeedButton1: TSpeedButton;
SpeedButton2: TSpeedButton; procedure FormCreate (Sender: TObject);
procedure SpeedButton2Click (Sender: TObject);
procedure SpeedButton1Click (Sender: TObject);
private
{Private declarations}
public
{Public declarations} end;
var Form21: TForm21;
implementation
{$ R *. dfm}
procedure TForm21.FormCreate (Sender: TObject);
begin
StringGrid3.Cells [0,0]: = 'Ширина';
StringGrid3.Cells [1,0]: = 'Moller (Німеччина)';
StringGrid3.Cells [2,0]: = 'Ulьtra (Ростов)';
StringGrid3.Cells [0,1]: = '100 '; StringGrid3.Cells [0,2]: = '150';
StringGrid3.Cells [0,3]: = '200 '; StringGrid3.Cells [0,4]: = '250';
StringGrid3.Cells [0,5]: = '300 '; StringGrid3.Cells [0,6]: = '350';
StringGrid3.Cells [0,7]: = '400 '; StringGrid3.Cells [0,8]: = '450';
StringGrid3.Cells [0,9]: = '500 '; StringGrid3.Cells [0,10]: = '600';
StringGrid3.Cells [0,11]: = '700 '; StringGrid3.Cells [0,12]: = '800';
StringGrid3.Cells [1,2]: = '10, 6 '; StringGrid3.Cells [1,3]: = '12, 1';
StringGrid3.Cells [1,4]: = Пул 14, 5 '; StringGrid3.Cells [1,5]: = '16, 8';
StringGrid3.Cells [1,6]: = '19, 7 '; StringGrid3.Cells [1,7]: = '22, 4';
StringGrid3.Cells [1,8]: = '25, 4 '; StringGrid3.Cells [1,9]: = '31, 9';
StringGrid3.Cells [1,10]: = '35, 9 '; StringGrid3.Cells [2,1]: = '3, 8';
StringGrid3.Cells [2,2]: = '5, 7 '; StringGrid3.Cells [2,3]: = '7, 6';
StringGrid3.Cells [2,4]: = '9, 5 '; StringGrid3.Cells [2,5]: = '11, 5';
StringGrid3.Cells [2,6]: = '13, 4 '; StringGrid3.Cells [2,7]: = '15, 3';
StringGrid3.Cells [2,8]: = '17, 2 '; StringGrid3.Cells [2,9]: = '19, 1';
StringGrid3.Cells [2,10]: = '21 '; StringGrid3.Cells [2,11]: = '22, 9';
StringGrid3.Cells [2,12]: = '30, 5 '; end;
procedure TForm21.SpeedButton2Click (Sender: TObject);
Var s: string; f: textfile;
begin
{$ I-}
AssignFile (f, dir + '\ Ціни \ Підвіконня \');
{$ I +}
If IOResult = 0 then
s: = dir + '\ Ціни \ Підвіконня \';
{$ I-}
Rewrite (f, s + 'Moller.dat');
{$ I +}
If IOResult = 0 then begin
Writeln (f, StringGrid3.Cells [1,2]); Writeln (f, StringGrid3.Cells [1,3]);
Writeln (f, StringGrid3.Cells [1,4]); Writeln (f, StringGrid3.Cells [1,5]);
Writeln (f, StringGrid3.Cells [1,6]); Writeln (f, StringGrid3.Cells [1,7]);
Writeln (f, StringGrid3.Cells [1,8]); Writeln (f, StringGrid3.Cells [1,9]);
Writeln (f, StringGrid3.Cells [1,10]); CloseFile (f);
Rewrite (f, s + 'Ultra.dat'); Writeln (f, StringGrid3.Cells [2,1]);
Writeln (f, StringGrid3.Cells [2,2]); Writeln (f, StringGrid3.Cells [2,3]);
Writeln (f, StringGrid3.Cells [2,4]); Writeln (f, StringGrid3.Cells [2,5]);
Writeln (f, StringGrid3.Cells [2,6]); Writeln (f, StringGrid3.Cells [2,7]);
Writeln (f, StringGrid3.Cells [2,8]); Writeln (f, StringGrid3.Cells [2,9]);
Writeln (f, StringGrid3.Cells [2,10]); Writeln (f, StringGrid3.Cells [2,11]);
Writeln (f, StringGrid3.Cells [2,12]); CloseFile (f);
ShowMessage ('Дані збережені успішно!'); End else begin
Exit; ShowMessage ('Помилка при зіпісі в файл!'); End; end;
procedure TForm21.SpeedButton1Click (Sender: TObject);
begin Close; end; end.
unit Unit22;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Grids, Buttons, jpeg, Unit1, ExtCtrls;
type
TForm22 = class (TForm)
Image1: TImage; StringGrid1: TStringGrid; Label1: TLabel; Label2: TLabel;
StringGrid2: TStringGrid; StringGrid3: TStringGrid; Label3: TLabel;
SpeedButton2: TSpeedButton; SpeedButton1: TSpeedButton;
procedure FormCreate (Sender: TObject);
procedure SpeedButton2Click (Sender: TObject);
procedure SpeedButton1Click (Sender: TObject);
private
{Private declarations}
public
{Public declarations} end;
var Form22: TForm22;
implementation
uses Unit13;
{$ R *. dfm}
procedure TForm22.FormCreate (Sender: TObject);
begin
StringGrid1.Cells [0,0]: = 'Назва'; StringGrid1.Cells [1,0]: = 'Колір';
StringGrid1.Cells [2,0]: = 'Светопропуск'; StringGrid1.Cells [3,0]: = 'Ціна (1м.кв)';
StringGrid1.Cells [0,1]: = 'R Silver 20'; StringGrid1.Cells [0,2]: = 'R Silver 35';
StringGrid1.Cells [0,3]: = 'R Silver 50'; StringGrid1.Cells [0,4]: = 'R Grey 10';
StringGrid1.Cells [0,5]: = 'R Blue 15'; StringGrid1.Cells [0,6]: = 'R Gold 15';
StringGrid1.Cells [0,7]: = 'R Green 10'; StringGrid1.Cells [0,8]: = 'R Bronze 10';
StringGrid1.Cells [0,9]: = 'HP Natural 20'; StringGrid1.Cells [0,10]: = 'HP Natural 35';
StringGrid1.Cells [0,11]: = 'HP Bronze 35'; StringGrid1.Cells [0,12]: = 'HP Blue 35';
StringGrid1.Cells [0,13]: = 'HP Green 30'; StringGrid1.Cells [1,1]: = 'Срібло';
StringGrid1.Cells [1,2]: = 'Срібло'; StringGrid1.Cells [1,3]: = 'Срібло';
StringGrid1.Cells [1,4]: = 'Сірий'; StringGrid1.Cells [1,5]: = 'Блакитний';
StringGrid1.Cells [1,6]: = 'Золото'; StringGrid1.Cells [1,7]: = 'Зелений';
StringGrid1.Cells [1,8]: = 'Бронза'; StringGrid1.Cells [1,9]: = 'Нейтральний';
StringGrid1.Cells [1,10]: = 'Нейтральний'; StringGrid1.Cells [1,11]: = 'Бронза';
StringGrid1.Cells [1,12]: = 'Блакитний'; StringGrid1.Cells [1,13]: = 'Зелений';
StringGrid1.Cells [2,1]: = '18 '; StringGrid1.Cells [2,2]: = '28'; StringGrid1.Cells [2,3]: = '47 ';
StringGrid1.Cells [2,4]: = '7 '; StringGrid1.Cells [2,5]: = '15'; StringGrid1.Cells [2,6]: = '15 ';
StringGrid1.Cells [2,7]: = '10 '; StringGrid1.Cells [2,8]: = '8'; StringGrid1.Cells [2,9]: = '24 ';
StringGrid1.Cells [2,10]: = '35 '; StringGrid1.Cells [2,11]: = '37'; StringGrid1.Cells [2,12]: = '35 ';
StringGrid1.Cells [2,13]: = '30 '; StringGrid1.Cells [3,1]: = Пул 14, 3'; StringGrid1.Cells [3,2]: = '15, 3 ';
StringGrid1.Cells [3,3]: = '15, 3 '; StringGrid1.Cells [3,4]: = '15, 3'; StringGrid1.Cells [3,5]: = '15, 3 ';
StringGrid1.Cells [3,6]: = '15, 3 '; StringGrid1.Cells [3,7]: = '15, 3';
StringGrid1.Cells [3,8]: = '15, 3 '; StringGrid1.Cells [3,9]: = '19, 1';
StringGrid1.Cells [3,10]: = '19, 1 '; StringGrid1.Cells [3,11]: = '19, 1';
StringGrid1.Cells [3,12]: = '19, 1 '; StringGrid1.Cells [3,13]: = '19, 1';
StringGrid2.Cells [0,0]: = 'Назва'; StringGrid2.Cells [1,0]: = 'Колір';
StringGrid2.Cells [2,0]: = 'Светопропуск'; StringGrid2.Cells [3,0]: = 'Ціна (1м.кв)';
StringGrid2.Cells [0,1]: = 'Matt White'; StringGrid2.Cells [0,2]: = 'Matt Bronze';
StringGrid2.Cells [0,3]: = 'Matt Silver'; StringGrid2.Cells [0,4]: = 'Black Out';
StringGrid2.Cells [1,1]: = 'Білий'; StringGrid2.Cells [1,2]: = 'Бронза';
StringGrid2.Cells [1,3]: = 'Срібло'; StringGrid2.Cells [1,4]: = 'Чорний';
StringGrid2.Cells [2,1]: = '69 '; StringGrid2.Cells [2,2]: = '36';
StringGrid2.Cells [2,3]: = '16 '; StringGrid2.Cells [2,4]: = '0';
StringGrid2.Cells [3,1]: = '15, 3 '; StringGrid2.Cells [3,2]: = '15, 3';
StringGrid2.Cells [3,3]: = '15, 3 '; StringGrid2.Cells [3,4]: = '17, 5';
StringGrid3.Cells [0,0]: = 'Назва'; StringGrid3.Cells [1,0]: = 'Колір';
StringGrid3.Cells [2,0]: = 'Светопропуск "; StringGrid3.Cells [3,0]: =' Ціна (1м.кв) ';
StringGrid3.Cells [0,1]: = '100MIC Silver 20 '; StringGrid3.Cells [0,2]: =' Safety 2 MIL ';
StringGrid3.Cells [0,3]: = 'Safety 4 MIL'; StringGrid3.Cells [0,4]: = 'Safety 7 MIL';
StringGrid3.Cells [0,5]: = 'Клас захисту А1'; StringGrid3.Cells [0,6]: = 'Клас захисту А2';
StringGrid3.Cells [0,7]: = 'Клас захисту А3'; StringGrid3.Cells [0,8]: = 'Скло 4мм';
StringGrid3.Cells [1,1]: = 'Срібло'; StringGrid3.Cells [1,2]: = 'Прозора';
StringGrid3.Cells [1,3]: = 'Прозора'; StringGrid3.Cells [1,4]: = 'Прозора';
StringGrid3.Cells [1,8]: = 'Бронза в масі'; StringGrid3.Cells [2,1]: = '20 ';
StringGrid3.Cells [2,2]: = '98 '; StringGrid3.Cells [2,3]: = '89';
StringGrid3.Cells [2,4]: = '89 '; StringGrid3.Cells [3,1]: = '32, 3';
StringGrid3.Cells [3,2]: = '24, 9 '; StringGrid3.Cells [3,3]: = '27';
StringGrid3.Cells [3,4]: = '32, 3 '; StringGrid3.Cells [3,5]: = '39, 7';
StringGrid3.Cells [3,6]: = '52, 9 '; StringGrid3.Cells [3,7]: = '79, 4';
StringGrid3.Cells [3,8]: = '24, 4 '; end;
procedure TForm22.SpeedButton2Click (Sender: TObject);
Var s: string; f: textfile; begin {$ I-}
AssignFile (f, dir + '\ Ціни \ Тонування \');{$ I +}
If IOResult = 0 then s: = dir + '\ Ціни \ Тонування \'; {$ I-}
Rewrite (f, s + 'Prof.dat'); {$ I +} If IOResult = 0 then begin
Writeln (f, StringGrid1.Cells [3,1]); Writeln (f, StringGrid1.Cells [3,2]);
Writeln (f, StringGrid1.Cells [3,3]); Writeln (f, StringGrid1.Cells [3,4]);
Writeln (f, StringGrid1.Cells [3,5]); Writeln (f, StringGrid1.Cells [3,6]);
Writeln (f, StringGrid1.Cells [3,7]); Writeln (f, StringGrid1.Cells [3,8]);
Writeln (f, StringGrid1.Cells [3,9]); Writeln (f, StringGrid1.Cells [3,10]);
Writeln (f, StringGrid1.Cells [3,11]); Writeln (f, StringGrid1.Cells [3,12]);
Writeln (f, StringGrid1.Cells [3,13]); CloseFile (f); Rewrite (f, s + 'Dekor.dat');
Writeln (f, StringGrid2.Cells [3,1]); Writeln (f, StringGrid2.Cells [3,2]);
Writeln (f, StringGrid2.Cells [3,3]); Writeln (f, StringGrid2.Cells [3,4]);
CloseFile (f); Rewrite (f, s + 'Udar.dat'); Writeln (f, StringGrid3.Cells [3,1]);
Writeln (f, StringGrid3.Cells [3,2]); Writeln (f, StringGrid3.Cells [3,3]);
Writeln (f, StringGrid3.Cells [3,4]); Writeln (f, StringGrid3.Cells [3,5]);
Writeln (f, StringGrid3.Cells [3,6]); Writeln (f, StringGrid3.Cells [3,7]);
Writeln (f, StringGrid3.Cells [3,8]); CloseFile (f);
ShowMessage ('Дані збережені успішно!'); End else beginExit;
ShowMessage ('Помилка при зіпісі в файл!'); End; end;
procedure TForm22.SpeedButton1Click (Sender: TObject);
begin Close; end; end.
Додати в блог або на сайт

Цей текст може містити помилки.

Програмування, комп'ютери, інформатика і кібернетика | Курсова
190.5кб. | скачати


Схожі роботи:
Випробування віконних балок балконних дверей плитки
Проектування і розрахунок конструкцій з дерева
Теплотехнічний розрахунок огороджувальних конструкцій
Розрахунок елементів залізобетонних конструкцій
Розрахунок дерев`яних конструкцій
Конструювання і розрахунок основних несучих конструкцій
Розрахунок дерев`яних конструкцій будівлі
Розрахунок вогнестійкості будівельних і залізобетонних конструкцій
Розрахунок і конструювання несучих конструкцій одноповерхової промислової будівлі
© Усі права захищені
написати до нас