diff options
| author | Andrew Guschin <saintruler@gmail.com> | 2020-11-09 23:28:49 +0300 |
|---|---|---|
| committer | Andrew Guschin <saintruler@gmail.com> | 2020-11-09 23:28:49 +0300 |
| commit | 0408d33694635cdc28db23c9c6388bd916626bde (patch) | |
| tree | 843f2e61b8f5652ff3b2f19779820c223403ca7d /task01 | |
Добавил первые 4 задания
Diffstat (limited to 'task01')
| -rw-r--r-- | task01/Guschin.sln | 31 | ||||
| -rw-r--r-- | task01/Guschin/Guschin.vcxproj | 133 | ||||
| -rw-r--r-- | task01/Guschin/Guschin.vcxproj.filters | 27 | ||||
| -rw-r--r-- | task01/Guschin/Guschin.vcxproj.user | 4 | ||||
| -rw-r--r-- | task01/Guschin/MyForm.cpp | 13 | ||||
| -rw-r--r-- | task01/Guschin/MyForm.h | 171 |
6 files changed, 379 insertions, 0 deletions
diff --git a/task01/Guschin.sln b/task01/Guschin.sln new file mode 100644 index 0000000..28b263c --- /dev/null +++ b/task01/Guschin.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29806.167 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Guschin", "Guschin\Guschin.vcxproj", "{A9D89F35-1B7B-4ABC-890F-1862B89672E1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A9D89F35-1B7B-4ABC-890F-1862B89672E1}.Debug|x64.ActiveCfg = Debug|x64 + {A9D89F35-1B7B-4ABC-890F-1862B89672E1}.Debug|x64.Build.0 = Debug|x64 + {A9D89F35-1B7B-4ABC-890F-1862B89672E1}.Debug|x86.ActiveCfg = Debug|Win32 + {A9D89F35-1B7B-4ABC-890F-1862B89672E1}.Debug|x86.Build.0 = Debug|Win32 + {A9D89F35-1B7B-4ABC-890F-1862B89672E1}.Release|x64.ActiveCfg = Release|x64 + {A9D89F35-1B7B-4ABC-890F-1862B89672E1}.Release|x64.Build.0 = Release|x64 + {A9D89F35-1B7B-4ABC-890F-1862B89672E1}.Release|x86.ActiveCfg = Release|Win32 + {A9D89F35-1B7B-4ABC-890F-1862B89672E1}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {D94F9F0A-82EE-4062-A0A2-7CF63E6A06BC} + EndGlobalSection +EndGlobal diff --git a/task01/Guschin/Guschin.vcxproj b/task01/Guschin/Guschin.vcxproj new file mode 100644 index 0000000..904927c --- /dev/null +++ b/task01/Guschin/Guschin.vcxproj @@ -0,0 +1,133 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <ClCompile Include="MyForm.cpp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="MyForm.h"> + <FileType>CppForm</FileType> + </ClInclude> + </ItemGroup> + <PropertyGroup Label="Globals"> + <VCProjectVersion>16.0</VCProjectVersion> + <ProjectGuid>{A9D89F35-1B7B-4ABC-890F-1862B89672E1}</ProjectGuid> + <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> + <Keyword>ManagedCProj</Keyword> + <RootNamespace>Guschin</RootNamespace> + <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v142</PlatformToolset> + <CLRSupport>true</CLRSupport> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>v142</PlatformToolset> + <CLRSupport>true</CLRSupport> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v142</PlatformToolset> + <CLRSupport>true</CLRSupport> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>v142</PlatformToolset> + <CLRSupport>true</CLRSupport> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Label="Shared"> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup /> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <PreprocessorDefinitions>WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <Link> + <AdditionalDependencies /> + <SubSystem>Windows</SubSystem> + <EntryPointSymbol>Main</EntryPointSymbol> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <Link> + <AdditionalDependencies /> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <PreprocessorDefinitions>WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <Link> + <AdditionalDependencies /> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <Link> + <AdditionalDependencies /> + </Link> + </ItemDefinitionGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/task01/Guschin/Guschin.vcxproj.filters b/task01/Guschin/Guschin.vcxproj.filters new file mode 100644 index 0000000..c9ea7e5 --- /dev/null +++ b/task01/Guschin/Guschin.vcxproj.filters @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Исходные файлы"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + <Filter Include="Файлы заголовков"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions> + </Filter> + <Filter Include="Файлы ресурсов"> + <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> + <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="MyForm.cpp"> + <Filter>Файлы заголовков</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="MyForm.h"> + <Filter>Файлы заголовков</Filter> + </ClInclude> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/task01/Guschin/Guschin.vcxproj.user b/task01/Guschin/Guschin.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/task01/Guschin/Guschin.vcxproj.user @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup /> +</Project>
\ No newline at end of file diff --git a/task01/Guschin/MyForm.cpp b/task01/Guschin/MyForm.cpp new file mode 100644 index 0000000..c45f0fc --- /dev/null +++ b/task01/Guschin/MyForm.cpp @@ -0,0 +1,13 @@ +#include "MyForm.h" + +using namespace System; +using namespace System::Windows::Forms; + +[STAThreadAttribute] +void Main(array<String^>^ args) +{ + Application::EnableVisualStyles(); + Application::SetCompatibleTextRenderingDefault(false); + Guschin::MyForm form; + Application::Run(% form); +} diff --git a/task01/Guschin/MyForm.h b/task01/Guschin/MyForm.h new file mode 100644 index 0000000..f1d2add --- /dev/null +++ b/task01/Guschin/MyForm.h @@ -0,0 +1,171 @@ +#pragma once + +namespace Guschin { + + using namespace System; + using namespace System::ComponentModel; + using namespace System::Collections; + using namespace System::Windows::Forms; + using namespace System::Data; + using namespace System::Drawing; + + /// <summary> + /// MyForm + /// </summary> + public ref class MyForm : public System::Windows::Forms::Form + { + public: + MyForm(void) + { + InitializeComponent(); + // + //TODO: + // + } + + protected: + /// <summary> + /// . + /// </summary> + ~MyForm() + { + if (components) + { + delete components; + } + } + private: System::Windows::Forms::Label^ label1; + private: System::Windows::Forms::TextBox^ textBox1; + private: System::Windows::Forms::Label^ label2; + private: System::Windows::Forms::Button^ button1; + private: System::Windows::Forms::Label^ currency; + + protected: + + protected: + + private: + /// <summary> + /// . + /// </summary> + System::ComponentModel::Container^ components; + +#pragma region Windows Form Designer generated code + /// <summary> + /// + /// . + /// </summary> + void InitializeComponent(void) + { + this->label1 = (gcnew System::Windows::Forms::Label()); + this->textBox1 = (gcnew System::Windows::Forms::TextBox()); + this->label2 = (gcnew System::Windows::Forms::Label()); + this->button1 = (gcnew System::Windows::Forms::Button()); + this->currency = (gcnew System::Windows::Forms::Label()); + this->SuspendLayout(); + // + // label1 + // + this->label1->BackColor = System::Drawing::SystemColors::Control; + this->label1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 10, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, + static_cast<System::Byte>(204))); + this->label1->Location = System::Drawing::Point(29, 33); + this->label1->Name = L"label1"; + this->label1->Size = System::Drawing::Size(442, 90); + this->label1->TabIndex = 0; + this->label1->Text = L", . " + L" . , - " + L" . ."; + this->label1->Click += gcnew System::EventHandler(this, &MyForm::label1_Click); + // + // textBox1 + // + this->textBox1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 13, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, + static_cast<System::Byte>(204))); + this->textBox1->Location = System::Drawing::Point(102, 252); + this->textBox1->Name = L"textBox1"; + this->textBox1->Size = System::Drawing::Size(189, 27); + this->textBox1->TabIndex = 1; + // + // label2 + // + this->label2->AutoSize = true; + this->label2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, + static_cast<System::Byte>(204))); + this->label2->Location = System::Drawing::Point(30, 255); + this->label2->Name = L"label2"; + this->label2->Size = System::Drawing::Size(66, 20); + this->label2->TabIndex = 2; + this->label2->Text = L": "; + // + // button1 + // + this->button1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 10, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, + static_cast<System::Byte>(204))); + this->button1->Location = System::Drawing::Point(358, 248); + this->button1->Name = L"button1"; + this->button1->Size = System::Drawing::Size(103, 37); + this->button1->TabIndex = 3; + this->button1->Text = L""; + this->button1->UseVisualStyleBackColor = true; + // + // currency + // + this->currency->AutoSize = true; + this->currency->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 10, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, + static_cast<System::Byte>(204))); + this->currency->Location = System::Drawing::Point(297, 258); + this->currency->Name = L"currency"; + this->currency->Size = System::Drawing::Size(55, 17); + this->currency->TabIndex = 4; + this->currency->Text = L""; + // + // MyForm + // + this->AutoScaleDimensions = System::Drawing::SizeF(6, 13); + this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font; + this->ClientSize = System::Drawing::Size(500, 500); + this->Controls->Add(this->currency); + this->Controls->Add(this->button1); + this->Controls->Add(this->label2); + this->Controls->Add(this->textBox1); + this->Controls->Add(this->label1); + this->DoubleBuffered = true; + this->Name = L"MyForm"; + this->Text = L" "; + this->Paint += gcnew System::Windows::Forms::PaintEventHandler(this, &MyForm::MyForm_Paint); + this->Resize += gcnew System::EventHandler(this, &MyForm::MyForm_Resize); + this->ResumeLayout(false); + this->PerformLayout(); + + } +#pragma endregion + private: System::Void label1_Click(System::Object^ sender, System::EventArgs^ e) { + } + private: System::Void MyForm_Paint(System::Object^ sender, System::Windows::Forms::PaintEventArgs^ e) { + Graphics^ g = e->Graphics; + g->Clear(Color::Pink); + + Pen^ redPen = gcnew Pen(Color::Red); + redPen->Width = 6; + g->DrawLine(redPen, 0, 0, this->ClientRectangle.Width, this->ClientRectangle.Height); + + Pen^ bluePen = gcnew Pen(Color::Blue, 10); + g->DrawLine(bluePen, 90, 50, ClientRectangle.Width, 80); + + SolidBrush^ drawBrush = gcnew SolidBrush(Color::Green); + System::Drawing::Font^ drawFont = gcnew System::Drawing::Font("Comic Sans MS", 20); + g->DrawString(" ", drawFont, drawBrush, 40, 400); + + Pen^ sqarePen = gcnew Pen(Color::Green, 5); + g->DrawLine(sqarePen, 0, ClientRectangle.Height / 3, ClientRectangle.Width / 3 * 2, 0); + g->DrawLine(sqarePen, ClientRectangle.Width / 3 * 2, 0, ClientRectangle.Width, ClientRectangle.Height / 3 * 2); + g->DrawLine(sqarePen, ClientRectangle.Width, ClientRectangle.Height / 3 * 2, ClientRectangle.Width / 3, ClientRectangle.Height); + g->DrawLine(sqarePen, ClientRectangle.Width / 3, ClientRectangle.Height, 0, ClientRectangle.Height / 3); + + } + private: System::Void MyForm_Resize(System::Object^ sender, System::EventArgs^ e) { + this->Refresh(); + } + }; +} |