Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Kp_Oop_2012.doc
Скачиваний:
2
Добавлен:
01.05.2025
Размер:
3.46 Mб
Скачать

2 Програмна документація

    1. Порадник системного програміста

      1. Архітектура програми

Була створена база даних у СКБД MS SQL Server 2005, яка складається із чотирьох таблиць. Таблиці наведені на рисунках 1-4.

Рисунок 1 – Таблиця «Альбом»

Рисунок 2 – Таблиця «Період»

Рисунок 3 – Таблиця «Тема»

Рисунок 4 – Таблиця «Фотографії»

Дві таблиці можуть бути пов'язані один з одним по ключу. Одна з цих зв'язаних таблиць є головною (master), а інша - допоміжної, деталізує (detail).

Схема взаємозв'язків між представленнями в MS Visual С++ 2005 у вигляді діаграми даних, представлена ​​на рисунку 5.

Рисунок 5 – Діаграма даних

Для представлень були використані наступні запити:

  • для представлення albom: SELECT albom.uk_al, albom.uk_p, albom.uk_t, albom.uk_f, foto.mesto, foto.kto, foto.data, period.nach, period.kon, Tema.Tema FROM albom INNER JOIN period ON albom.uk_p = period.uk_per INNER JOIN Tema ON albom.uk_t = Tema.uk_tema INNER JOIN foto ON albom.uk_f = foto.uk_foto;

  • для представлення foto: SELECT uk_foto, mesto, kto, data FROM dbo.foto;

  • для представлення period: SELECT uk_per, nach, kon FROM dbo.period;

  • для представлення Tema: SELECT uk_tema, Tema FROM dbo.Tema;

  • для представлення albom1: SELECT albom.* FROM albom.

При розробці застосування «Альбом» була використана мова моделювання Unified Modeling Language (UML), заснована на технології об'єктного моделювання (CASE-технології проектування програмних комплексів в галузі розробки програмного забезпечення). Мова UML дозволяє відобразити всі взаємозв'язки модельованого об'єкта, його інтерфейси, а так само особливості реалізації, які визначають внутрішню структуру і функції.

Діаграма класів (class diagram) використовується для моделювання статичної структури класів системи. Діаграма реалізована в ПП Sparx Systems Enterprise Architect 7.5. На діаграмі відображаються статичні аспекти структурної побудови системи (рисунок 6).

Програма складається з п'яти класів, які є похідними від классу System::Windows::Forms::Form, тобто мають графічний інтерфейс. Далі приведений детальний опис кожного з класів.

Клас «Form1» становить головне вікно програми. Він має наступні методи:

  • private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) - призначений для відображення даних з представлення albom у сітці даних та виклику методу Zagr1;

  • void Zagr1(int i)- призначений для завантаження фотографії, яка належить до активного запису у компонент для відображення картинок;

  • private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) -призначений для пересування на наступний запис у прудставленні та виклику методу Zagr1;

  • private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) - призначений для пересування на попередній запис у прудставленні та виклику методу Zagr1;

  • private: System::Void button3_Click(System::Object^ sender, System::EventArgs^ e) -призначений для додавання нового запису у представлення albom та збереження скоригованої інформації у базі даних;

  • private: System::Void button4_Click(System::Object^ sender, System::EventArgs^ e) - призначений для відкриття Form_tem1;

  • private: System::Void button5_Click(System::Object^ sender, System::EventArgs^ e) - призначений для фільтрування та відміни фільтрування у представленні albom;

  • private: System::Void radioButton1_Click(System::Object^ sender, System::EventArgs^ e) - призначенний для виклику Form_per;

  • private: System::Void radioButton2_Click(System::Object^ sender, System::EventArgs^ e) - призначений для виклику Form_tem;

  • private: System::Void фотографииToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) - призначений для виклику Form_foto;

  • private:System::Void темыСъемокToolStripMenuItem_Click (System::Object^sender, System::EventArgs^ e) - призначений для виклику Form_tem;

  • private:System::Void периодыСъемокToolStripMenuItem_Click (System::Object^sender, System::EventArgs^ e) - призначений для виклику Form_per.

Клас «Form_foto» призначений для відображення та корегування даних у представленні foto та містить наступні методи:

  • private: System::Void Form_foto_Load(System::Object^ sender, System::EventArgs^ e) призначений для відображення даних з представлення albom у сітці даних та виклику методу Zagr1;

  • private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) -призначений для пересування на наступний запис у прудставленні та виклику методу Zagr1;

  • private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) - призначений для пересування на попередній запис у прудставленні та виклику методу Zagr1;

  • private: System::Void button3_Click(System::Object^ sender, System::EventArgs^ e) - призначений для додавання нової фотографії у представлення;

  • void Zagr(int i)- призначений для завантаження фотографії, яка належить до активного запису у компонент для відображення картинок;

  • private: System::Void button4_Click(System::Object^ sender, System::EventArgs^ e) - призначений для визначення значення унікального ключа активного запису;

  • private: System::Void button5_Click(System::Object^ sender, System::EventArgs^ e) - для збереження данних у БД.

Клас "Form_per" призначений для відображення та корегування даних у представленні period та містить наступні методи:

  • private: System::Void Form_per_Load(System::Object^ sender, System::EventArgs^ e) - призначений для завантаження даних представлення

  • private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) - призначений для визначення значення унікального ключа активного запису;

  • private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) - для збереження данних у БД.

Рисунок 6 – Діаграма класів

Клас «Form_tem» призначений для відображення та корегування даних у представленні Tema та містить наступні методи:

  • private: System::Void Form_tem_Load(System::Object^ sender, System::EventArgs^ e) - призначений для завантаження даних представлення;

  • private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) - призначений для визначення значення унікального ключа активного запису;

  • private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) - для збереження данних у БД.

Клас «Form_tem1» призначений для вибору даних для додавання у представлення albom та містить наступні методи:

  • private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) - призначений для виклику Form_foto;

  • private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) - призначений для виклику Form_tem;

  • private: System::Void button3_Click(System::Object^ sender, System::EventArgs^ e) - призначений для виклику Form_per;private: System::Void button4_Click(System::Object^ sender, System::EventArgs^ e) - для закриття форми.

      1. Установка та перевірка програми

        1. Вимоги до апаратного та програмного забезпечення

Для нормального функціонування програми необхідне виконання наступних вимог щодо параметрів ПК: процесор Intel Pentium, AMD Athlon, AMD Sempron, оперативний запам’ятовуючий пристрій – 256 Mб, 20 Мб вільного дискового простору, відеокарта з можливістю відображення 256 кольорів. Якщо ці вимоги не будуть виконані, програма може функціонувати некоректно.

Вимоги до програмного забезпечення:

На комп’ютері повинно бути встановлено наступне програмне забезпечення: операційна система Microsoft Windows (98, ME, 2000, XP, Vista, Windows 7), платформа Microsoft.NET (версія 2.0 або вище), MS SQL Server 2005.

        1. Встановлення та видалення програми

Для роботи з програмою необхідно виконати інсталяцію файлу Setup до комп’ютеру, після чого у меню «Пуск» та на робочому столі з’являться ярлики для запуску програми.

Для роботи з програмою необхідно приєднати створену базу даних до баз даних SQL Server 2005. Для цього потрібно виконати наступні кроки. Запустити Microsoft SQL Server Management Studio Express 9.00.2047.00. Приєднатися до серверу (рис. 7).

Рисунок 7 – Приєднання до серверу

Наступний крок це з'єднання з базою даних (рис.8).

Рисунок 8 – З'єднання з базою даних

Перевірка підключення бази даних (рис.9)

Рисунок 9 – Перевірка підключення бази даних

Подвійним клацанням лівої клавіші миші можна виконати запуск програми.

Видалення програми виконується через меню «Пуск-Панель інструментів», тобто як для інших встановлених програм.

    1. Порадник користувача

      1. Призначення програми

Дана програма призначена для ведення записів про альбоми, фотографії, теми та періоди зйомок, додавання фотографій у альбом та перегляду фотографій. Вона дозволяє фільтрувати інформацію про альбоми за періодами та темами.

      1. Виконання програми

Запуск програми.

Запуск програми в операційній системі сімейства Windows здійснюється одним з стандартних способів:

  • подвійним клацанням лівою кнопкою миші на ярлику програми;

  • викликом контекстного меню з вибором його пункту «Открыть»;

  • натисканням кнопки «Пуск» панелі завдань з подальшим вибором пункту «Усі програми» та подвійним клацанням лівою кнопкою миші на ярлику програми.

Після запуску програми на екрані монітора з'являється головне вікно. (рис. 10).

Рисунок 10 – Головне вікно програми

Основні елементи графічного інтерфейсу програми:

Графічний інтерфейс програми складається з головного вікна (рис.10) та додаткових вікон.

Головне вікно програми має панель меню,перемикачі, кнопки та елемент відображення картинки.

Меню програми містить усі команди для керування її виконанням.

Воно має наступну структуру: "Фотографии", "Темы съемок", "Периоды съемок".

Робота з програмою.

Фільтр за періодом.

Для фільтрування за періодом натисніть на перемикач "Фильтр по периоду", буде відкрите наступне вікно (рис. 11).

Рисунок 11 – Фільтрування за періодом

Після вибору необхідного періоду, натискання на кнопку "Закрыть" та натискання на кнопку "Фильтр" можна побачити відфільтровану за періодом інформацію (рис.12).

Рисунок 12 – Результат фільтрування за періодом

Фільтр за темою.

Для фільтрування за темою натисніть на перемикач "Фильтр по темам", буде відкрите наступне вікно (рис. 13).

Рисунок 13 – Фільтрування за темою

Після вибору необхідного періоду, натискання на кнопку "Закрыть" та натискання на кнопку "Фильтр" можна побачити відфільтровану за темою інформацію (рис.14).

Рисунок 14 – Результат фільтрування за темою

Відміна фільтрації.

Для відміни фільтрації натисніть на перемикач "Отменить фильтр" та натисніть на кнопку "Фильтр", фільтрація буде відмінена (рис. 15).

Рисунок 15 – Результат відміни фільтрування

Пересування по записах.

Для пересування по записах натисніть відповідну кнопку "Следующая запись" або "Предыдущая запись", курсор перейде до потрібної записи (рис. 16-17).

Рисунок 16 – Результат переходу до наступного запису

Рисунок 17 – Результат переходу до попереднього запису

Додавання даних у альбом.

Для додавання даних у альбом натисніть кнопку "Выбрать данные для записи", зявиться наступна форма (рис. 18).

Рисунок 18 – Форма для вибору даних для додавання

Після натискання кнопки "Выбор фото" зявиться наступна форма (рис. 19). Після вибору фотографіїї натисніть на кнопку "Закрыть". Ви повернетесь на форму додавання даних у альбом (рис. 18).

Рисунок 19 – Форма для вибору фото

Після натискання кнопки "Выбор темы" зявиться наступна форма (рис. 20). Після вибору теми натисніть на кнопку "Закрыть". Ви повернетесь на форму додавання даних у альбом (рис. 18).

Рисунок 20 – Форма для вибору теми

Після натискання кнопки "Выбор периода" зявиться наступна форма (рис. 21). Після вибору теми натисніть на кнопку "Закрыть". Ви повернетесь на форму додавання даних у альбом (рис. 18).

Рисунок 21 – Форма для вибору періоду

Натисніть кнопку "Подьвердить выбор" для повернення у форму з представленням "Альбом" та натисніть кнопку "Добавить запись в альбом" для запису даних у БД (рис.22).

Рисунок 22 – Вигляд форми після збереження у БД.

При виборі пункту головного меню "Фотографии" буде завантажена наступна форма (рис. 23).

Рисунок 23 – Форма "Фотографии"

Пересування по записах.

Для пересування по записах натисніть відповідну кнопку "Следующая запись" або "Предыдущая запись", курсор перейде до потрібної записи (рис. 24-25).

Рисунок 24 – Результат переходу до наступного запису

Рисунок 25 – Результат переходу до попереднього запису

Додавання фотографій.

Для додавання запису у представлення натисніть кнопку "Добавить фото" та у вікні зробіть вибір фотографії (рис. 26).

Рисунок 26 – Вибор фотографії

Для збереження даних у БД натисніть кнопку "Сохранить изменения". Якщо потрібно закройте вікно.

При виборі пункту головного меню "Темы фотографий" буде завантажена наступна форма (рис. 27). Для збереження даних у БД натисніть кнопку "Сохранить изменения". Якщо потрібно закройте вікно.

Рисунок 27 – Форма "Теми фотозйомок"

При виборі пункту головного меню "Периоды фотосъемок" буде завантажена наступна форма (рис. 28). Для збереження даних у БД натисніть кнопку "Сохранить изменения". Якщо потрібно закройте вікно.

Рисунок 28 – Форма "Теми фотозйомок"

Вихід з програми

Для виходу з програми необхідно закрити форму за допомогою стандартної кнопки.

2.2.3 Повідомлення оператору

У программі не передбачені повідомлення оператору, так як вони не порібні.

ВИСНОВКИ

Під час написання курсового проекту я більш детально вивчила і отримала навички роботи в середовищі програмування MS Visual C++.

Система може працювати досить стабільно, була правильно вибрана СКБД, що гарантує функціональність і безпеку даних. Розроблено зручний і функціональний інтерфейс, використані різні довідкові матеріали, а так само деякі нестандартні компоненти, програма наповнена різноманітними функціями. Крім того, проект може бути розширений і на підставі його можливе створення потужної автоматизованої системи для масового використання.

 При написанні курсового проекту враховувалися концептуальні вимоги до системи. Розроблена автоматизована система «Альбом» дозволяє спростити роботу користувача при роботі з інформацією про фотографії.

Використання графічного інтерфейсу програми дозволяє користувачеві швидко зрозуміти, як функціонує програма, як нею користуватися, тому вона має наочний вигляд, легка у використанні, дані після закінчення роботи користувача оновлюються, інтерфейс супроводжується підказками. Перевагою такої програми є і те, що вся інформація зберігається в комп'ютері.

Під час написання програми вона була протестована. Всі помилки були виявлені і усунені під час тестування, тобто програма готова до використання.

Програма була виконана з частковим урахуванням всіх вимог і потреб користувача у відповідності з поставленим завданням. Не було реалізовано: модальне діалогове вікно «Про програму» з інформацією про розробника програми; немає спливаючих підказок операторові; сортування інформації за різними реквізитами.

Під час розроблення курсового проекту я досягла всіх поставлених цілей на початку: закріпила знання дисципліни «Об'єктно-орієнтоване програмування», склала досить просту у використанні і працездатну автоматизовану систему. Закріпила навички роботи з текстовим редактором Word, навички оформлення звітів, навички розробки автоматизованих систем, а також роботи в середовищі об'єктно-орієнтованої мови програмування MS Visual C++.

     Отже, підводячи підсумок курсового проекту можна сміливо сказати, що поставлені цілі були виконані.

Листінг програми

#pragma once

#include "Form_per.h"

#include "Form_tem.h"

#include "Form_tem1.h"

#include "Form_foto.h"

namespace My111 {

using namespace System;

using namespace System::ComponentModel;

using namespace System::Collections;

using namespace System::Windows::Forms;

using namespace System::Data;

using namespace System::Drawing;

using System::Convert;

using System::String;

using namespace System::IO;

/// <summary>

/// Summary for Form1

///

/// WARNING: If you change the name of this class, you will need to change the

/// 'Resource File Name' property for the managed resource compiler tool

/// associated with all .resx files this class depends on. Otherwise,

/// the designers will not be able to interact properly with localized

/// resources associated with this form.

/// </summary>

public ref class Form1 : public System::Windows::Forms::Form

{

public:

Form1(void)

{

InitializeComponent();

//

//TODO: Add the constructor code here

//

}

protected:

/// <summary>

/// Clean up any resources being used.

/// </summary>

~Form1()

{

if (components)

{

delete components;

}

}

private: System::Windows::Forms::DataGridView^ dataGridView1;

private: My111::КлищевнаяDataSet^ КлищевнаяDataSet;

private: System::Windows::Forms::BindingSource^ albomBindingSource;

private: My111::КлищевнаяDataSetTableAdapters::albomTableAdapter^ albomTableAdapter;

private:

private: System::Windows::Forms::Button^ button1;

private: System::Windows::Forms::PictureBox^ pictureBox1;

private: System::Windows::Forms::Button^ button2;

private: System::Windows::Forms::Button^ button3;

private: System::Windows::Forms::Button^ button4;

private: System::Windows::Forms::Button^ button5;

private: System::Windows::Forms::GroupBox^ groupBox1;

private: System::Windows::Forms::RadioButton^ radioButton3;

private: System::Windows::Forms::RadioButton^ radioButton2;

private: System::Windows::Forms::RadioButton^ radioButton1;

private: System::Windows::Forms::MenuStrip^ menuStrip1;

private: System::Windows::Forms::ToolStripMenuItem^ фотографииToolStripMenuItem;

private: System::Windows::Forms::ToolStripMenuItem^ темыСъемокToolStripMenuItem;

private: System::Windows::Forms::ToolStripMenuItem^ периодыСъемокToolStripMenuItem;

private: System::Windows::Forms::DataGridViewTextBoxColumn^ ukalDataGridViewTextBoxColumn;

private: System::Windows::Forms::DataGridViewTextBoxColumn^ mesto;

private: System::Windows::Forms::DataGridViewTextBoxColumn^ kto;

private: System::Windows::Forms::DataGridViewTextBoxColumn^ data;

private: System::Windows::Forms::DataGridViewTextBoxColumn^ nach;

private: System::Windows::Forms::DataGridViewTextBoxColumn^ kon;

private: System::Windows::Forms::DataGridViewTextBoxColumn^ Tema;

private: System::Windows::Forms::DataGridViewTextBoxColumn^ ukpDataGridViewTextBoxColumn;

private: System::Windows::Forms::DataGridViewTextBoxColumn^ uktDataGridViewTextBoxColumn;

private: System::Windows::Forms::DataGridViewTextBoxColumn^ ukfDataGridViewTextBoxColumn;

private: System::Windows::Forms::BindingSource^ albom1BindingSource;

private: My111::КлищевнаяDataSetTableAdapters::albom1TableAdapter^ albom1TableAdapter;

private: System::ComponentModel::IContainer^ components;

protected:

private:

/// <summary>

/// Required designer variable.

/// </summary>

#pragma region Windows Form Designer generated code

/// <summary>

/// Required method for Designer support - do not modify

/// the contents of this method with the code editor.

/// </summary>

void InitializeComponent(void)

{

this->components = (gcnew System::ComponentModel::Container());

this->dataGridView1 = (gcnew System::Windows::Forms::DataGridView());

this->ukalDataGridViewTextBoxColumn = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());

this->mesto = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());

this->kto = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());

this->data = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());

this->nach = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());

this->kon = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());

this->Tema = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());

this->ukpDataGridViewTextBoxColumn = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());

this->uktDataGridViewTextBoxColumn = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());

this->ukfDataGridViewTextBoxColumn = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());

this->albomBindingSource = (gcnew System::Windows::Forms::BindingSource(this->components));

this->КлищевнаяDataSet = (gcnew My111::КлищевнаяDataSet());

this->button1 = (gcnew System::Windows::Forms::Button());

this->pictureBox1 = (gcnew System::Windows::Forms::PictureBox());

this->button2 = (gcnew System::Windows::Forms::Button());

this->button3 = (gcnew System::Windows::Forms::Button());

this->button4 = (gcnew System::Windows::Forms::Button());

this->button5 = (gcnew System::Windows::Forms::Button());

this->groupBox1 = (gcnew System::Windows::Forms::GroupBox());

this->radioButton3 = (gcnew System::Windows::Forms::RadioButton());

this->radioButton2 = (gcnew System::Windows::Forms::RadioButton());

this->radioButton1 = (gcnew System::Windows::Forms::RadioButton());

this->menuStrip1 = (gcnew System::Windows::Forms::MenuStrip());

this->фотографииToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());

this->темыСъемокToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());

this->периодыСъемокToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());

this->albom1BindingSource = (gcnew System::Windows::Forms::BindingSource(this->components));

this->albomTableAdapter = (gcnew My111::КлищевнаяDataSetTableAdapters::albomTableAdapter());

this->albom1TableAdapter = (gcnew My111::КлищевнаяDataSetTableAdapters::albom1TableAdapter());

(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->dataGridView1))->BeginInit();

(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->albomBindingSource))->BeginInit();

(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->КлищевнаяDataSet))->BeginInit();

(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox1))->BeginInit();

this->groupBox1->SuspendLayout();

this->menuStrip1->SuspendLayout();

(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->albom1BindingSource))->BeginInit();

this->SuspendLayout();

//

// dataGridView1

//

this->dataGridView1->AutoGenerateColumns = false;

this->dataGridView1->ColumnHeadersHeightSizeMode = System::Windows::Forms::DataGridViewColumnHeadersHeightSizeMode::AutoSize;

this->dataGridView1->Columns->AddRange(gcnew cli::array< System::Windows::Forms::DataGridViewColumn^ >(10) {this->ukalDataGridViewTextBoxColumn,

this->mesto, this->kto, this->data, this->nach, this->kon, this->Tema, this->ukpDataGridViewTextBoxColumn, this->uktDataGridViewTextBoxColumn,

this->ukfDataGridViewTextBoxColumn});

this->dataGridView1->DataSource = this->albomBindingSource;

this->dataGridView1->Location = System::Drawing::Point(12, 27);

this->dataGridView1->Name = L"dataGridView1";

this->dataGridView1->Size = System::Drawing::Size(666, 142);

this->dataGridView1->TabIndex = 0;

//

// ukalDataGridViewTextBoxColumn

//

this->ukalDataGridViewTextBoxColumn->DataPropertyName = L"uk_al";

this->ukalDataGridViewTextBoxColumn->HeaderText = L"uk_al";

this->ukalDataGridViewTextBoxColumn->Name = L"ukalDataGridViewTextBoxColumn";

this->ukalDataGridViewTextBoxColumn->Visible = false;

//

// mesto

//

this->mesto->DataPropertyName = L"mesto";

this->mesto->HeaderText = L"Место съемки";

this->mesto->Name = L"mesto";

//

// kto

//

this->kto->DataPropertyName = L"kto";

this->kto->HeaderText = L"Кто на фотографии";

this->kto->Name = L"kto";

//

// data

//

this->data->DataPropertyName = L"data";

this->data->HeaderText = L"Дата съемки";

this->data->Name = L"data";

//

// nach

//

this->nach->DataPropertyName = L"nach";

this->nach->HeaderText = L"Начало периода";

this->nach->Name = L"nach";

//

// kon

//

this->kon->DataPropertyName = L"kon";

this->kon->HeaderText = L"Конец периода";

this->kon->Name = L"kon";

//

// Tema

//

this->Tema->DataPropertyName = L"Tema";

this->Tema->HeaderText = L"Тема съемки";

this->Tema->Name = L"Tema";

//

// ukpDataGridViewTextBoxColumn

//

this->ukpDataGridViewTextBoxColumn->DataPropertyName = L"uk_p";

this->ukpDataGridViewTextBoxColumn->HeaderText = L"uk_p";

this->ukpDataGridViewTextBoxColumn->Name = L"ukpDataGridViewTextBoxColumn";

this->ukpDataGridViewTextBoxColumn->Visible = false;

//

// uktDataGridViewTextBoxColumn

//

this->uktDataGridViewTextBoxColumn->DataPropertyName = L"uk_t";

this->uktDataGridViewTextBoxColumn->HeaderText = L"uk_t";

this->uktDataGridViewTextBoxColumn->Name = L"uktDataGridViewTextBoxColumn";

this->uktDataGridViewTextBoxColumn->Visible = false;

//

// ukfDataGridViewTextBoxColumn

//

this->ukfDataGridViewTextBoxColumn->DataPropertyName = L"uk_f";

this->ukfDataGridViewTextBoxColumn->HeaderText = L"uk_f";

this->ukfDataGridViewTextBoxColumn->Name = L"ukfDataGridViewTextBoxColumn";

this->ukfDataGridViewTextBoxColumn->Visible = false;

//

// albomBindingSource

//

this->albomBindingSource->DataMember = L"albom";

this->albomBindingSource->DataSource = this->КлищевнаяDataSet;

//

// КлищевнаяDataSet

//

this->КлищевнаяDataSet->DataSetName = L"КлищевнаяDataSet";

this->КлищевнаяDataSet->SchemaSerializationMode = System::Data::SchemaSerializationMode::IncludeSchema;

//

// button1

//

this->button1->Location = System::Drawing::Point(20, 175);

this->button1->Name = L"button1";

this->button1->Size = System::Drawing::Size(249, 23);

this->button1->TabIndex = 1;

this->button1->Text = L"Следующая запись";

this->button1->UseVisualStyleBackColor = true;

this->button1->Click += gcnew System::EventHandler(this, &Form1::button1_Click);

//

// pictureBox1

//

this->pictureBox1->Location = System::Drawing::Point(691, 18);

this->pictureBox1->Name = L"pictureBox1";

this->pictureBox1->Size = System::Drawing::Size(250, 151);

this->pictureBox1->TabIndex = 2;

this->pictureBox1->TabStop = false;

//

// button2

//

this->button2->Location = System::Drawing::Point(20, 204);

this->button2->Name = L"button2";

this->button2->Size = System::Drawing::Size(247, 23);

this->button2->TabIndex = 3;

this->button2->Text = L"Предыдущая запись";

this->button2->UseVisualStyleBackColor = true;

this->button2->Click += gcnew System::EventHandler(this, &Form1::button2_Click);

//

// button3

//

this->button3->Location = System::Drawing::Point(512, 204);

this->button3->Name = L"button3";

this->button3->Size = System::Drawing::Size(201, 23);

this->button3->TabIndex = 4;

this->button3->Text = L"Добавить запись в альбом";

this->button3->UseVisualStyleBackColor = true;

this->button3->Click += gcnew System::EventHandler(this, &Form1::button3_Click);

//

// button4

//

this->button4->Location = System::Drawing::Point(512, 175);

this->button4->Name = L"button4";

this->button4->Size = System::Drawing::Size(201, 23);

this->button4->TabIndex = 5;

this->button4->Text = L"Выбрать данные для записи";

this->button4->UseVisualStyleBackColor = true;

this->button4->Click += gcnew System::EventHandler(this, &Form1::button4_Click);

//

// button5

//

this->button5->Location = System::Drawing::Point(331, 295);

this->button5->Name = L"button5";

this->button5->Size = System::Drawing::Size(75, 23);

this->button5->TabIndex = 6;

this->button5->Text = L"Фильтр";

this->button5->UseVisualStyleBackColor = true;

this->button5->Click += gcnew System::EventHandler(this, &Form1::button5_Click);

//

// groupBox1

//

this->groupBox1->Controls->Add(this->radioButton3);

this->groupBox1->Controls->Add(this->radioButton2);

this->groupBox1->Controls->Add(this->radioButton1);

this->groupBox1->Location = System::Drawing::Point(286, 175);

this->groupBox1->Name = L"groupBox1";

this->groupBox1->Size = System::Drawing::Size(164, 110);

this->groupBox1->TabIndex = 7;

this->groupBox1->TabStop = false;

this->groupBox1->Text = L"Параметры фильтрации";

//

// radioButton3

//

this->radioButton3->AutoSize = true;

this->radioButton3->Location = System::Drawing::Point(15, 85);

this->radioButton3->Name = L"radioButton3";

this->radioButton3->Size = System::Drawing::Size(115, 17);

this->radioButton3->TabIndex = 2;

this->radioButton3->TabStop = true;

this->radioButton3->Text = L"Отменить фильтр";

this->radioButton3->UseVisualStyleBackColor = true;

//

// radioButton2

//

this->radioButton2->AutoSize = true;

this->radioButton2->Location = System::Drawing::Point(17, 57);

this->radioButton2->Name = L"radioButton2";

this->radioButton2->Size = System::Drawing::Size(116, 17);

this->radioButton2->TabIndex = 1;

this->radioButton2->TabStop = true;

this->radioButton2->Text = L"Фильтр по темам";

this->radioButton2->UseVisualStyleBackColor = true;

this->radioButton2->Click += gcnew System::EventHandler(this, &Form1::radioButton2_Click);

//

// radioButton1

//

this->radioButton1->AutoSize = true;

this->radioButton1->Location = System::Drawing::Point(18, 27);

this->radioButton1->Name = L"radioButton1";

this->radioButton1->Size = System::Drawing::Size(124, 17);

this->radioButton1->TabIndex = 0;

this->radioButton1->TabStop = true;

this->radioButton1->Text = L"Фильтр по периоду";

this->radioButton1->UseVisualStyleBackColor = true;

this->radioButton1->Click += gcnew System::EventHandler(this, &Form1::radioButton1_Click);

//

// menuStrip1

//

this->menuStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(3) {this->фотографииToolStripMenuItem,

this->темыСъемокToolStripMenuItem, this->периодыСъемокToolStripMenuItem});

this->menuStrip1->Location = System::Drawing::Point(0, 0);

this->menuStrip1->Name = L"menuStrip1";

this->menuStrip1->Size = System::Drawing::Size(953, 24);

this->menuStrip1->TabIndex = 8;

this->menuStrip1->Text = L"menuStrip1";

//

// фотографииToolStripMenuItem

//

this->фотографииToolStripMenuItem->Name = L"фотографииToolStripMenuItem";

this->фотографииToolStripMenuItem->Size = System::Drawing::Size(88, 20);

this->фотографииToolStripMenuItem->Text = L"Фотографии";

this->фотографииToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::фотографииToolStripMenuItem_Click);

//

// темыСъемокToolStripMenuItem

//

this->темыСъемокToolStripMenuItem->Name = L"темыСъемокToolStripMenuItem";

this->темыСъемокToolStripMenuItem->Size = System::Drawing::Size(94, 20);

this->темыСъемокToolStripMenuItem->Text = L"Темы съемок";

this->темыСъемокToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::темыСъемокToolStripMenuItem_Click);

//

// периодыСъемокToolStripMenuItem

//

this->периодыСъемокToolStripMenuItem->Name = L"периодыСъемокToolStripMenuItem";

this->периодыСъемокToolStripMenuItem->Size = System::Drawing::Size(114, 20);

this->периодыСъемокToolStripMenuItem->Text = L"Периоды съемок";

this->периодыСъемокToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::периодыСъемокToolStripMenuItem_Click);

//

// albom1BindingSource

//

this->albom1BindingSource->DataMember = L"albom1";

this->albom1BindingSource->DataSource = this->КлищевнаяDataSet;

//

// albomTableAdapter

//

this->albomTableAdapter->ClearBeforeFill = true;

//

// albom1TableAdapter

//

this->albom1TableAdapter->ClearBeforeFill = true;

//

// Form1

//

this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);

this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;

this->ClientSize = System::Drawing::Size(953, 330);

this->Controls->Add(this->groupBox1);

this->Controls->Add(this->button5);

this->Controls->Add(this->button4);

this->Controls->Add(this->button3);

this->Controls->Add(this->button2);

this->Controls->Add(this->pictureBox1);

this->Controls->Add(this->button1);

this->Controls->Add(this->dataGridView1);

this->Controls->Add(this->menuStrip1);

this->MainMenuStrip = this->menuStrip1;

this->Name = L"Form1";

this->Text = L"Курсовой проект по ООП";

this->Load += gcnew System::EventHandler(this, &Form1::Form1_Load);

(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->dataGridView1))->EndInit();

(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->albomBindingSource))->EndInit();

(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->КлищевнаяDataSet))->EndInit();

(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox1))->EndInit();

this->groupBox1->ResumeLayout(false);

this->groupBox1->PerformLayout();

this->menuStrip1->ResumeLayout(false);

this->menuStrip1->PerformLayout();

(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->albom1BindingSource))->EndInit();

this->ResumeLayout(false);

this->PerformLayout();

}

#pragma endregion

private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) {

// TODO: Данная строка кода позволяет загрузить данные в таблицу "КлищевнаяDataSet.albom1". При необходимости она может быть перемещена или удалена.

this->albom1TableAdapter->Fill(this->КлищевнаяDataSet->albom1);

// TODO: Данная строка кода позволяет загрузить данные в таблицу "КлищевнаяDataSet.albom1". При необходимости она может быть перемещена или удалена.

// TODO: Данная строка кода позволяет загрузить данные в таблицу "КлищевнаяDataSet.albom1". При необходимости она может быть перемещена или удалена.

// TODO: Данная строка кода позволяет загрузить данные в таблицу "КлищевнаяDataSet.albom". При необходимости она может быть перемещена или удалена.

this->albomTableAdapter->Fill(this->КлищевнаяDataSet->albom);

int l;

l=this->dataGridView1->CurrentRow->Index;

Zagr1(l);

}

void Zagr1(int i)

{

String^ path = Directory::GetCurrentDirectory();

String^ s;

DataRow^ row;

DataTable^ alb=this->КлищевнаяDataSet->albom;

DataColumn^ c=this->КлищевнаяDataSet->albom->uk_fColumn;

i=this->dataGridView1->CurrentRow->Index;

row=alb->Rows[i];

s=(row[c])->ToString();

this->pictureBox1->ImageLocation=path+"\\Фотографии\\"+s+".jpg";

};

private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {

int l;

this->albomBindingSource->MoveNext();

l=this->dataGridView1->CurrentRow->Index;

Zagr1(l);

}

private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {

int l;

this->albomBindingSource->MovePrevious();

l=this->dataGridView1->CurrentRow->Index;

Zagr1(l);

}

private: System::Void button3_Click(System::Object^ sender, System::EventArgs^ e) {

DataTable^ alb=КлищевнаяDataSet->albom1;

DataRow^ wr = alb->NewRow();

wr["uk_f"]=Form_foto::c13;

wr["uk_p"]=Form_per::c11;

wr["uk_t"]=Form_tem::c12;

alb->Rows->Add(wr);

this->albom1TableAdapter->Update(this->КлищевнаяDataSet->albom1);

this->albomTableAdapter->Fill(this->КлищевнаяDataSet->albom);

}

private: System::Void button4_Click(System::Object^ sender, System::EventArgs^ e) {

Form_tem1^ ft1=gcnew Form_tem1();

ft1->Show();

}

private: System::Void button5_Click(System::Object^ sender, System::EventArgs^ e) {

String^ expression;

if(this->radioButton1->Checked)

{

int a=Form_per::c11;

expression = "uk_p="+a;

this->albomBindingSource->Filter=expression;

}

if(this->radioButton2->Checked)

{int b=Form_tem::c12;

expression = "uk_t="+b;

this->albomBindingSource->Filter=expression;

}

if(this->radioButton3->Checked)

{expression ="";

this->albomBindingSource->Filter=expression;

}

}

private: System::Void radioButton1_Click(System::Object^ sender, System::EventArgs^ e) {

Form_per^ fp=gcnew Form_per();

fp->Show();

}

private: System::Void radioButton2_Click(System::Object^ sender, System::EventArgs^ e) {

Form_tem^ ft=gcnew Form_tem();

ft->Show();

}

private: System::Void фотографииToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {

Form_foto^ ff=gcnew Form_foto();

ff->Show();

}

private: System::Void темыСъемокToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {

Form_tem^ ft=gcnew Form_tem();

ft->Show();

}

private: System::Void периодыСъемокToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {

Form_per^ fp=gcnew Form_per();

fp->Show();

}

};

}

#pragma once

using namespace System;

using namespace System::ComponentModel;

using namespace System::Collections;

using namespace System::Windows::Forms;

using namespace System::Data;

using namespace System::Drawing;

using System::String;

using namespace System::IO;

namespace My111 {

/// <summary>

/// Summary for Form_foto

///

/// WARNING: If you change the name of this class, you will need to change the

/// 'Resource File Name' property for the managed resource compiler tool

/// associated with all .resx files this class depends on. Otherwise,

/// the designers will not be able to interact properly with localized

/// resources associated with this form.

/// </summary>

public ref class Form_foto : public System::Windows::Forms::Form

{

public:

Form_foto(void)

{

InitializeComponent();

//

//TODO: Add the constructor code here

//

}

static int c13;

private: System::Windows::Forms::PictureBox^ pictureBox1;

public:

private: System::Windows::Forms::DataGridView^ dataGridView1;

private: My111::КлищевнаяDataSet^ КлищевнаяDataSet;

private: System::Windows::Forms::BindingSource^ fotoBindingSource;

private: My111::КлищевнаяDataSetTableAdapters::fotoTableAdapter^ fotoTableAdapter;

private: System::Windows::Forms::Button^ button1;

private: System::Windows::Forms::Button^ button2;

private: System::Windows::Forms::Button^ button3;

private: System::Windows::Forms::Button^ button4;

private: System::Windows::Forms::DataGridViewTextBoxColumn^ ukfotoDataGridViewTextBoxColumn;

private: System::Windows::Forms::DataGridViewTextBoxColumn^ mestoDataGridViewTextBoxColumn;

private: System::Windows::Forms::DataGridViewTextBoxColumn^ ktoDataGridViewTextBoxColumn;

private: System::Windows::Forms::DataGridViewTextBoxColumn^ dataDataGridViewTextBoxColumn;

private: System::Windows::Forms::Button^ button5;

private: System::Windows::Forms::OpenFileDialog^ openFileDialog1;

protected:

/// <summary>

/// Clean up any resources being used.

/// </summary>

~Form_foto()

{

if (components)

{

delete components;

}

}

private: System::ComponentModel::IContainer^ components;

protected:

private:

/// <summary>

/// Required designer variable.

/// </summary>

#pragma region Windows Form Designer generated code

/// <summary>

/// Required method for Designer support - do not modify

/// the contents of this method with the code editor.

/// </summary>

void InitializeComponent(void)

{

this->components = (gcnew System::ComponentModel::Container());

this->pictureBox1 = (gcnew System::Windows::Forms::PictureBox());

this->dataGridView1 = (gcnew System::Windows::Forms::DataGridView());

this->button1 = (gcnew System::Windows::Forms::Button());

this->button2 = (gcnew System::Windows::Forms::Button());

this->button3 = (gcnew System::Windows::Forms::Button());

this->button4 = (gcnew System::Windows::Forms::Button());

this->openFileDialog1 = (gcnew System::Windows::Forms::OpenFileDialog());

this->ukfotoDataGridViewTextBoxColumn = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());

this->mestoDataGridViewTextBoxColumn = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());

this->ktoDataGridViewTextBoxColumn = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());

this->dataDataGridViewTextBoxColumn = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());

this->fotoBindingSource = (gcnew System::Windows::Forms::BindingSource(this->components));

this->КлищевнаяDataSet = (gcnew My111::КлищевнаяDataSet());

this->fotoTableAdapter = (gcnew My111::КлищевнаяDataSetTableAdapters::fotoTableAdapter());

this->button5 = (gcnew System::Windows::Forms::Button());

(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox1))->BeginInit();

(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->dataGridView1))->BeginInit();

(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->fotoBindingSource))->BeginInit();

(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->КлищевнаяDataSet))->BeginInit();

this->SuspendLayout();

//

// pictureBox1

//

this->pictureBox1->Location = System::Drawing::Point(373, 12);

this->pictureBox1->Name = L"pictureBox1";

this->pictureBox1->Size = System::Drawing::Size(286, 177);

this->pictureBox1->TabIndex = 0;

this->pictureBox1->TabStop = false;

//

// dataGridView1

//

this->dataGridView1->AutoGenerateColumns = false;

this->dataGridView1->ColumnHeadersHeightSizeMode = System::Windows::Forms::DataGridViewColumnHeadersHeightSizeMode::AutoSize;

this->dataGridView1->Columns->AddRange(gcnew cli::array< System::Windows::Forms::DataGridViewColumn^ >(4) {this->ukfotoDataGridViewTextBoxColumn,

this->mestoDataGridViewTextBoxColumn, this->ktoDataGridViewTextBoxColumn, this->dataDataGridViewTextBoxColumn});

this->dataGridView1->DataSource = this->fotoBindingSource;

this->dataGridView1->Location = System::Drawing::Point(8, 7);

this->dataGridView1->Name = L"dataGridView1";

this->dataGridView1->Size = System::Drawing::Size(359, 182);

this->dataGridView1->TabIndex = 1;

//

// button1

//

this->button1->Location = System::Drawing::Point(15, 196);

this->button1->Name = L"button1";

this->button1->Size = System::Drawing::Size(179, 23);

this->button1->TabIndex = 2;

this->button1->Text = L"Следующая запись";

this->button1->UseVisualStyleBackColor = true;

this->button1->Click += gcnew System::EventHandler(this, &Form_foto::button1_Click);

//

// button2

//

this->button2->Location = System::Drawing::Point(15, 225);

this->button2->Name = L"button2";

this->button2->Size = System::Drawing::Size(179, 23);

this->button2->TabIndex = 3;

this->button2->Text = L"Предыдущая запись";

this->button2->UseVisualStyleBackColor = true;

this->button2->Click += gcnew System::EventHandler(this, &Form_foto::button2_Click);

//

// button3

//

this->button3->Location = System::Drawing::Point(225, 196);

this->button3->Name = L"button3";

this->button3->Size = System::Drawing::Size(142, 23);

this->button3->TabIndex = 4;

this->button3->Text = L"Добавить фото";

this->button3->UseVisualStyleBackColor = true;

this->button3->Click += gcnew System::EventHandler(this, &Form_foto::button3_Click);

//

// button4

//

this->button4->Location = System::Drawing::Point(481, 206);

this->button4->Name = L"button4";

this->button4->Size = System::Drawing::Size(75, 23);

this->button4->TabIndex = 5;

this->button4->Text = L"Закрыть";

this->button4->UseVisualStyleBackColor = true;

this->button4->Click += gcnew System::EventHandler(this, &Form_foto::button4_Click);

//

// openFileDialog1

//

this->openFileDialog1->FileName = L"openFileDialog1";

//

// ukfotoDataGridViewTextBoxColumn

//

this->ukfotoDataGridViewTextBoxColumn->DataPropertyName = L"uk_foto";

this->ukfotoDataGridViewTextBoxColumn->HeaderText = L"uk_foto";

this->ukfotoDataGridViewTextBoxColumn->Name = L"ukfotoDataGridViewTextBoxColumn";

this->ukfotoDataGridViewTextBoxColumn->Visible = false;

//

// mestoDataGridViewTextBoxColumn

//

this->mestoDataGridViewTextBoxColumn->DataPropertyName = L"mesto";

this->mestoDataGridViewTextBoxColumn->HeaderText = L"Место съемки";

this->mestoDataGridViewTextBoxColumn->Name = L"mestoDataGridViewTextBoxColumn";

//

// ktoDataGridViewTextBoxColumn

//

this->ktoDataGridViewTextBoxColumn->DataPropertyName = L"kto";

this->ktoDataGridViewTextBoxColumn->HeaderText = L"Кто на фото";

this->ktoDataGridViewTextBoxColumn->Name = L"ktoDataGridViewTextBoxColumn";

//

// dataDataGridViewTextBoxColumn

//

this->dataDataGridViewTextBoxColumn->DataPropertyName = L"data";

this->dataDataGridViewTextBoxColumn->HeaderText = L"Дата съемки";

this->dataDataGridViewTextBoxColumn->Name = L"dataDataGridViewTextBoxColumn";

//

// fotoBindingSource

//

this->fotoBindingSource->DataMember = L"foto";

this->fotoBindingSource->DataSource = this->КлищевнаяDataSet;

//

// КлищевнаяDataSet

//

this->КлищевнаяDataSet->DataSetName = L"КлищевнаяDataSet";

this->КлищевнаяDataSet->SchemaSerializationMode = System::Data::SchemaSerializationMode::IncludeSchema;

//

// fotoTableAdapter

//

this->fotoTableAdapter->ClearBeforeFill = true;

//

// button5

//

this->button5->Location = System::Drawing::Point(225, 225);

this->button5->Name = L"button5";

this->button5->Size = System::Drawing::Size(142, 23);

this->button5->TabIndex = 6;

this->button5->Text = L"Сохранить изменения";

this->button5->UseVisualStyleBackColor = true;

this->button5->Click += gcnew System::EventHandler(this, &Form_foto::button5_Click);

//

// Form_foto

//

this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);

this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;

this->ClientSize = System::Drawing::Size(671, 262);

this->Controls->Add(this->button5);

this->Controls->Add(this->button4);

this->Controls->Add(this->button3);

this->Controls->Add(this->button2);

this->Controls->Add(this->button1);

this->Controls->Add(this->dataGridView1);

this->Controls->Add(this->pictureBox1);

this->Name = L"Form_foto";

this->Text = L"Фотографии";

this->Load += gcnew System::EventHandler(this, &Form_foto::Form_foto_Load);

(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox1))->EndInit();

(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->dataGridView1))->EndInit();

(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->fotoBindingSource))->EndInit();

(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->КлищевнаяDataSet))->EndInit();

this->ResumeLayout(false);

}

#pragma endregion

private: System::Void Form_foto_Load(System::Object^ sender, System::EventArgs^ e) {

// TODO: Данная строка кода позволяет загрузить данные в таблицу "КлищевнаяDataSet.foto". При необходимости она может быть перемещена или удалена.

this->fotoTableAdapter->Fill(this->КлищевнаяDataSet->foto);

int l;

l=this->dataGridView1->CurrentRow->Index;

Zagr(l);

}

private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {

int l;

this->fotoBindingSource->MoveNext();

l=this->dataGridView1->CurrentRow->Index;

Zagr(l);

}

private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {

int l;

this->fotoBindingSource->MovePrevious();

l=this->dataGridView1->CurrentRow->Index;

Zagr(l);

}

private: System::Void button3_Click(System::Object^ sender, System::EventArgs^ e) {

String^ path = Directory::GetCurrentDirectory();

String^ path2;

String^ s;

openFileDialog1->InitialDirectory=path+"\\Фотографии\\";

if(openFileDialog1->ShowDialog() == System::Windows::Forms::DialogResult::OK)

{path2=openFileDialog1->FileName;

DataRow^ row;

DataTable^ foto=this->КлищевнаяDataSet->foto;

DataColumn^ c=this->КлищевнаяDataSet->foto->uk_fotoColumn;

int i=this->dataGridView1->CurrentRow->Index;

row=foto->Rows[i];

s=(row[c])->ToString();

File::Copy( path2,path+"\\Фотографии\\"+s+".jpg");

this->pictureBox1->ImageLocation=path+"\\Фотографии\\"+s+".jpg";

}

else path2="0.jpg";

}

void Zagr(int i)

{

String^ path = Directory::GetCurrentDirectory();

String^ s;

DataRow^ row;

DataTable^ foto=this->КлищевнаяDataSet->foto;

DataColumn^ c=this->КлищевнаяDataSet->foto->uk_fotoColumn;

row=foto->Rows[i];

s=(row[c])->ToString();

this->pictureBox1->ImageLocation=path+"\\Фотографии\\"+s+".jpg";

};

private: System::Void button4_Click(System::Object^ sender, System::EventArgs^ e) {

DataRow^ row;

DataTable^ fot=this->КлищевнаяDataSet->foto;

DataColumn^ c=this->КлищевнаяDataSet->foto->uk_fotoColumn;

int i=this->dataGridView1->CurrentRow->Index;

row=fot->Rows[i];

c13=System::Convert::ToInt16(row[c]);

this->Close();

}

private: System::Void button5_Click(System::Object^ sender, System::EventArgs^ e) {

this->fotoTableAdapter->Update(this->КлищевнаяDataSet->foto);

}

};

}

#pragma once

using namespace System;

using namespace System::ComponentModel;

using namespace System::Collections;

using namespace System::Windows::Forms;

using namespace System::Data;

using namespace System::Drawing;

namespace My111 {

/// <summary>

/// Summary for Form_per

///

/// WARNING: If you change the name of this class, you will need to change the

/// 'Resource File Name' property for the managed resource compiler tool

/// associated with all .resx files this class depends on. Otherwise,

/// the designers will not be able to interact properly with localized

/// resources associated with this form.

/// </summary>

public ref class Form_per : public System::Windows::Forms::Form

{

public:

Form_per(void)

{

InitializeComponent();

//

//TODO: Add the constructor code here

//

}

static int c11;

private: System::Windows::Forms::DataGridViewTextBoxColumn^ ukperDataGridViewTextBoxColumn;

public:

private: System::Windows::Forms::DataGridViewTextBoxColumn^ nachDataGridViewTextBoxColumn;

private: System::Windows::Forms::Button^ button2;

private: System::Windows::Forms::DataGridViewTextBoxColumn^ konDataGridViewTextBoxColumn;

protected:

/// <summary>

/// Clean up any resources being used.

/// </summary>

~Form_per()

{

if (components)

{

delete components;

}

}

private: System::Windows::Forms::DataGridView^ dataGridView1;

private: My111::КлищевнаяDataSet^ КлищевнаяDataSet;

private: System::Windows::Forms::BindingSource^ periodBindingSource;

private: My111::КлищевнаяDataSetTableAdapters::periodTableAdapter^ periodTableAdapter;

private: System::Windows::Forms::Button^ button1;

private: System::ComponentModel::IContainer^ components;

protected:

private:

/// <summary>

/// Required designer variable.

/// </summary>

#pragma region Windows Form Designer generated code

/// <summary>

/// Required method for Designer support - do not modify

/// the contents of this method with the code editor.

/// </summary>

void InitializeComponent(void)

{

this->components = (gcnew System::ComponentModel::Container());

this->dataGridView1 = (gcnew System::Windows::Forms::DataGridView());

this->ukperDataGridViewTextBoxColumn = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());

this->nachDataGridViewTextBoxColumn = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());

this->konDataGridViewTextBoxColumn = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());

this->periodBindingSource = (gcnew System::Windows::Forms::BindingSource(this->components));

this->КлищевнаяDataSet = (gcnew My111::КлищевнаяDataSet());

this->periodTableAdapter = (gcnew My111::КлищевнаяDataSetTableAdapters::periodTableAdapter());

this->button1 = (gcnew System::Windows::Forms::Button());

this->button2 = (gcnew System::Windows::Forms::Button());

(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->dataGridView1))->BeginInit();

(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->periodBindingSource))->BeginInit();

(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->КлищевнаяDataSet))->BeginInit();

this->SuspendLayout();

//

// dataGridView1

//

this->dataGridView1->AutoGenerateColumns = false;

this->dataGridView1->ColumnHeadersHeightSizeMode = System::Windows::Forms::DataGridViewColumnHeadersHeightSizeMode::AutoSize;

this->dataGridView1->Columns->AddRange(gcnew cli::array< System::Windows::Forms::DataGridViewColumn^ >(3) {this->ukperDataGridViewTextBoxColumn,

this->nachDataGridViewTextBoxColumn, this->konDataGridViewTextBoxColumn});

this->dataGridView1->DataSource = this->periodBindingSource;

this->dataGridView1->Location = System::Drawing::Point(9, 12);

this->dataGridView1->Name = L"dataGridView1";

this->dataGridView1->Size = System::Drawing::Size(263, 150);

this->dataGridView1->TabIndex = 0;

//

// ukperDataGridViewTextBoxColumn

//

this->ukperDataGridViewTextBoxColumn->DataPropertyName = L"uk_per";

this->ukperDataGridViewTextBoxColumn->HeaderText = L"uk_per";

this->ukperDataGridViewTextBoxColumn->Name = L"ukperDataGridViewTextBoxColumn";

this->ukperDataGridViewTextBoxColumn->Visible = false;

//

// nachDataGridViewTextBoxColumn

//

this->nachDataGridViewTextBoxColumn->DataPropertyName = L"nach";

this->nachDataGridViewTextBoxColumn->HeaderText = L"Начало периода";

this->nachDataGridViewTextBoxColumn->Name = L"nachDataGridViewTextBoxColumn";

//

// konDataGridViewTextBoxColumn

//

this->konDataGridViewTextBoxColumn->DataPropertyName = L"kon";

this->konDataGridViewTextBoxColumn->HeaderText = L"Конец периода";

this->konDataGridViewTextBoxColumn->Name = L"konDataGridViewTextBoxColumn";

//

// periodBindingSource

//

this->periodBindingSource->DataMember = L"period";

this->periodBindingSource->DataSource = this->КлищевнаяDataSet;

//

// КлищевнаяDataSet

//

this->КлищевнаяDataSet->DataSetName = L"КлищевнаяDataSet";

this->КлищевнаяDataSet->SchemaSerializationMode = System::Data::SchemaSerializationMode::IncludeSchema;

//

// periodTableAdapter

//

this->periodTableAdapter->ClearBeforeFill = true;

//

// button1

//

this->button1->Location = System::Drawing::Point(67, 206);

this->button1->Name = L"button1";

this->button1->Size = System::Drawing::Size(144, 23);

this->button1->TabIndex = 1;

this->button1->Text = L"Закрыть";

this->button1->UseVisualStyleBackColor = true;

this->button1->Click += gcnew System::EventHandler(this, &Form_per::button1_Click);

//

// button2

//

this->button2->Location = System::Drawing::Point(67, 177);

this->button2->Name = L"button2";

this->button2->Size = System::Drawing::Size(144, 23);

this->button2->TabIndex = 2;

this->button2->Text = L"Сохранить изменения";

this->button2->UseVisualStyleBackColor = true;

this->button2->Click += gcnew System::EventHandler(this, &Form_per::button2_Click);

//

// Form_per

//

this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);

this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;

this->ClientSize = System::Drawing::Size(284, 232);

this->Controls->Add(this->button2);

this->Controls->Add(this->button1);

this->Controls->Add(this->dataGridView1);

this->Name = L"Form_per";

this->Text = L"Периоды съемки";

this->Load += gcnew System::EventHandler(this, &Form_per::Form_per_Load);

(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->dataGridView1))->EndInit();

(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->periodBindingSource))->EndInit();

(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->КлищевнаяDataSet))->EndInit();

this->ResumeLayout(false);

}

#pragma endregion

private: System::Void Form_per_Load(System::Object^ sender, System::EventArgs^ e) {

// TODO: Данная строка кода позволяет загрузить данные в таблицу "КлищевнаяDataSet.period". При необходимости она может быть перемещена или удалена.

this->periodTableAdapter->Fill(this->КлищевнаяDataSet->period);

}

private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {

DataRow^ row;

DataTable^ per=this->КлищевнаяDataSet->period;

DataColumn^ c=this->КлищевнаяDataSet->period->uk_perColumn;

int i=this->dataGridView1->CurrentRow->Index;

row=per->Rows[i];

c11=System::Convert::ToInt16(row[c]);

this->Close();

}

private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {

this->periodTableAdapter->Update(this->КлищевнаяDataSet->period);

}

};

}

#pragma once

using namespace System;

using namespace System::ComponentModel;

using namespace System::Collections;

using namespace System::Windows::Forms;

using namespace System::Data;

using namespace System::Drawing;

using namespace System::Data::SqlClient;

namespace My111 {

/// <summary>

/// Summary for Form_tem

///

/// WARNING: If you change the name of this class, you will need to change the

/// 'Resource File Name' property for the managed resource compiler tool

/// associated with all .resx files this class depends on. Otherwise,

/// the designers will not be able to interact properly with localized

/// resources associated with this form.

/// </summary>

public ref class Form_tem : public System::Windows::Forms::Form

{

public:

Form_tem(void)

{

InitializeComponent();

//

//TODO: Add the constructor code here

//

}

static int c12;

private: System::Windows::Forms::DataGridViewTextBoxColumn^ uktemaDataGridViewTextBoxColumn;

private: System::Windows::Forms::Button^ button2;

public:

private: System::Windows::Forms::DataGridViewTextBoxColumn^ temaDataGridViewTextBoxColumn;

protected:

/// <summary>

/// Clean up any resources being used.

/// </summary>

~Form_tem()

{

if (components)

{

delete components;

}

}

private: System::Windows::Forms::DataGridView^ dataGridView1;

private: My111::КлищевнаяDataSet^ КлищевнаяDataSet;

private: System::Windows::Forms::BindingSource^ temaBindingSource;

private: My111::КлищевнаяDataSetTableAdapters::TemaTableAdapter^ TemaTableAdapter;

private: System::Windows::Forms::Button^ button1;

private: System::ComponentModel::IContainer^ components;

protected:

private:

/// <summary>

/// Required designer variable.

/// </summary>

#pragma region Windows Form Designer generated code

/// <summary>

/// Required method for Designer support - do not modify

/// the contents of this method with the code editor.

/// </summary>

void InitializeComponent(void)

{

this->components = (gcnew System::ComponentModel::Container());

this->dataGridView1 = (gcnew System::Windows::Forms::DataGridView());

this->uktemaDataGridViewTextBoxColumn = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());

this->temaDataGridViewTextBoxColumn = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());

this->temaBindingSource = (gcnew System::Windows::Forms::BindingSource(this->components));

this->КлищевнаяDataSet = (gcnew My111::КлищевнаяDataSet());

this->TemaTableAdapter = (gcnew My111::КлищевнаяDataSetTableAdapters::TemaTableAdapter());

this->button1 = (gcnew System::Windows::Forms::Button());

this->button2 = (gcnew System::Windows::Forms::Button());

(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->dataGridView1))->BeginInit();

(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->temaBindingSource))->BeginInit();

(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->КлищевнаяDataSet))->BeginInit();

this->SuspendLayout();

//

// dataGridView1

//

this->dataGridView1->AutoGenerateColumns = false;

this->dataGridView1->ColumnHeadersHeightSizeMode = System::Windows::Forms::DataGridViewColumnHeadersHeightSizeMode::AutoSize;

this->dataGridView1->Columns->AddRange(gcnew cli::array< System::Windows::Forms::DataGridViewColumn^ >(2) {this->uktemaDataGridViewTextBoxColumn,

this->temaDataGridViewTextBoxColumn});

this->dataGridView1->DataSource = this->temaBindingSource;

this->dataGridView1->Location = System::Drawing::Point(16, 17);

this->dataGridView1->Name = L"dataGridView1";

this->dataGridView1->Size = System::Drawing::Size(240, 150);

this->dataGridView1->TabIndex = 0;

//

// uktemaDataGridViewTextBoxColumn

//

this->uktemaDataGridViewTextBoxColumn->DataPropertyName = L"uk_tema";

this->uktemaDataGridViewTextBoxColumn->HeaderText = L"uk_tema";

this->uktemaDataGridViewTextBoxColumn->Name = L"uktemaDataGridViewTextBoxColumn";

this->uktemaDataGridViewTextBoxColumn->Visible = false;

//

// temaDataGridViewTextBoxColumn

//

this->temaDataGridViewTextBoxColumn->DataPropertyName = L"Tema";

this->temaDataGridViewTextBoxColumn->HeaderText = L"Тема фотосъемки";

this->temaDataGridViewTextBoxColumn->Name = L"temaDataGridViewTextBoxColumn";

//

// temaBindingSource

//

this->temaBindingSource->DataMember = L"Tema";

this->temaBindingSource->DataSource = this->КлищевнаяDataSet;

//

// КлищевнаяDataSet

//

this->КлищевнаяDataSet->DataSetName = L"КлищевнаяDataSet";

this->КлищевнаяDataSet->SchemaSerializationMode = System::Data::SchemaSerializationMode::IncludeSchema;

//

// TemaTableAdapter

//

this->TemaTableAdapter->ClearBeforeFill = true;

//

// button1

//

this->button1->Location = System::Drawing::Point(63, 222);

this->button1->Name = L"button1";

this->button1->Size = System::Drawing::Size(136, 32);

this->button1->TabIndex = 1;

this->button1->Text = L"Закрыть";

this->button1->UseVisualStyleBackColor = true;

this->button1->Click += gcnew System::EventHandler(this, &Form_tem::button1_Click);

//

// button2

//

this->button2->Location = System::Drawing::Point(63, 183);

this->button2->Name = L"button2";

this->button2->Size = System::Drawing::Size(136, 33);

this->button2->TabIndex = 2;

this->button2->Text = L"Сохранить изменения";

this->button2->UseVisualStyleBackColor = true;

this->button2->Click += gcnew System::EventHandler(this, &Form_tem::button2_Click);

//

// Form_tem

//

this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);

this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;

this->ClientSize = System::Drawing::Size(273, 258);

this->Controls->Add(this->button2);

this->Controls->Add(this->button1);

this->Controls->Add(this->dataGridView1);

this->Name = L"Form_tem";

this->Text = L"Темы фотосъемок";

this->Load += gcnew System::EventHandler(this, &Form_tem::Form_tem_Load);

(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->dataGridView1))->EndInit();

(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->temaBindingSource))->EndInit();

(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->КлищевнаяDataSet))->EndInit();

this->ResumeLayout(false);

}

#pragma endregion

private: System::Void Form_tem_Load(System::Object^ sender, System::EventArgs^ e) {

// TODO: Данная строка кода позволяет загрузить данные в таблицу "КлищевнаяDataSet.Tema". При необходимости она может быть перемещена или удалена.

this->TemaTableAdapter->Fill(this->КлищевнаяDataSet->Tema);

}

private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {

DataRow^ row;

DataTable^ tem=this->КлищевнаяDataSet->Tema;

DataColumn^ c=this->КлищевнаяDataSet->Tema->uk_temaColumn;

int i=this->dataGridView1->CurrentRow->Index;

row=tem->Rows[i];

c12=System::Convert::ToInt16(row[c]);

this->Close();

}

private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {

this->TemaTableAdapter->Update(this->КлищевнаяDataSet->Tema);

}

};

}

#pragma once

#include "Form_foto.h"

#include "Form_per.h"

#include "Form_tem.h"

using namespace System;

using namespace System::ComponentModel;

using namespace System::Collections;

using namespace System::Windows::Forms;

using namespace System::Data;

using namespace System::Drawing;

namespace My111 {

/// <summary>

/// Summary for Form_tem1

///

/// WARNING: If you change the name of this class, you will need to change the

/// 'Resource File Name' property for the managed resource compiler tool

/// associated with all .resx files this class depends on. Otherwise,

/// the designers will not be able to interact properly with localized

/// resources associated with this form.

/// </summary>

public ref class Form_tem1 : public System::Windows::Forms::Form

{

public:

Form_tem1(void)

{

InitializeComponent();

//

//TODO: Add the constructor code here

//

}

protected:

/// <summary>

/// Clean up any resources being used.

/// </summary>

~Form_tem1()

{

if (components)

{

delete components;

}

}

private: System::Windows::Forms::Button^ button1;

private: System::Windows::Forms::Button^ button2;

private: System::Windows::Forms::Button^ button3;

private: System::Windows::Forms::Button^ button4;

protected:

private:

/// <summary>

/// Required designer variable.

/// </summary>

System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code

/// <summary>

/// Required method for Designer support - do not modify

/// the contents of this method with the code editor.

/// </summary>

void InitializeComponent(void)

{

this->button1 = (gcnew System::Windows::Forms::Button());

this->button2 = (gcnew System::Windows::Forms::Button());

this->button3 = (gcnew System::Windows::Forms::Button());

this->button4 = (gcnew System::Windows::Forms::Button());

this->SuspendLayout();

//

// button1

//

this->button1->Location = System::Drawing::Point(8, 16);

this->button1->Name = L"button1";

this->button1->Size = System::Drawing::Size(185, 23);

this->button1->TabIndex = 0;

this->button1->Text = L"Выбор фото";

this->button1->UseVisualStyleBackColor = true;

this->button1->Click += gcnew System::EventHandler(this, &Form_tem1::button1_Click);

//

// button2

//

this->button2->Location = System::Drawing::Point(10, 50);

this->button2->Name = L"button2";

this->button2->Size = System::Drawing::Size(183, 23);

this->button2->TabIndex = 1;

this->button2->Text = L"Выбор темы";

this->button2->UseVisualStyleBackColor = true;

this->button2->Click += gcnew System::EventHandler(this, &Form_tem1::button2_Click);

//

// button3

//

this->button3->Location = System::Drawing::Point(10, 86);

this->button3->Name = L"button3";

this->button3->Size = System::Drawing::Size(183, 23);

this->button3->TabIndex = 2;

this->button3->Text = L"Выбор периода";

this->button3->UseVisualStyleBackColor = true;

this->button3->Click += gcnew System::EventHandler(this, &Form_tem1::button3_Click);

//

// button4

//

this->button4->Location = System::Drawing::Point(11, 135);

this->button4->Name = L"button4";

this->button4->Size = System::Drawing::Size(182, 23);

this->button4->TabIndex = 3;

this->button4->Text = L"Подтвердить выбор";

this->button4->UseVisualStyleBackColor = true;

this->button4->Click += gcnew System::EventHandler(this, &Form_tem1::button4_Click);

//

// Form_tem1

//

this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);

this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;

this->ClientSize = System::Drawing::Size(206, 164);

this->Controls->Add(this->button4);

this->Controls->Add(this->button3);

this->Controls->Add(this->button2);

this->Controls->Add(this->button1);

this->Name = L"Form_tem1";

this->Text = L"Выбор данных для добавления в альбом";

this->ResumeLayout(false);

}

#pragma endregion

private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {

Form_foto^ ff=gcnew Form_foto();

ff->Show();

}

private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {

Form_tem^ ft=gcnew Form_tem();

ft->Show();

}

private: System::Void button3_Click(System::Object^ sender, System::EventArgs^ e) {

Form_per^ fp=gcnew Form_per();

fp->Show();

}

private: System::Void button4_Click(System::Object^ sender, System::EventArgs^ e) {

this->Close();

}

};

}

#pragma once

#using <mscorlib.dll>

#using <System.dll>

#using <System.Data.dll>

#using <System.Xml.dll>

#using <System.Data.dll>

using namespace System::Security::Permissions;

[assembly:SecurityPermissionAttribute(SecurityAction::RequestMinimum, SkipVerification=false)];

//

// This source code was auto-generated by xsd, Version=2.0.50727.42.

//

namespace My111 {

ref class КлищевнаяDataSet;

}

namespace My111 {

namespace КлищевнаяDataSetTableAdapters {

ref class albomTableAdapter;

ref class fotoTableAdapter;

ref class periodTableAdapter;

ref class TemaTableAdapter;

ref class albom1TableAdapter;

}

}

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]