Приложение 2. Текст программы
Текст программы
Surs.cpp #include "Form1.h"
namespace kurs { using namespace System; using namespace System::Windows::Forms;
[STAThread] int main(array<System::String ^> ^args) { Application::EnableVisualStyles(); Application::SetCompatibleTextRenderingDefault(false); Application::Run(gcnew Form1()); return 0; } } Office.h #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::IO; interface class Office { public: virtual void print(DataGridView^ a, int Row) = 0; virtual void Save(StreamWriter^ a) = 0; }; Mebel.h #pragma once #include"Office.h" ref class mebel : public Office { public: mebel(){} virtual ~mebel(){} virtual void print(DataGridView^ a, int Row) {} virtual void Save(StreamWriter^ a) {} protected: String^ Firm; // фирма String^ Colour; // цвет String^ Material; // материал float Price; // цена }; Seat.h #pragma once #include"Mebel.h" ref class Seat : public mebel // сиденье { public: Seat(){} virtual ~Seat(){} virtual void print(DataGridView^ a, int Row) override {} virtual void Save(StreamWriter^ a) override {} protected: String^ Upholstery; // обивка }; Cupboard.h #pragma once #include"Mebel.h" ref class Cupboard : public mebel // шкаф { public: Cupboard(){} virtual ~Cupboard(){} virtual void print(DataGridView^ a, int Row) override {} virtual void Save(StreamWriter^ a) override {} protected: String^ Types; // типы }; Table.h #pragma once #include"Mebel.h" ref class Table : public mebel // стол { public: Table(){} virtual ~Table(){} virtual void print(DataGridView^ a, int Row) override {} virtual void Save(StreamWriter^ a) override {} protected: String^ Lockers; // форма };
Armchair.h #pragma once #include"Seat.h" ref class Armchair : public Seat // кресло { public: Armchair(){} ~Armchair(){} Armchair(String^ firm, String^ colour, String^ material, float price, String^ upholstery, String^ mechanism); void print(DataGridView^ a, int Row) override; void Save(StreamWriter^ a) override; private: String^ Mechanism; // механизм поднятия-опускания };
Armchair::Armchair(String^ firm, String^ colour, String^ material, float price, String^ upholstery, String^ mechanism) { Firm = firm; Colour = colour; Material = material; Price = price; Upholstery = upholstery; Mechanism = mechanism; }
void Armchair::print(DataGridView^ a, int Row) { a->RowCount += 1; a->Rows[Row]->Cells[0]->Value = Firm; a->Rows[Row]->Cells[1]->Value = Colour; a->Rows[Row]->Cells[2]->Value = Material; a->Rows[Row]->Cells[3]->Value = Price; a->Rows[Row]->Cells[4]->Value = Upholstery; a->Rows[Row]->Cells[5]->Value = Mechanism; }
void Armchair::Save(StreamWriter^ a) { a->WriteLine(Firm); a->WriteLine(Colour); a->WriteLine(Material); a->WriteLine(Price); a->WriteLine(Upholstery); a->WriteLine(Mechanism); } Sofa.h #pragma once #include"Seat.h" ref class Sofa : public Seat // диван { public: Sofa(){} ~Sofa(){} Sofa(String^ firm, String^ colour, String^ material, float price, String^ upholstery, int seats); void print(DataGridView^ a, int Row) override; void Save(StreamWriter^ a) override; protected: int Seats; // мест для сиденья };
Sofa::Sofa(String^ firm, String^ colour, String^ material, float price, String^ upholstery, int seats) { Firm = firm; Colour = colour; Material = material; Price = price; Upholstery = upholstery; Seats = seats; }
void Sofa::print(DataGridView^ a, int Row) { a->RowCount += 1; a->Rows[Row]->Cells[0]->Value = Firm; a->Rows[Row]->Cells[1]->Value = Colour; a->Rows[Row]->Cells[2]->Value = Material; a->Rows[Row]->Cells[3]->Value = Price; a->Rows[Row]->Cells[4]->Value = Upholstery; a->Rows[Row]->Cells[5]->Value = Seats; }
void Sofa::Save(StreamWriter^ a) { a->WriteLine(Firm); a->WriteLine(Colour); a->WriteLine(Material); a->WriteLine(Price); a->WriteLine(Upholstery); a->WriteLine(Seats); }
Wardrobe.h #pragma once #include"Cupboard.h" ref class Wardrobe : public Cupboard // гардероб (шкаф для одежды) { public: Wardrobe(){} ~Wardrobe(){} Wardrobe(String^ firm, String^ colour, String^ material, float price, String^ types, double massa); void print(DataGridView^ a, int Row) override; void Save(StreamWriter^ a) override; private: double Massa; // вес };
Wardrobe::Wardrobe(String^ firm, String^ colour, String^ material, float price, String^ types, double massa) { Firm = firm; Colour = colour; Material = material; Price = price; Types = types; Massa = massa; }
void Wardrobe::print(DataGridView^ a, int Row) { a->RowCount += 1; a->Rows[Row]->Cells[0]->Value = Firm; a->Rows[Row]->Cells[1]->Value = Colour; a->Rows[Row]->Cells[2]->Value = Material; a->Rows[Row]->Cells[3]->Value = Price; a->Rows[Row]->Cells[4]->Value = Types; a->Rows[Row]->Cells[5]->Value = Massa; }
void Wardrobe::Save(StreamWriter^ a) { a->WriteLine(Firm); a->WriteLine(Colour); a->WriteLine(Material); a->WriteLine(Price); a->WriteLine(Types); a->WriteLine(Massa); } CabinetDocuments.h #pragma once #include"Cupboard.h" ref class CabinetDocuments : public Cupboard // шкаф для документации { public: CabinetDocuments(){} ~CabinetDocuments(){} CabinetDocuments(String^ firm, String^ colour, String^ material, float price, String^ types, String^ shevels); void print(DataGridView^ a, int Row) override; void Save(StreamWriter^ a) override; private: String^ Shevels; // полки };
CabinetDocuments::CabinetDocuments(String^ firm, String^ colour, String^ material, float price, String^ types, String^ shevels) { Firm = firm; Colour = colour; Material = material; Price = price; Types = types; Shevels = shevels; }
void CabinetDocuments::print(DataGridView^ a, int Row) { a->RowCount += 1; a->Rows[Row]->Cells[0]->Value = Firm; a->Rows[Row]->Cells[1]->Value = Colour; a->Rows[Row]->Cells[2]->Value = Material; a->Rows[Row]->Cells[3]->Value = Price; a->Rows[Row]->Cells[4]->Value = Types; a->Rows[Row]->Cells[5]->Value = Shevels; }
void CabinetDocuments::Save(StreamWriter^ a) { a->WriteLine(Firm); a->WriteLine(Colour); a->WriteLine(Material); a->WriteLine(Price); a->WriteLine(Shevels); a->WriteLine(Types); } ComputerTable.h #pragma once #include"Table.h" ref class ComputerTable : public Table // рабочий стол { public: ComputerTable(){} ~ComputerTable(){} ComputerTable(String^ firm, String^ colour, String^ material, float price, String^ lockers, String^ superstructure); void print(DataGridView^ a, int Row) override; void Save(StreamWriter^ a) override; private: String^ Superstructure; // надстройка над столом };
ComputerTable::ComputerTable(String^ firm, String^ colour, String^ material, float price, String^ lockers, String^ superstructure) { Firm = firm; Colour = colour; Material = material; Price = price; Lockers = lockers; Superstructure = superstructure; }
void ComputerTable::print(DataGridView^ a, int Row) { a->RowCount += 1; a->Rows[Row]->Cells[0]->Value = Firm; a->Rows[Row]->Cells[1]->Value = Colour; a->Rows[Row]->Cells[2]->Value = Material; a->Rows[Row]->Cells[3]->Value = Price; a->Rows[Row]->Cells[4]->Value = Lockers; a->Rows[Row]->Cells[5]->Value = Superstructure; }
void ComputerTable::Save(StreamWriter^ a) { a->WriteLine(Firm); a->WriteLine(Colour); a->WriteLine(Material); a->WriteLine(Price); a->WriteLine(Lockers); a->WriteLine(Superstructure); } WritingDesk.h #pragma once #include"Table.h" ref class WritingDesk : public Table // переговорный стол { public: WritingDesk(){} ~WritingDesk(){} WritingDesk(String^ firm, String^ colour, String^ material, float price, String^ lockers, int thickness); void print(DataGridView^ a, int Row) override; void Save(StreamWriter^ a) override; private: int Thickness; // количество мест };
WritingDesk::WritingDesk(String^ firm, String^ colour, String^ material, float price, String^ lockers, int thickness) { Firm = firm; Colour = colour; Material = material; Price = price; Lockers = lockers; Thickness = thickness; }
void WritingDesk::print(DataGridView^ a, int Row) { a->RowCount += 1; a->Rows[Row]->Cells[0]->Value = Firm; a->Rows[Row]->Cells[1]->Value = Colour; a->Rows[Row]->Cells[2]->Value = Material; a->Rows[Row]->Cells[3]->Value = Price; a->Rows[Row]->Cells[4]->Value = Lockers; a->Rows[Row]->Cells[5]->Value = Thickness; } Form1.h #pragma once #include"Office.h" #include"Armchair.h" #include"Sofa.h" #include"Wardrobe.h" #include"CabinetDocuments.h" #include"ComputerTable.h" #include"WritingDesk.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; using namespace System::IO; // для работы с файлами using namespace System::Text;
namespace kurs { /// <summary> /// Сводка для Form1 /// </summary> public ref class Form1 : public System::Windows::Forms::Form { public: Form1(void) { InitializeComponent(); // //TODO: добавьте код конструктора // }
protected: /// <summary> /// Освободить все используемые ресурсы. /// </summary> ~Form1() { if (components) { delete components; } } private: System::Windows::Forms::Button^ button1; private: System::Windows::Forms::Label^ label1; private: System::Windows::Forms::DataGridView^ dataGridView1; private: int RowNum1; private: int RowNum2; private: int RowNum3; private: int RowNum4; private: int RowNum5; private: int RowNum6; private: System::Windows::Forms::Label^ label3; private: System::Windows::Forms::Label^ label4; private: System::Windows::Forms::Label^ label5; private: System::Windows::Forms::Label^ label6; private: System::Windows::Forms::DataGridView^ dataGridView2; private: System::Windows::Forms::DataGridView^ dataGridView3; private: System::Windows::Forms::DataGridView^ dataGridView4; private: System::Windows::Forms::DataGridView^ dataGridView5; private: System::Windows::Forms::DataGridView^ dataGridView6; private: System::Windows::Forms::Label^ label7; private: System::Windows::Forms::TextBox^ textBox7; private: System::Windows::Forms::Button^ button2; private: System::Windows::Forms::Label^ label8; private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column1; private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column2; private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column3; private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column4; private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column5; private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column6; private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column7; private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column8; private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column9; private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column10; private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column11; private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column12; private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column13; private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column14; private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column15; private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column16; private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column17; private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column18; private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column19; private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column20; private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column21; private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column22; private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column23; private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column24; private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column25; private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column26; private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column27; private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column28; private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column29; private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column30; private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column31; private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column32; private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column33; private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column34; private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column35; private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column36;
void Save_Armchair(DataGridView^ a) { try{ Stream^Save; SaveFileDialog^ SaveFileDialog1 = gcnew SaveFileDialog(); SaveFileDialog1->Filter = "Текстовый документ (*.txt)|*.txt"; SaveFileDialog1->FilterIndex = 1; SaveFileDialog1->RestoreDirectory = true; SaveFileDialog1->CreatePrompt = true; SaveFileDialog1->OverwritePrompt = true; SaveFileDialog1->FileName = "Кресла"; if (SaveFileDialog1->ShowDialog() == System::Windows::Forms::DialogResult::OK) { Save = SaveFileDialog1->OpenFile(); if (Save != nullptr) { StreamWriter^ sw = gcnew StreamWriter(Save); for (int i = 0; i < a->RowCount - 1; i++){ String^ fr = a->Rows[i]->Cells[0]->Value->ToString(); String^ col = a->Rows[i]->Cells[1]->Value->ToString(); String^ mat = a->Rows[i]->Cells[2]->Value->ToString(); float pr = System::Convert::ToDouble(a->Rows[i]->Cells[3]->Value); String^ up = a->Rows[i]->Cells[4]->Value->ToString(); String^ mec = a->Rows[i]->Cells[5]->Value->ToString(); Office^ p = gcnew Armchair(fr, col, mat, pr, up, mec); p->Save(sw); } sw->Close(); } Save->Close(); } } catch (Exception^ e) { MessageBox::Show("Ошибка при сохранении данных в тектовый файл!\nВозможно в поле \"Цена, руб.\" записаны буквы, вместо цифр.", "Ошибка", MessageBoxButtons::OK, MessageBoxIcon::Error); } }
void Save_Sofa(DataGridView^ a) { try{ Stream^Save; SaveFileDialog^ SaveFileDialog1 = gcnew SaveFileDialog(); SaveFileDialog1->Filter = "Текстовый документ (*.txt)|*.txt"; SaveFileDialog1->FilterIndex = 1; SaveFileDialog1->RestoreDirectory = true; SaveFileDialog1->CreatePrompt = true; SaveFileDialog1->OverwritePrompt = true; SaveFileDialog1->FileName = "Диваны"; if (SaveFileDialog1->ShowDialog() == System::Windows::Forms::DialogResult::OK) { Save = SaveFileDialog1->OpenFile(); if (Save != nullptr) { StreamWriter^ sw = gcnew StreamWriter(Save); for (int i = 0; i < a->RowCount - 1; i++){ String^ fr = a->Rows[i]->Cells[0]->Value->ToString(); String^ col = a->Rows[i]->Cells[1]->Value->ToString(); String^ mat = a->Rows[i]->Cells[2]->Value->ToString(); float pr = System::Convert::ToDouble(a->Rows[i]->Cells[3]->Value); String^ up = a->Rows[i]->Cells[4]->Value->ToString(); int pl = System::Convert::ToInt32(a->Rows[i]->Cells[5]->Value); Office^ p = gcnew Sofa(fr, col, mat, pr, up, pl); p->Save(sw); } sw->Close(); } Save->Close(); } } catch (Exception^ e) { MessageBox::Show("Ошибка при сохранении данных в тектовый файл!\nВозможно в поле \"Цена, руб.\" записаны буквы, вместо цифр." "\nВозможно в поле \"Посадочные места\" записаны буквы или вещественное число, вместо цифр.", "Ошибка", MessageBoxButtons::OK, MessageBoxIcon::Error); } }
void Save_Wardrobe(DataGridView^ a) { try{ Stream^Save; SaveFileDialog^ SaveFileDialog1 = gcnew SaveFileDialog(); SaveFileDialog1->Filter = "Текстовый документ (*.txt)|*.txt"; SaveFileDialog1->FilterIndex = 1; SaveFileDialog1->RestoreDirectory = true; SaveFileDialog1->CreatePrompt = true; SaveFileDialog1->OverwritePrompt = true; SaveFileDialog1->FileName = "Гардеробы"; if (SaveFileDialog1->ShowDialog() == System::Windows::Forms::DialogResult::OK) { Save = SaveFileDialog1->OpenFile(); if (Save != nullptr) { StreamWriter^ sw = gcnew StreamWriter(Save); for (int i = 0; i < a->RowCount - 1; i++){ String^ fr = a->Rows[i]->Cells[0]->Value->ToString(); String^ col = a->Rows[i]->Cells[1]->Value->ToString(); String^ mat = a->Rows[i]->Cells[2]->Value->ToString(); float pr = System::Convert::ToDouble(a->Rows[i]->Cells[3]->Value); String^ tp = a->Rows[i]->Cells[4]->Value->ToString(); double ms = System::Convert::ToDouble(a->Rows[i]->Cells[5]->Value); Office^ p = gcnew Wardrobe(fr, col, mat, pr, tp, ms); p->Save(sw); } sw->Close(); } Save->Close(); } } catch (Exception^ e) { MessageBox::Show("Ошибка при сохранении данных в тектовый файл!\nВозможно в поле \"Цена, руб.\" записаны буквы, вместо цифр." "\nВозможно в поле \"Вес, кг\" записаны буквы, вместо цифр.", "Ошибка", MessageBoxButtons::OK, MessageBoxIcon::Error); } }
void Save_CabinetDocuments(DataGridView^ a) { try{ Stream^Save; SaveFileDialog^ SaveFileDialog1 = gcnew SaveFileDialog(); SaveFileDialog1->Filter = "Текстовый документ (*.txt)|*.txt"; SaveFileDialog1->FilterIndex = 1; SaveFileDialog1->RestoreDirectory = true; SaveFileDialog1->CreatePrompt = true; SaveFileDialog1->OverwritePrompt = true; SaveFileDialog1->FileName = "Шкафы для документации"; if (SaveFileDialog1->ShowDialog() == System::Windows::Forms::DialogResult::OK) { Save = SaveFileDialog1->OpenFile(); if (Save != nullptr) { StreamWriter^ sw = gcnew StreamWriter(Save); for (int i = 0; i < a->RowCount - 1; i++){ String^ fr = a->Rows[i]->Cells[0]->Value->ToString(); String^ col = a->Rows[i]->Cells[1]->Value->ToString(); String^ mat = a->Rows[i]->Cells[2]->Value->ToString(); float pr = System::Convert::ToDouble(a->Rows[i]->Cells[3]->Value); String^ tp = a->Rows[i]->Cells[4]->Value->ToString(); String^ sh = a->Rows[i]->Cells[5]->Value->ToString(); Office^ p = gcnew CabinetDocuments(fr, col, mat, pr, tp, sh); p->Save(sw); } sw->Close(); } Save->Close(); } } catch (Exception^ e) { MessageBox::Show("Ошибка при сохранении данных в тектовый файл!\nВозможно в поле \"Цена, руб.\" записаны буквы, вместо цифр.", "Ошибка", MessageBoxButtons::OK, MessageBoxIcon::Error); } }
void Save_ComputerTable(DataGridView^ a) { try{ Stream^Save; SaveFileDialog^ SaveFileDialog1 = gcnew SaveFileDialog(); SaveFileDialog1->Filter = "Текстовый документ (*.txt)|*.txt"; SaveFileDialog1->FilterIndex = 1; SaveFileDialog1->RestoreDirectory = true; SaveFileDialog1->CreatePrompt = true; SaveFileDialog1->OverwritePrompt = true; SaveFileDialog1->FileName = "Рабочие столы"; if (SaveFileDialog1->ShowDialog() == System::Windows::Forms::DialogResult::OK) { Save = SaveFileDialog1->OpenFile(); if (Save != nullptr) { StreamWriter^ sw = gcnew StreamWriter(Save); for (int i = 0; i < a->RowCount - 1; i++){ String^ fr = a->Rows[i]->Cells[0]->Value->ToString(); String^ col = a->Rows[i]->Cells[1]->Value->ToString(); String^ mat = a->Rows[i]->Cells[2]->Value->ToString(); float pr = System::Convert::ToDouble(a->Rows[i]->Cells[3]->Value); String^ form = a->Rows[i]->Cells[4]->Value->ToString(); String^ sup = a->Rows[i]->Cells[5]->Value->ToString(); Office^ p = gcnew ComputerTable(fr, col, mat, pr, form, sup); p->Save(sw); } sw->Close(); } Save->Close(); } } catch (Exception^ e) { MessageBox::Show("Ошибка при сохранении данных в тектовый файл!\nВозможно в поле \"Цена, руб.\" записаны буквы, вместо цифр.", "Ошибка", MessageBoxButtons::OK, MessageBoxIcon::Error); } }
void Save_WritingDesk(DataGridView^ a) { try{ Stream^Save; SaveFileDialog^ SaveFileDialog1 = gcnew SaveFileDialog(); SaveFileDialog1->Filter = "Текстовый документ (*.txt)|*.txt"; SaveFileDialog1->FilterIndex = 1; SaveFileDialog1->RestoreDirectory = true; SaveFileDialog1->CreatePrompt = true; SaveFileDialog1->OverwritePrompt = true; SaveFileDialog1->FileName = "Переговорные столы"; if (SaveFileDialog1->ShowDialog() == System::Windows::Forms::DialogResult::OK) { Save = SaveFileDialog1->OpenFile(); if (Save != nullptr) { StreamWriter^ sw = gcnew StreamWriter(Save); for (int i = 0; i < a->RowCount - 1; i++){ String^ fr = a->Rows[i]->Cells[0]->Value->ToString(); String^ col = a->Rows[i]->Cells[1]->Value->ToString(); String^ mat = a->Rows[i]->Cells[2]->Value->ToString(); float pr = System::Convert::ToDouble(a->Rows[i]->Cells[3]->Value); String^ form = a->Rows[i]->Cells[4]->Value->ToString(); int tik = System::Convert::ToInt32(a->Rows[i]->Cells[5]->Value); Office^ p = gcnew WritingDesk(fr, col, mat, pr, form, tik); p->Save(sw); } sw->Close(); } Save->Close(); } } catch (Exception^ e) { MessageBox::Show("Ошибка при сохранении данных в тектовый файл!\nВозможно в поле \"Цена, руб.\" записаны буквы, вместо цифр." "\nВозможно в поле \"Количество мест\" записаны буквы и вещественное число, вместо цифр.", "Ошибка", MessageBoxButtons::OK, MessageBoxIcon::Error); } }
void Open_Armchair(DataGridView^ a) { try{ Stream^ Open; OpenFileDialog^ openFileDialog1 = gcnew OpenFileDialog(); openFileDialog1->Filter = "Текстовый документ (*.txt)|*.txt"; openFileDialog1->FilterIndex = 1; openFileDialog1->RestoreDirectory = true; if (openFileDialog1->ShowDialog() == System::Windows::Forms::DialogResult::OK) { Open = openFileDialog1->OpenFile(); if (Open != nullptr) { StreamReader^ sr = gcnew StreamReader(Open); while (!sr->EndOfStream) { String^ fr = sr->ReadLine(); String^ col = sr->ReadLine(); String^ mat = sr->ReadLine(); float pr = System::Convert::ToDouble(sr->ReadLine()); String^ up = sr->ReadLine(); String^ mec = sr->ReadLine(); Office^ p = gcnew Armchair(fr, col, mat, pr, up, mec); p->print(dataGridView1, RowNum1); RowNum1++; } } Open->Close(); } } catch (Exception^ e) { MessageBox::Show("Ошибка при открытии файла!\nВозможно в поле \"Цена, руб.\" записаны буквы, вместо цифр.", "Ошибка", MessageBoxButtons::OK, MessageBoxIcon::Error); } }
void Open_Sofa(DataGridView^ a) { try{ Stream^ Open; OpenFileDialog^ openFileDialog1 = gcnew OpenFileDialog(); openFileDialog1->Filter = "Текстовый документ (*.txt)|*.txt"; openFileDialog1->FilterIndex = 1; openFileDialog1->RestoreDirectory = true; if (openFileDialog1->ShowDialog() == System::Windows::Forms::DialogResult::OK) { Open = openFileDialog1->OpenFile(); if (Open != nullptr) { StreamReader^ sr = gcnew StreamReader(Open); while (!sr->EndOfStream) { String^ fr = sr->ReadLine(); String^ col = sr->ReadLine(); String^ mat = sr->ReadLine(); float pr = System::Convert::ToDouble(sr->ReadLine()); String^ up = sr->ReadLine(); int pl = System::Convert::ToInt32 (sr->ReadLine()); Office^ p = gcnew Sofa(fr, col, mat, pr, up, pl); p->print(dataGridView2, RowNum2); RowNum2++;
} } Open->Close(); } } catch (Exception^ e) { MessageBox::Show("Ошибка при открытии файла!\nВозможно в поле \"Цена, руб.\" записаны буквы, вместо цифр." "\nВозможно в поле \"Посадочные места\" записаны буквы или вещественное число, вместо цифр.", "Ошибка", MessageBoxButtons::OK, MessageBoxIcon::Error); } }
void Open_Wardrobe(DataGridView^ a) { try{ Stream^ Open; OpenFileDialog^ openFileDialog1 = gcnew OpenFileDialog(); openFileDialog1->Filter = "Текстовый документ (*.txt)|*.txt"; openFileDialog1->FilterIndex = 1; openFileDialog1->RestoreDirectory = true; if (openFileDialog1->ShowDialog() == System::Windows::Forms::DialogResult::OK) { Open = openFileDialog1->OpenFile(); if (Open != nullptr) { StreamReader^ sr = gcnew StreamReader(Open); while (!sr->EndOfStream) { String^ fr = sr->ReadLine(); String^ col = sr->ReadLine(); String^ mat = sr->ReadLine(); float pr = System::Convert::ToDouble(sr->ReadLine()); String^ tp = sr->ReadLine(); double ms = System::Convert::ToDouble(sr->ReadLine()); Office^ p = gcnew Wardrobe(fr, col, mat, pr, tp, ms); p->print(dataGridView3, RowNum3); RowNum3++;
} } Open->Close(); } } catch (Exception^ e) { MessageBox::Show("Ошибка при открытии файла!\nВозможно в поле \"Цена, руб.\" записаны буквы, вместо цифр." "\nВозможно в поле \"Вес, кг\" записаны буквы, вместо цифр.", "Ошибка", MessageBoxButtons::OK, MessageBoxIcon::Error); } }
void Open_CabinetDocuments(DataGridView^ a) { try{ Stream^ Open; OpenFileDialog^ openFileDialog1 = gcnew OpenFileDialog(); openFileDialog1->Filter = "Текстовый документ (*.txt)|*.txt"; openFileDialog1->FilterIndex = 1; openFileDialog1->RestoreDirectory = true; if (openFileDialog1->ShowDialog() == System::Windows::Forms::DialogResult::OK) { Open = openFileDialog1->OpenFile(); if (Open != nullptr) { StreamReader^ sr = gcnew StreamReader(Open); while (!sr->EndOfStream) { String^ fr = sr->ReadLine(); String^ col = sr->ReadLine(); String^ mat = sr->ReadLine(); float pr = System::Convert::ToDouble(sr->ReadLine()); String^ tp = sr->ReadLine(); String^ sh = sr->ReadLine(); Office^ p = gcnew CabinetDocuments(fr, col, mat, pr, tp, sh); p->print(dataGridView4, RowNum4); RowNum4++; } } Open->Close(); } } catch (Exception^ e) { MessageBox::Show("Ошибка при открытии файла!\nВозможно в поле \"Цена, руб.\" записаны буквы, вместо цифр.", "Ошибка", MessageBoxButtons::OK, MessageBoxIcon::Error); } }
void Open_ComputerTable(DataGridView^ a) { try{ Stream^ Open; OpenFileDialog^ openFileDialog1 = gcnew OpenFileDialog(); openFileDialog1->Filter = "Текстовый документ (*.txt)|*.txt"; openFileDialog1->FilterIndex = 1; openFileDialog1->RestoreDirectory = true; if (openFileDialog1->ShowDialog() == System::Windows::Forms::DialogResult::OK) { Open = openFileDialog1->OpenFile(); if (Open != nullptr) { StreamReader^ sr = gcnew StreamReader(Open); while (!sr->EndOfStream) { String^ fr = sr->ReadLine(); String^ col = sr->ReadLine(); String^ mat = sr->ReadLine(); float pr = System::Convert::ToDouble(sr->ReadLine()); String^ form = sr->ReadLine(); String^ sup = sr->ReadLine(); Office^ p = gcnew ComputerTable(fr, col, mat, pr, form, sup); p->print(dataGridView5, RowNum5); RowNum5++; } } Open->Close(); } } catch (Exception^ e) { MessageBox::Show("Ошибка при открытии файла!\nВозможно в поле \"Цена, руб.\" записаны буквы, вместо цифр.", "Ошибка", MessageBoxButtons::OK, MessageBoxIcon::Error); } }
void Open_WritingDesk(DataGridView^ a) { try{ Stream^ Open; OpenFileDialog^ openFileDialog1 = gcnew OpenFileDialog(); openFileDialog1->Filter = "Текстовый документ (*.txt)|*.txt"; openFileDialog1->FilterIndex = 1; openFileDialog1->RestoreDirectory = true; if (openFileDialog1->ShowDialog() == System::Windows::Forms::DialogResult::OK) { Open = openFileDialog1->OpenFile(); if (Open != nullptr) { StreamReader^ sr = gcnew StreamReader(Open); while (!sr->EndOfStream) { String^ fr = sr->ReadLine(); String^ col = sr->ReadLine(); String^ mat = sr->ReadLine(); float pr = System::Convert::ToDouble(sr->ReadLine()); String^ form = sr->ReadLine(); int tik = System::Convert::ToInt32(sr->ReadLine()); Office^ p = gcnew WritingDesk(fr, col, mat, pr, form, tik); p->print(dataGridView6, RowNum6); RowNum6++;
} } Open->Close(); } } catch (Exception^ e) { MessageBox::Show("Ошибка при открытии файла!\nВозможно в поле \"Цена, руб.\" записаны буквы, вместо цифр." "\nВозможно в поле \"Количество мест\" записаны буквы и вещественное число, вместо цифр.", "Ошибка", MessageBoxButtons::OK, MessageBoxIcon::Error); } }
private: System::Windows::Forms::Label^ label2;
public: System::Windows::Forms::TextBox^ textBox1; public: System::Windows::Forms::TextBox^ textBox2;
public:
public: System::Windows::Forms::TextBox^ textBox3; private: public: System::Windows::Forms::TextBox^ textBox4; public: System::Windows::Forms::TextBox^ textBox5;
public:
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::ToolStripMenuItem^ удалитьСтрокуToolStripMenuItem; private: System::Windows::Forms::ToolStripMenuItem^ очиститьToolStripMenuItem; private: System::Windows::Forms::ToolStripMenuItem^ выходToolStripMenuItem; private: System::Windows::Forms::ComboBox^ comboBox1;
public: System::Windows::Forms::TextBox^ textBox6; private:
private: protected:
private: /// <summary> /// Требуется переменная конструктора. /// </summary> System::ComponentModel::Container ^components;
#pragma region Windows Form Designer generated code /// <summary> /// Обязательный метод для поддержки конструктора - не изменяйте /// содержимое данного метода при помощи редактора кода. /// </summary> void InitializeComponent(void) { this->button1 = (gcnew System::Windows::Forms::Button()); this->label1 = (gcnew System::Windows::Forms::Label()); this->dataGridView1 = (gcnew System::Windows::Forms::DataGridView()); this->Column1 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn()); this->Column2 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn()); this->Column3 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn()); this->Column4 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn()); this->Column5 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn()); this->Column6 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn()); this->label2 = (gcnew System::Windows::Forms::Label()); this->textBox1 = (gcnew System::Windows::Forms::TextBox()); this->textBox2 = (gcnew System::Windows::Forms::TextBox()); this->textBox3 = (gcnew System::Windows::Forms::TextBox()); this->textBox4 = (gcnew System::Windows::Forms::TextBox()); this->textBox5 = (gcnew System::Windows::Forms::TextBox()); 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->удалитьСтрокуToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->очиститьToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->выходToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->comboBox1 = (gcnew System::Windows::Forms::ComboBox()); this->textBox6 = (gcnew System::Windows::Forms::TextBox()); this->label3 = (gcnew System::Windows::Forms::Label()); this->label4 = (gcnew System::Windows::Forms::Label()); this->label5 = (gcnew System::Windows::Forms::Label()); this->label6 = (gcnew System::Windows::Forms::Label()); this->dataGridView2 = (gcnew System::Windows::Forms::DataGridView()); this->Column7 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn()); this->Column8 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn()); this->Column9 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn()); this->Column10 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn()); this->Column11 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn()); this->Column12 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn()); this->dataGridView3 = (gcnew System::Windows::Forms::DataGridView()); this->Column13 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn()); this->Column14 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn()); this->Column15 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn()); this->Column16 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn()); this->Column17 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn()); this->Column18 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn()); this->dataGridView4 = (gcnew System::Windows::Forms::DataGridView()); this->Column19 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn()); this->Column20 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn()); this->Column21 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn()); this->Column22 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn()); this->Column23 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn()); this->Column24 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn()); this->dataGridView5 = (gcnew System::Windows::Forms::DataGridView()); this->Column25 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn()); this->Column26 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn()); this->Column27 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn()); this->Column28 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn()); this->Column29 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn()); this->Column30 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn()); this->dataGridView6 = (gcnew System::Windows::Forms::DataGridView()); this->label7 = (gcnew System::Windows::Forms::Label()); this->textBox7 = (gcnew System::Windows::Forms::TextBox()); this->button2 = (gcnew System::Windows::Forms::Button()); this->label8 = (gcnew System::Windows::Forms::Label()); this->Column31 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn()); this->Column32 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn()); this->Column33 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn()); this->Column34 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn()); this->Column35 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn()); this->Column36 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn()); (cli::safe_cast<System::ComponentModel::ISupportInitialize^>(this->dataGridView1))->BeginInit(); this->menuStrip1->SuspendLayout(); (cli::safe_cast<System::ComponentModel::ISupportInitialize^>(this->dataGridView2))->BeginInit(); (cli::safe_cast<System::ComponentModel::ISupportInitialize^>(this->dataGridView3))->BeginInit(); (cli::safe_cast<System::ComponentModel::ISupportInitialize^>(this->dataGridView4))->BeginInit(); (cli::safe_cast<System::ComponentModel::ISupportInitialize^>(this->dataGridView5))->BeginInit(); (cli::safe_cast<System::ComponentModel::ISupportInitialize^>(this->dataGridView6))->BeginInit(); this->SuspendLayout(); // // button1 // this->button1->Location = System::Drawing::Point(12, 96); this->button1->Name = L"button1"; this->button1->Size = System::Drawing::Size(75, 23); this->button1->TabIndex = 0; this->button1->Text = L"Добавить"; this->button1->UseVisualStyleBackColor = true; this->button1->Click += gcnew System::EventHandler(this, &Form1::button1_Click); // // label1 // this->label1->AutoSize = true; this->label1->Location = System::Drawing::Point(9, 122); this->label1->Name = L"label1"; this->label1->Size = System::Drawing::Size(44, 13); this->label1->TabIndex = 1; this->label1->Text = L"Фирма"; // // dataGridView1 // this->dataGridView1->BackgroundColor = System::Drawing::Color::White; this->dataGridView1->ColumnHeadersHeightSizeMode = System::Windows::Forms::DataGridViewColumnHeadersHeightSizeMode::AutoSize; this->dataGridView1->Columns->AddRange(gcnew cli::array< System::Windows::Forms::DataGridViewColumn^ >(6) { this->Column1, this->Column2, this->Column3, this->Column4, this->Column5, this->Column6 }); this->dataGridView1->GridColor = System::Drawing::Color::Gray; this->dataGridView1->Location = System::Drawing::Point(149, 69); this->dataGridView1->Name = L"dataGridView1"; this->dataGridView1->RowHeadersVisible = false; this->dataGridView1->Size = System::Drawing::Size(605, 284); this->dataGridView1->TabIndex = 2; // // Column1 // this->Column1->HeaderText = L"Фирма"; this->Column1->Name = L"Column1"; // // Column2 // this->Column2->HeaderText = L"Цвет"; this->Column2->Name = L"Column2"; this->Column2->Resizable = System::Windows::Forms::DataGridViewTriState::True; // // Column3 // this->Column3->HeaderText = L"Материал"; this->Column3->Name = L"Column3"; // // Column4 // this->Column4->HeaderText = L"Цена, руб."; this->Column4->Name = L"Column4"; // // Column5 // this->Column5->HeaderText = L"Обивка"; this->Column5->Name = L"Column5"; // // Column6 // this->Column6->HeaderText = L"Механизм"; this->Column6->Name = L"Column6"; // // label2 // this->label2->AutoSize = true; this->label2->Location = System::Drawing::Point(9, 161); this->label2->Name = L"label2"; this->label2->Size = System::Drawing::Size(32, 13); this->label2->TabIndex = 4; this->label2->Text = L"Цвет"; // // textBox1 // this->textBox1->Location = System::Drawing::Point(12, 138); this->textBox1->Name = L"textBox1"; this->textBox1->Size = System::Drawing::Size(131, 20); this->textBox1->TabIndex = 7; // // textBox2 // this->textBox2->Location = System::Drawing::Point(12, 177); this->textBox2->Name = L"textBox2"; this->textBox2->Size = System::Drawing::Size(131, 20); this->textBox2->TabIndex = 8; // // textBox3 // this->textBox3->Location = System::Drawing::Point(12, 216); this->textBox3->Name = L"textBox3"; this->textBox3->Size = System::Drawing::Size(131, 20); this->textBox3->TabIndex = 10; // // textBox4 // this->textBox4->Location = System::Drawing::Point(12, 255); this->textBox4->Name = L"textBox4"; this->textBox4->Size = System::Drawing::Size(131, 20); this->textBox4->TabIndex = 11; // // textBox5 // this->textBox5->Location = System::Drawing::Point(12, 294); this->textBox5->Name = L"textBox5"; this->textBox5->Size = System::Drawing::Size(131, 20); this->textBox5->TabIndex = 12; // // menuStrip1 // this->menuStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(1) { this->менюToolStripMenuItem }); this->menuStrip1->Location = System::Drawing::Point(0, 0); this->menuStrip1->Name = L"menuStrip1"; this->menuStrip1->Size = System::Drawing::Size(766, 24); this->menuStrip1->TabIndex = 15; this->menuStrip1->Text = L"menuStrip1"; // // менюToolStripMenuItem // this->менюToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(5) { this->открытьToolStripMenuItem, this->сохранитьToolStripMenuItem, this->удалитьСтрокуToolStripMenuItem, this->очиститьToolStripMenuItem, this->выходToolStripMenuItem }); this->менюToolStripMenuItem->Name = L"менюToolStripMenuItem"; this->менюToolStripMenuItem->Size = System::Drawing::Size(53, 20); this->менюToolStripMenuItem->Text = L"Меню"; // // открытьToolStripMenuItem // this->открытьToolStripMenuItem->Name = L"открытьToolStripMenuItem"; this->открытьToolStripMenuItem->Size = System::Drawing::Size(158, 22); 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(158, 22); this->сохранитьToolStripMenuItem->Text = L"Сохранить"; this->сохранитьToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::сохранитьToolStripMenuItem_Click_1); // // удалитьСтрокуToolStripMenuItem // this->удалитьСтрокуToolStripMenuItem->Name = L"удалитьСтрокуToolStripMenuItem"; this->удалитьСтрокуToolStripMenuItem->Size = System::Drawing::Size(158, 22); 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(158, 22); this->очиститьToolStripMenuItem->Text = L"Очистить"; this->очиститьToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::очиститьToolStripMenuItem_Click_1); // // выходToolStripMenuItem // this->выходToolStripMenuItem->Name = L"выходToolStripMenuItem"; this->выходToolStripMenuItem->Size = System::Drawing::Size(158, 22); this->выходToolStripMenuItem->Text = L"Выход"; this->выходToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::выходToolStripMenuItem_Click); // // comboBox1 // this->comboBox1->DropDownStyle = System::Windows::Forms::ComboBoxStyle::DropDownList; this->comboBox1->FormattingEnabled = true; this->comboBox1->Items->AddRange(gcnew cli::array< System::Object^ >(6) { L"Кресло", L"Диван", L"Гардероб", L"Шкаф для документации", L"Рабочий стол", L"Переговорный стол" }); this->comboBox1->Location = System::Drawing::Point(12, 69); this->comboBox1->Name = L"comboBox1"; this->comboBox1->Size = System::Drawing::Size(131, 21); this->comboBox1->TabIndex = 16; this->comboBox1->SelectedIndexChanged += gcnew System::EventHandler(this, &Form1::comboBox1_SelectedIndexChanged); // // textBox6 // this->textBox6->Location = System::Drawing::Point(12, 333); this->textBox6->Name = L"textBox6"; this->textBox6->Size = System::Drawing::Size(131, 20); this->textBox6->TabIndex = 17; // // label3 // this->label3->AutoSize = true; this->label3->Location = System::Drawing::Point(9, 200); this->label3->Name = L"label3"; this->label3->Size = System::Drawing::Size(57, 13); this->label3->TabIndex = 18; this->label3->Text = L"Материал"; // // label4 // this->label4->AutoSize = true; this->label4->Location = System::Drawing::Point(9, 239); this->label4->Name = L"label4"; this->label4->Size = System::Drawing::Size(62, 13); this->label4->TabIndex = 19; this->label4->Text = L"Цена, руб. "; // // label5 // this->label5->AutoSize = true; this->label5->Location = System::Drawing::Point(9, 278); this->label5->Name = L"label5"; this->label5->Size = System::Drawing::Size(35, 13); this->label5->TabIndex = 20; this->label5->Text = L"label5"; // // label6 // this->label6->AutoSize = true; this->label6->Location = System::Drawing::Point(9, 317); this->label6->Name = L"label6"; this->label6->Size = System::Drawing::Size(35, 13); this->label6->TabIndex = 21; this->label6->Text = L"label6"; // // dataGridView2 // this->dataGridView2->BackgroundColor = System::Drawing::Color::White; this->dataGridView2->ColumnHeadersHeightSizeMode = System::Windows::Forms::DataGridViewColumnHeadersHeightSizeMode::AutoSize; this->dataGridView2->Columns->AddRange(gcnew cli::array< System::Windows::Forms::DataGridViewColumn^ >(6) { this->Column7, this->Column8, this->Column9, this->Column10, this->Column11, this->Column12 }); this->dataGridView2->Location = System::Drawing::Point(149, 69); this->dataGridView2->Name = L"dataGridView2"; this->dataGridView2->RowHeadersVisible = false; this->dataGridView2->Size = System::Drawing::Size(605, 284); this->dataGridView2->TabIndex = 22; this->dataGridView2->Visible = false; // // Column7 // this->Column7->HeaderText = L"Фирма"; this->Column7->Name = L"Column7"; // // Column8 // this->Column8->HeaderText = L"Цвет"; this->Column8->Name = L"Column8"; // // Column9 // this->Column9->HeaderText = L"Материал"; this->Column9->Name = L"Column9"; // // Column10 // this->Column10->HeaderText = L"Цена, руб."; this->Column10->Name = L"Column10"; // // Column11 // this->Column11->HeaderText = L"Обивка"; this->Column11->Name = L"Column11"; // // Column12 // this->Column12->HeaderText = L"Посадочные места"; this->Column12->Name = L"Column12"; // // dataGridView3 // this->dataGridView3->BackgroundColor = System::Drawing::Color::White; this->dataGridView3->ColumnHeadersHeightSizeMode = System::Windows::Forms::DataGridViewColumnHeadersHeightSizeMode::AutoSize; this->dataGridView3->Columns->AddRange(gcnew cli::array< System::Windows::Forms::DataGridViewColumn^ >(6) { this->Column13, this->Column14, this->Column15, this->Column16, this->Column17, this->Column18 }); this->dataGridView3->Location = System::Drawing::Point(149, 69); this->dataGridView3->Name = L"dataGridView3"; this->dataGridView3->RowHeadersVisible = false; this->dataGridView3->Size = System::Drawing::Size(605, 284); this->dataGridView3->TabIndex = 23; // // Column13 // this->Column13->HeaderText = L"Фирма"; this->Column13->Name = L"Column13"; // // Column14 // this->Column14->HeaderText = L"Цвет"; this->Column14->Name = L"Column14"; // // Column15 // this->Column15->HeaderText = L"Материал"; this->Column15->Name = L"Column15"; // // Column16 // this->Column16->HeaderText = L"Цена, руб."; this->Column16->Name = L"Column16"; // // Column17 // this->Column17->HeaderText = L"Тип"; this->Column17->Name = L"Column17"; // // Column18 // this->Column18->HeaderText = L"Вес, кг"; this->Column18->Name = L"Column18"; // // dataGridView4 // this->dataGridView4->BackgroundColor = System::Drawing::Color::White; this->dataGridView4->ColumnHeadersHeightSizeMode = System::Windows::Forms::DataGridViewColumnHeadersHeightSizeMode::AutoSize; this->dataGridView4->Columns->AddRange(gcnew cli::array< System::Windows::Forms::DataGridViewColumn^ >(6) { this->Column19, this->Column20, this->Column21, this->Column22, this->Column23, this->Column24 }); this->dataGridView4->Location = System::Drawing::Point(149, 69); this->dataGridView4->Name = L"dataGridView4"; this->dataGridView4->RowHeadersVisible = false; this->dataGridView4->Size = System::Drawing::Size(605, 284); this->dataGridView4->TabIndex = 24; // // Column19 // this->Column19->HeaderText = L"Фирма"; this->Column19->Name = L"Column19"; // // Column20 // this->Column20->HeaderText = L"Цвет"; this->Column20->Name = L"Column20"; // // Column21 // this->Column21->HeaderText = L"Материал"; this->Column21->Name = L"Column21"; // // Column22 // this->Column22->HeaderText = L"Цена, руб."; this->Column22->Name = L"Column22"; // // Column23 // this->Column23->HeaderText = L"Тип"; this->Column23->Name = L"Column23"; // // Column24 // this->Column24->HeaderText = L"Полки"; this->Column24-&g
Популярное: Почему двоичная система счисления так распространена?: Каждая цифра должна быть как-то представлена на физическом носителе... ©2015-2024 megaobuchalka.ru Все материалы представленные на сайте исключительно с целью ознакомления читателями и не преследуют коммерческих целей или нарушение авторских прав. (529)
|
Почему 1285321 студент выбрали МегаОбучалку... Система поиска информации Мобильная версия сайта Удобная навигация Нет шокирующей рекламы |