Файл: Лабораторная работа 11 Выполнила Драчева Кристина Проверил Савин Н. И. Тула 2023.pdf

ВУЗ: Не указан

Категория: Не указан

Дисциплина: Не указана

Добавлен: 12.12.2023

Просмотров: 31

Скачиваний: 3

ВНИМАНИЕ! Если данный файл нарушает Ваши авторские права, то обязательно сообщите нам.
tochki[5]
=
XYizometr(
this
->textBox_ver_x->Text, this
-
>textBox_ver_y->Text, this
->textBox_ver_z->Text); risovat_piramidu(tochki, pictureBox1);
}
Отрисовка и удаление осей происходит в обработчике изменения состояния чекбокса
System::
Void okno2::
MyForm
::checkBox1_CheckedChanged(System::
Object
^ sender
, System::
EventArgs
^ e
)
{
Color
^ cvet = gcnew
Color
;
Pen
^ pero = gcnew
Pen
(cvet->Red, 1);
Graphics
^ risunok = pictureBox1->CreateGraphics(); if
(flag)
{ risunok->DrawLine(pero, XYizometr(-200, 0, 0), XYizometr(200,
0, 0)); pero->Color = cvet->Blue; risunok->DrawLine(pero, XYizometr(0, 200, 0), XYizometr(0, -
200, 0)); pero->Color = cvet->Green; risunok->DrawLine(pero, XYizometr(0, 0, 200), XYizometr(0, 0, -
20)); flag = false
;
} else
{ pero->Color = this
->pictureBox1->BackColor; risunok->DrawLine(pero, XYizometr(-200, 0, 0), XYizometr(200,
0, 0)); pero->Color = this
->pictureBox1->BackColor; risunok->DrawLine(pero, XYizometr(0, 200, 0), XYizometr(0, -
200, 0)); pero->Color = this
->pictureBox1->BackColor; risunok->DrawLine(pero, XYizometr(0, 0, 200), XYizometr(0, 0, -
20)); flag = true
;
} risovat_piramidu(tochki, pictureBox1); return
System::
Void
();
}
Переменная flag используется для определения каким цветом отрисовывать оси.
4. Результат выполнения


МИНИСТЕРСТВО ОБРАЗОВАНИЯ И НАУКИ РОССИЙСКОЙ
ФЕДЕРАЦИИ
ФЕДЕРАЛЬНОЕ ГОСУДАРСТВЕННОЕ БЮДЖЕТНОЕ
ОБРАЗОВАТЕЛЬНОЕ УЧРЕЖДЕНИЕ ВЫСШЕГО
ПРОФЕССИОНАЛЬНОГО ОБРАЗОВАНИЯ «ТУЛЬСКИЙ
ГОСУДАРСТВЕННЫЙ УНИВЕРСИТЕТ»
Институт Прикладной математики и компьютерных наук
Кафедра Вычислительной техники
Учебная дисциплина
Программирование
Уровень профессионального образования: (высшее образование –
бакалавриат)
Направление подготовки: Информатика и вычислительная техника
Профиль подготовки: Электронно-вычислительные машины, комплексы, системы и сети
Лабораторная работа № 18
Выполнила Драчева Кристина
Проверил Савин Н.И.
Тула 2023

1. Цель
Визуальное проектирование программ в среде VisualStudio. Анимация
2. Задание
Спроектировать приложение для рисования изометрии параллелепипеда на форме. На форме предусмотреть кнопку для ввода данных, кнопу для рисования, поле ввода, кнопку для однократного поворота объекта. Поворот изображения объекта осуществляется вокруг оси, параметры которой задаются в поле ввода. В поле ввода задаются параметры линий, таблица значений координат вершин параллелепипеда.
3. Ход работы
Для выполнения работы я использовал функции пересчёта координат в изометрию. Для отрисовки осей сделал отдельную функцию. void otris_osey(System::Windows::Forms::
1   2   3   4

PictureBox
^ pictureBox1
, int x
= 1)
{
System::Drawing::
Color
^ cvet = gcnew
System::Drawing::
Color
;
System::Drawing::
Pen
^ pero = gcnew
System::Drawing::
Pen
(cvet->Red,
1);
System::Drawing::
Graphics
^ risunok = pictureBox1
->CreateGraphics(); if
(
x
!=0)
{ risunok->DrawLine(pero, XYizometr(-200, 0, 0), XYizometr(200,
0, 0)); pero->Color = cvet->Blue; risunok->DrawLine(pero, XYizometr(0, 200, 0), XYizometr(0, -
200, 0)); pero->Color = cvet->Green; risunok->DrawLine(pero, XYizometr(0, 0, 200), XYizometr(0, 0, -
20));
} else
{ pero->Color = pictureBox1
->BackColor; risunok->DrawLine(pero, XYizometr(-200, 0, 0), XYizometr(200,
0, 0)); risunok->DrawLine(pero, XYizometr(0, 200, 0), XYizometr(0, -
200, 0)); risunok->DrawLine(pero, XYizometr(0, 0, 200), XYizometr(0, 0, -
20));
}
}
Аргумент по умолчанию для выбора цвета отрисовки.
Для начертания параллепипеда создал функцию
void risovat_parallepiped
. В качестве одного из аргументов передаётся массив с параметрами x,y,z вершины и длинны, ширины и высоты. Массив заполняется при нажатии кнопки запомнить из соответствующих полей.
Для поворота используются функции пересчёта координат вершины и знаков направления длинн сторон. Для выбора цвета используется дилог выбора цвета.
4. Результат выполнения

Листинг
MyForm.сср
#include
"MyForm.h"
using namespace
System; using namespace
System::Windows::Forms; bool flag = true
; bool flag_povorot_os_X; bool flag_povorot_os_Y; bool flag_povorot_os_Z; bool flag_perv_otr; int tolshina = 1;
[STAThreadAttribute] void main(
array
<
String
^>^ args
)
{
Application
::EnableVisualStyles;
Application
::SetCompatibleTextRenderingDefault(
false
); lr19::
MyForm form;
Application
::Run(% form);
} double
Perevod_v_radian(
int grad
)
{ double m = 3.14159 / 180; return grad
* m;
} void
XYizo(
int
& x
, int
& y
)
{ double rad30, rad150; int x1, y1; x1 = x
; y1 = y
; rad30 = Perevod_v_radian(30); rad150 = Perevod_v_radian(150); x
= (cos(rad30) * x1) + (cos(rad150) * y1); y
= (sin(rad30) * x1) + (sin(rad150) * y1);
}
System::Drawing::
Point
XYizometr(
int x1
, int y1
, int z1
)
{ int const
X0 = 210; int const
Y0 = 210; int
X, Y;
X = x1
;
Y = y1
;
XYizo(X, Y);
return
System::Drawing::
Point
(X0 + X, (Y0 - Y) - z1
);
}
System::Drawing::
Point
XYizometr(
String
^ x1
,
String
^ y1
,
String
^ z1
)
{ int const
X0 = 210; int const
Y0 = 210; int
X, Y;
X = System::
Convert
::ToInt32(
x1
);
Y = System::
Convert
::ToInt32(
y1
);
XYizo(X, Y); return
System::Drawing::
Point
(X0
+
X,
(Y0
-
Y)
-
System::
Convert
::ToInt32(
z1
));
} void risovat_parallepiped(
array
<
int
>^ param
,
System::Windows::Forms::
PictureBox
^ pictureBox1
,
System::Windows::Forms::
ColorDialog
^ colorDialog
, int x
= 1)
{ array
<:drawing::>Point
>^ tochki_osnovaniya
= gcnew array
<:drawing::>Point
>(5); array
<:drawing::>Point
>^ tochki_verhney_pl
= gcnew array
<:drawing::>Point
>(5);
// нижнее снование tochki_osnovaniya[0]
=
XYizometr(
param
[0], param
[1], param
[2]); tochki_osnovaniya[1]
=
XYizometr(
param
[0], param
[1]+
param
[4], param
[2]); tochki_osnovaniya[2]
=
XYizometr(
param
[0]+
param
[3], param
[1]+
param
[4], param
[2]); tochki_osnovaniya[3]
=
XYizometr(
param
[0]+
param
[3], param
[1], param
[2]); tochki_osnovaniya[4]
=
XYizometr(
param
[0], param
[1], param
[2]);
// верхнее основание tochki_verhney_pl[0]
=
XYizometr(
param
[0], param
[1], param
[2]+
param
[5]); tochki_verhney_pl[1]
=
XYizometr(
param
[0], param
[1] + param
[4], param
[2] + param
[5]); tochki_verhney_pl[2]
=
XYizometr(
param
[0] + param
[3], param
[1] + param
[4], param
[2] + param
[5]); tochki_verhney_pl[3]
=
XYizometr(
param
[0] + param
[3], param
[1], param
[2] + param
[5]); tochki_verhney_pl[4]
=
XYizometr(
param
[0], param
[1], param
[2] + param
[5]);
System::Drawing::
Color
^ cvet = gcnew
System::Drawing::
Color
;
System::Drawing::
Pen
^ pero = gcnew
System::Drawing::
Pen
(
colorDialog
-
>Color, tolshina); if
(
x
== 0)
{ pero->Color = pictureBox1
->BackColor;
}
System::Drawing::
Graphics
^ risunok = pictureBox1
->CreateGraphics(); risunok->DrawLines(pero,tochki_osnovaniya);
//отрисовка нижнего risunok->DrawLines(pero, tochki_verhney_pl);
// отрисовка верхнего for
(
int i = 0; i < 4; i++)
{
// отрисовка рёбер risunok->DrawLine(pero, tochki_osnovaniya[i], tochki_verhney_pl[i]);
}
} void povorot_os_Z(
array
<
int
>^ vvodnie
)
// функция пересчёта для поворота вокруг оси Z
{ int vrem = vvodnie
[0]; int vrem1 = vvodnie
[3];
if
(flag_povorot_os_Z)
{ vvodnie
[0] = vvodnie
[1]; vvodnie
[1] = vrem * (-1); vvodnie
[3] = vvodnie
[4]; vvodnie
[4] = vrem1 * (-1); flag_povorot_os_Z = !flag_povorot_os_Z;
} else
{ vvodnie
[0] = vvodnie
[1]; vvodnie
[1] = vrem * (-1); vvodnie
[3] = vvodnie
[4]; vvodnie
[4] = vrem1 * (-1); flag_povorot_os_Z = !flag_povorot_os_Z;
}
} void povorot_os_Y(
array
<
int
>^ vvodnie
)
// функция пересчёта для поворота вокруг оси Y
{ int vrem = vvodnie
[0]; int vrem1 = vvodnie
[3]; if
(flag_povorot_os_Y)
{ vvodnie
[0] = vvodnie
[2]; vvodnie
[2] = vrem * (-1); vvodnie
[3] = vvodnie
[5]; vvodnie
[5] = vrem1 * (-1); flag_povorot_os_Y = !flag_povorot_os_Y;
} else
{ vvodnie
[0] = vvodnie
[2]; vvodnie
[2] = vrem * (-1); vvodnie
[3] = vvodnie
[5]; vvodnie
[5] = vrem1 * (-1); flag_povorot_os_Y = !flag_povorot_os_Y;
}
} void povorot_os_X(
array
<
int
>^ vvodnie
)
// функция пересчёта для поворота вокруг оси X
{ int vrem = vvodnie
[2]; int vrem1 = vvodnie
[5]; if
(flag_povorot_os_X)
{ vvodnie
[2] = vvodnie
[1]; vvodnie
[1] = vrem * (-1); vvodnie
[5] = vvodnie
[4]; vvodnie
[4] = vrem1 * (-1); flag_povorot_os_X = !flag_povorot_os_X;
} else
{ vvodnie
[2] = vvodnie
[1]; vvodnie
[1] = vrem * (-1); vvodnie
[5] = vvodnie
[4]; vvodnie
[4] = vrem1 * (-1); flag_povorot_os_X = !flag_povorot_os_X;
}
} void otris_osey(System::Windows::Forms::
PictureBox
^ pictureBox1
, int x
= 1)
{
System::Drawing::
Color
^ cvet = gcnew
System::Drawing::
Color
;

System::Drawing::
Pen
^ pero = gcnew
System::Drawing::
Pen
(cvet->Red,
1);
System::Drawing::
Graphics
^ risunok = pictureBox1
->CreateGraphics(); if
(
x
!=0)
{ risunok->DrawLine(pero, XYizometr(-200, 0, 0), XYizometr(200,
0, 0)); pero->Color = cvet->Blue; risunok->DrawLine(pero, XYizometr(0, 200, 0), XYizometr(0, -
200, 0)); pero->Color = cvet->Green; risunok->DrawLine(pero, XYizometr(0, 0, 200), XYizometr(0, 0, -
20));
} else
{ pero->Color = pictureBox1
->BackColor; risunok->DrawLine(pero, XYizometr(-200, 0, 0), XYizometr(200,
0, 0)); risunok->DrawLine(pero, XYizometr(0, 200, 0), XYizometr(0, -
200, 0)); risunok->DrawLine(pero, XYizometr(0, 0, 200), XYizometr(0, 0, -
20));
}
}
System::
Void lr19::
MyForm
::button1_Click(System::
Object
^ sender
,
System::
EventArgs
^ e
)
{ risovat_parallepiped(vvodnie, pictureBox1,colorDialog1); flag_perv_otr = true
;
}
System::
Void lr19::
MyForm
::checkBox1_CheckedChanged(System::
Object
^ sender
,
System::
EventArgs
^ e
)
{
// изменение чекбокса вкл/выкл отрисовки осей
(flag) ? otris_osey(pictureBox1) : otris_osey(pictureBox1, 0); flag = !flag; risovat_parallepiped(vvodnie, pictureBox1,colorDialog1);
}
System::
Void lr19::
MyForm
::button3_Click(System::
Object
^ sender
,
System::
EventArgs
^ e
)
{
// заполнение массива параметров и сстирание старого параллепипеда если был нарисованн if
(flag_perv_otr) risovat_parallepiped(vvodnie, pictureBox1,colorDialog1, 0); this
->vvodnie[0] = System::
Convert
::ToInt16(textBox_vX->Text);
// Х координата вершины this
->vvodnie[1] = System::
Convert
::ToInt16(textBox_vY->Text);
// Y координата вершины this
->vvodnie[2] = System::
Convert
::ToInt16(textBox_vZ->Text);
// Z координата вершины this
->vvodnie[3] = System::
Convert
::ToInt16(textBox_dlinna->Text);
// длинна this
->vvodnie[4] = System::
Convert
::ToInt16(textBox_shirina->Text);
// ширина this
->vvodnie[5] = System::
Convert
::ToInt16(textBox_visota->Text);
// высота
}
System::
Void lr19::
MyForm
::button4_Click(System::
Object
^ sender
,
System::
EventArgs
^ e
)
{
// поворот вокруг выбранной оси risovat_parallepiped(vvodnie, pictureBox1,colorDialog1, 0); if
(radioButton1->Checked)povorot_os_X(vvodnie);
if
(radioButton2->Checked)povorot_os_Y(vvodnie); if
(radioButton3->Checked)povorot_os_Z(vvodnie);
(flag) ? otris_osey(pictureBox1,0) : otris_osey(pictureBox1); risovat_parallepiped(vvodnie, pictureBox1, colorDialog1);
}
System::
Void lr19::
MyForm
::button5_Click(System::
Object
^ sender
,
System::
EventArgs
^ e
)
{
// выбор цвета чернил this
->colorDialog1->ShowDialog(); label_cvet->BackColor = colorDialog1->Color; risovat_parallepiped(vvodnie, pictureBox1, colorDialog1);
}
System::
Void lr19::
MyForm
::button6_Click(System::
Object
^ sender
,
System::
EventArgs
^ e
)
{
// изменение толщины линии risovat_parallepiped(vvodnie, pictureBox1, colorDialog1,0); tolshina = System::
Convert
::ToInt16(
this
->textBox1->Text); risovat_parallepiped(vvodnie, pictureBox1, colorDialog1);
}
Листинг
MyForm.h
#pragma once
#include

namespace lr19 { using namespace
System; using namespace
System::ComponentModel; using namespace
System::Collections; using namespace
System::Windows::Forms; using namespace
System::Data; using namespace
System::Drawing;
///

/// Сводка для MyForm
///

public ref class
MyForm
: public
System::Windows::Forms::
Form
{ public
:
MyForm(
void
)
{
InitializeComponent();
//
//TODO: добавьте код конструктора
//
} protected
:
///

/// Освободить все используемые ресурсы.
///

MyForm()
{ if
(components)
{ delete components;
}
}
private
: System::Windows::Forms::
PictureBox
^ pictureBox1; protected
: private
: System::Windows::Forms::
Button
^ button1; private
: System::Windows::Forms::
Button
^ button2; private
: System::Windows::Forms::
CheckBox
^ checkBox1; private
: array
<
int
>^ vvodnie = gcnew array
<
int
>(6); private
: System::Windows::Forms::
Button
^ button3; private
: System::Windows::Forms::
Button
^ button4; private
: System::Windows::Forms::
RadioButton
^ radioButton1; private
: System::Windows::Forms::
RadioButton
^ radioButton2; private
: System::Windows::Forms::
RadioButton
^ radioButton3; private
: System::Windows::Forms::
GroupBox
^ groupBox1; private
: System::Windows::Forms::
TextBox
^ textBox_vX; private
: System::Windows::Forms::
Label
^ label1; private
: System::Windows::Forms::
Label
^ label2; 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::
GroupBox
^ groupBox2; private
: System::Windows::Forms::
TextBox
^ textBox_vZ; private
: System::Windows::Forms::
TextBox
^ textBox_vY; private
: System::Windows::Forms::
TextBox
^ textBox_dlinna; private
: System::Windows::Forms::
TextBox
^ textBox_shirina; private
: System::Windows::Forms::
TextBox
^ textBox_visota; private
: System::Windows::Forms::
ColorDialog
^ colorDialog1; private
: System::Windows::Forms::
Button
^ button5; private
: System::Windows::Forms::
Label
^ label_cvet; private
: System::Windows::Forms::
Button
^ button6; private
: System::Windows::Forms::
TextBox
^ textBox1; private
:
///

/// Обязательная переменная конструктора.
///

System::ComponentModel::
Container
^components;
#pragma region
Windows Form Designer generated code
///

/// Требуемый метод для поддержки конструктора — не изменяйте
/// содержимое этого метода с помощью редактора кода.
///

void
InitializeComponent(
void
)
{ this
->pictureBox1
=
(
gcnew
System::Windows::Forms::
PictureBox
()); this
->button1 = (
gcnew
System::Windows::Forms::
Button
()); this
->button2 = (
gcnew
System::Windows::Forms::
Button
()); this
->checkBox1
=
(
gcnew
System::Windows::Forms::
CheckBox
()); this
->button3 = (
gcnew
System::Windows::Forms::
Button
()); this
->button4 = (
gcnew
System::Windows::Forms::
Button
()); this
->radioButton1
=
(
gcnew
System::Windows::Forms::
RadioButton
()); this
->radioButton2
=
(
gcnew
System::Windows::Forms::
RadioButton
()); this
->radioButton3
=
(
gcnew
System::Windows::Forms::
RadioButton
()); this
->groupBox1
=
(
gcnew
System::Windows::Forms::
GroupBox
()); this
->textBox_vX
=
(
gcnew
System::Windows::Forms::
TextBox
()); this
->label1 = (
gcnew
System::Windows::Forms::
Label
()); this
->label2 = (
gcnew
System::Windows::Forms::
Label
());
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
->groupBox2
=
(
gcnew
System::Windows::Forms::
GroupBox
()); this
->textBox_vZ
=
(
gcnew
System::Windows::Forms::
TextBox
()); this
->textBox_vY
=
(
gcnew
System::Windows::Forms::
TextBox
()); this
->textBox_dlinna
=
(
gcnew
System::Windows::Forms::
TextBox
()); this
->textBox_shirina
=
(
gcnew
System::Windows::Forms::
TextBox
()); this
->textBox_visota
=
(
gcnew
System::Windows::Forms::
TextBox
()); this
->colorDialog1
=
(
gcnew
System::Windows::Forms::
ColorDialog
()); this
->button5 = (
gcnew
System::Windows::Forms::
Button
()); this
->label_cvet
=
(
gcnew
System::Windows::Forms::
Label
()); this
->button6 = (
gcnew
System::Windows::Forms::
Button
()); this
->textBox1
=
(
gcnew
System::Windows::Forms::
TextBox
());
(cli::
safe_cast
<:componentmodel::>ISupportInitialize
^>(
this
-
>pictureBox1))->BeginInit(); this
->groupBox1->SuspendLayout(); this
->groupBox2->SuspendLayout(); this
->SuspendLayout();
//
// pictureBox1
// this
->pictureBox1->Location = System::Drawing::
Point
(4,
6); this
->pictureBox1->MinimumSize
=
System::Drawing::
Size
(420, 420); this
->pictureBox1->Name =
L"pictureBox1"
; this
->pictureBox1->Size
=
System::Drawing::
Size
(420,
420); this
->pictureBox1->TabIndex = 0; this
->pictureBox1->TabStop = false
;
//
// button1
// this
->button1->Location
=
System::Drawing::
Point
(548,
181); this
->button1->Name =
L"button1"
; this
->button1->Size = System::Drawing::
Size
(74, 94); this
->button1->TabIndex = 1; this
->button1->Text =
L"рисовать"
; this
->button1->UseVisualStyleBackColor = true
; this
->button1->Click += gcnew
System::
EventHandler
(
this
,
&
MyForm
::button1_Click);
//
// button2
// this
->button2->Location
=
System::Drawing::
Point
(524,
390); this
->button2->Name =
L"button2"
; this
->button2->Size = System::Drawing::
Size
(92, 36); this
->button2->TabIndex = 2; this
->button2->Text =
L"выход"
; this
->button2->UseVisualStyleBackColor = true
; this
->button2->Click += gcnew
System::
EventHandler
(
this
,
&
MyForm
::button2_Click);
//

// checkBox1
// this
->checkBox1->AutoSize = true
; this
->checkBox1->Location = System::Drawing::
Point
(449,
401); this
->checkBox1->Name =
L"checkBox1"
; this
->checkBox1->Size = System::Drawing::
1   2   3   4


Size
(44, 17); this
->checkBox1->TabIndex = 3; this
->checkBox1->Text =
L"оси"
; this
->checkBox1->UseVisualStyleBackColor = true
; this
->checkBox1->CheckedChanged
+= gcnew
System::
EventHandler
(
this
, &
MyForm
::checkBox1_CheckedChanged);
//
// button3
// this
->button3->Location
=
System::Drawing::
Point
(547,
79); this
->button3->Name =
L"button3"
; this
->button3->Size = System::Drawing::
Size
(75, 72); this
->button3->TabIndex = 4; this
->button3->Text =
L"запомнить"
; this
->button3->UseVisualStyleBackColor = true
; this
->button3->Click += gcnew
System::
EventHandler
(
this
,
&
MyForm
::button3_Click);
//
// button4
// this
->button4->Location = System::Drawing::
Point
(85, 18); this
->button4->Name =
L"button4"
; this
->button4->Size = System::Drawing::
Size
(92, 65); this
->button4->TabIndex = 5; this
->button4->Text =
L"поворот"
; this
->button4->UseVisualStyleBackColor = true
; this
->button4->Click += gcnew
System::
EventHandler
(
this
,
&
MyForm
::button4_Click);
//
// radioButton1
// this
->radioButton1->AutoSize = true
; this
->radioButton1->Checked = true
; this
->radioButton1->Location = System::Drawing::
Point
(10,
19); this
->radioButton1->Name =
L"radioButton1"
; this
->radioButton1->Size = System::Drawing::
Size
(53, 17); this
->radioButton1->TabIndex = 6; this
->radioButton1->TabStop = true
; this
->radioButton1->Text =
L"ось X"
; this
->radioButton1->UseVisualStyleBackColor = true
;
//
// radioButton2
// this
->radioButton2->AutoSize = true
; this
->radioButton2->Location = System::Drawing::
Point
(10,
43); this
->radioButton2->Name =
L"radioButton2"
; this
->radioButton2->Size = System::Drawing::
Size
(53, 17); this
->radioButton2->TabIndex = 7; this
->radioButton2->Text =
L"ось Y"
; this
->radioButton2->UseVisualStyleBackColor = true
;
//
// radioButton3
// this
->radioButton3->AutoSize = true
; this
->radioButton3->Location = System::Drawing::
Point
(10,
66); this
->radioButton3->Name =
L"radioButton3"
;
this
->radioButton3->Size = System::Drawing::
Size
(53, 17); this
->radioButton3->TabIndex = 8; this
->radioButton3->Text =
L"ось Z"
; this
->radioButton3->UseVisualStyleBackColor = true
;
//
// groupBox1
// this
->groupBox1->Controls->Add(
this
->button4); this
->groupBox1->Controls->Add(
this
->radioButton1); this
->groupBox1->Controls->Add(
this
->radioButton2); this
->groupBox1->Controls->Add(
this
->radioButton3); this
->groupBox1->Location = System::Drawing::
Point
(439,
288); this
->groupBox1->Name =
L"groupBox1"
; this
->groupBox1->Size = System::Drawing::
Size
(183, 96); this
->groupBox1->TabIndex = 9; this
->groupBox1->TabStop = false
; this
->groupBox1->Text =
L"выбор оси для поворота"
;
//
// textBox_vX
// this
->textBox_vX->Location = System::Drawing::
Point
(24,
23); this
->textBox_vX->Name =
L"textBox_vX"
; this
->textBox_vX->Size = System::Drawing::
Size
(39, 20); this
->textBox_vX->TabIndex = 10; this
->textBox_vX->Text =
L"0"
;
//
// label1
// this
->label1->AutoSize = true
; this
->label1->Location = System::Drawing::
Point
(6, 26); this
->label1->Name =
L"label1"
; this
->label1->Size = System::Drawing::
Size
(14, 13); this
->label1->TabIndex = 11; this
->label1->Text =
L"X"
;
//
// label2
// this
->label2->AutoSize = true
; this
->label2->Location = System::Drawing::
Point
(69, 26); this
->label2->Name =
L"label2"
; this
->label2->Size = System::Drawing::
Size
(14, 13); this
->label2->TabIndex = 12; this
->label2->Text =
L"Y"
;
//
// label3
// this
->label3->AutoSize = true
; this
->label3->Location = System::Drawing::
Point
(136, 26); this
->label3->Name =
L"label3"
; this
->label3->Size = System::Drawing::
Size
(14, 13); this
->label3->TabIndex = 13; this
->label3->Text =
L"Z"
;
//
// label4
// this
->label4->AutoSize = true
; this
->label4->Location = System::Drawing::
Point
(430, 82); this
->label4->Name =
L"label4"
; this
->label4->Size = System::Drawing::
Size
(43, 13); this
->label4->TabIndex = 14; this
->label4->Text =
L"длинна"
;
//
// label5
// this
->label5->AutoSize = true
;

this
->label5->Location
=
System::Drawing::
Point
(430,
109); this
->label5->Name =
L"label5"
; this
->label5->Size = System::Drawing::
Size
(45, 13); this
->label5->TabIndex = 15; this
->label5->Text =
L"ширина"
;
//
// label6
// this
->label6->AutoSize = true
; this
->label6->Location
=
System::Drawing::
Point
(430,
138); this
->label6->Name =
L"label6"
; this
->label6->Size = System::Drawing::
Size
(44, 13); this
->label6->TabIndex = 16; this
->label6->Text =
L"высота"
;
//
// groupBox2
// this
->groupBox2->Controls->Add(
this
->label1); this
->groupBox2->Controls->Add(
this
->label2); this
->groupBox2->Controls->Add(
this
->textBox_vZ); this
->groupBox2->Controls->Add(
this
->label3); this
->groupBox2->Controls->Add(
this
->textBox_vY); this
->groupBox2->Controls->Add(
this
->textBox_vX); this
->groupBox2->Location = System::Drawing::
Point
(430,
6); this
->groupBox2->Name =
L"groupBox2"
; this
->groupBox2->Size = System::Drawing::
Size
(201, 62); this
->groupBox2->TabIndex = 19; this
->groupBox2->TabStop = false
; this
->groupBox2->Text =
L"координаты вершины"
;
//
// textBox_vZ
// this
->textBox_vZ->Location = System::Drawing::
Point
(156,
23); this
->textBox_vZ->Name =
L"textBox_vZ"
; this
->textBox_vZ->Size = System::Drawing::
Size
(36, 20); this
->textBox_vZ->TabIndex = 21; this
->textBox_vZ->Text =
L"0"
;
//
// textBox_vY
// this
->textBox_vY->Location = System::Drawing::
Point
(89,
23); this
->textBox_vY->Name =
L"textBox_vY"
; this
->textBox_vY->Size = System::Drawing::
Size
(39, 20); this
->textBox_vY->TabIndex = 20; this
->textBox_vY->Text =
L"0"
;
//
// textBox_dlinna
// this
->textBox_dlinna->Location
=
System::Drawing::
Point
(479, 79); this
->textBox_dlinna->Name =
L"textBox_dlinna"
; this
->textBox_dlinna->Size = System::Drawing::
Size
(54,
20); this
->textBox_dlinna->TabIndex = 22; this
->textBox_dlinna->Text =
L"0"
;
//
// textBox_shirina
// this
->textBox_shirina->Location
=
System::Drawing::
Point
(479, 106); this
->textBox_shirina->Name =
L"textBox_shirina"
;
this
->textBox_shirina->Size = System::Drawing::
Size
(53,
20); this
->textBox_shirina->TabIndex = 23; this
->textBox_shirina->Text =
L"0"
;
//
// textBox_visota
// this
->textBox_visota->Location
=
System::Drawing::
Point
(479, 135); this
->textBox_visota->Name =
L"textBox_visota"
; this
->textBox_visota->Size = System::Drawing::
Size
(54,
20); this
->textBox_visota->TabIndex = 24; this
->textBox_visota->Text =
L"0"
;
//
// button5
// this
->button5->Location
=
System::Drawing::
Point
(479,
181); this
->button5->Name =
L"button5"
; this
->button5->Size = System::Drawing::
Size
(63, 42); this
->button5->TabIndex = 25; this
->button5->Text =
L"сменить цвет"
; this
->button5->UseVisualStyleBackColor = true
; this
->button5->Click += gcnew
System::
EventHandler
(
this
,
&
MyForm
::button5_Click);
//
// label_cvet
// this
->label_cvet->AutoSize = true
; this
->label_cvet->BackColor
=
System::Drawing::
Color
::Black; this
->label_cvet->BorderStyle
=
System::Windows::Forms::
BorderStyle
::
Fixed3D
; this
->label_cvet->Location = System::Drawing::
Point
(439,
196); this
->label_cvet->Name =
L"label_cvet"
; this
->label_cvet->Size = System::Drawing::
Size
(30, 15); this
->label_cvet->TabIndex = 26; this
->label_cvet->Text =
L" "
;
//
// button6
// this
->button6->Location
=
System::Drawing::
Point
(479,
233); this
->button6->Name =
L"button6"
; this
->button6->Size = System::Drawing::
Size
(63, 42); this
->button6->TabIndex = 28; this
->button6->Text =
L"сменить толщину"
; this
->button6->UseVisualStyleBackColor = true
; this
->button6->Click += gcnew
System::
EventHandler
(
this
,
&
MyForm
::button6_Click);
//
// textBox1
// this
->textBox1->Location = System::Drawing::
Point
(449,
245); this
->textBox1->Name =
L"textBox1"
; this
->textBox1->Size = System::Drawing::
Size
(20, 20); this
->textBox1->TabIndex = 29; this
->textBox1->Text =
L"1"
; this
->textBox1->TextAlign
=
System::Windows::Forms::
HorizontalAlignment
::
Center
;
//
// MyForm
//

this
->AutoScaleDimensions
=
System::Drawing::
SizeF
(6,
13); this
->AutoScaleMode
=
System::Windows::Forms::
AutoScaleMode
::
Font
; this
->ClientSize = System::Drawing::
Size
(634, 434); this
->Controls->Add(
this
->textBox1); this
->Controls->Add(
this
->button6); this
->Controls->Add(
this
->label_cvet); this
->Controls->Add(
this
->button5); this
->Controls->Add(
this
->textBox_visota); this
->Controls->Add(
this
->textBox_shirina); this
->Controls->Add(
this
->textBox_dlinna); this
->Controls->Add(
this
->groupBox2); this
->Controls->Add(
this
->label6); this
->Controls->Add(
this
->label5); this
->Controls->Add(
this
->label4); this
->Controls->Add(
this
->button3); this
->Controls->Add(
this
->checkBox1); this
->Controls->Add(
this
->button2); this
->Controls->Add(
this
->button1); this
->Controls->Add(
this
->pictureBox1); this
->Controls->Add(
this
->groupBox1); this
->Name =
L"MyForm"
; this
->Text =
L"MyForm"
;
(cli::
safe_cast
<:componentmodel::>ISupportInitialize
^>(
this
-
>pictureBox1))->EndInit(); this
->groupBox1->ResumeLayout(
false
); this
->groupBox1->PerformLayout(); this
->groupBox2->ResumeLayout(
false
); this
->groupBox2->PerformLayout(); this
->ResumeLayout(
false
); this
->PerformLayout();
}
#pragma endregion private
:
System::
Void button2_Click(System::
Object
^ sender
,
System::
EventArgs
^ e
) { this
->Close(); } private
:
System::
Void button1_Click(System::
Object
^ sender
,
System::
EventArgs
^ e
); private
:
System::
Void checkBox1_CheckedChanged(System::
Object
^ sender
, System::
EventArgs
^ e
); private
:
System::
Void button3_Click(System::
Object
^ sender
,
System::
EventArgs
^ e
); private
:
System::
Void button4_Click(System::
Object
^ sender
,
System::
EventArgs
^ e
); private
:
System::
Void button5_Click(System::
Object
^ sender
,
System::
EventArgs
^ e
); private
:
System::
Void button6_Click(System::
Object
^ sender
,
System::
EventArgs
^ e
);
};
}