Skip to content

Commit

Permalink
Merge pull request #17 from Schrodinger71/dev_fix
Browse files Browse the repository at this point in the history
Fix Upadate
  • Loading branch information
Schrodinger71 authored Mar 14, 2024
2 parents 4ff582b + 39cd471 commit 46e48de
Show file tree
Hide file tree
Showing 67 changed files with 396 additions and 23 deletions.
3 changes: 3 additions & 0 deletions .vs/ProjectSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"CurrentProjectSetting": "\u041D\u0435\u0442 \u043A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439"
}
5 changes: 5 additions & 0 deletions .vs/VSWorkspaceState.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"ExpandedNodes": [],
"SelectedNode": "\\ProjectBanConsole.sln",
"PreviewInSolutionExplorer": false
}
Binary file added .vs/slnx.sqlite
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
40 changes: 21 additions & 19 deletions app_WindowsForm/WindowsFormsAppFieldIntersectionPoint/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
using static System.Windows.Forms.VisualStyles.VisualStyleElement.ToolBar;
using TextBox = System.Windows.Forms.TextBox;
using System.Text.RegularExpressions;

namespace WindowsFormsApp1
{
Expand All @@ -22,7 +23,7 @@ public Form1()
textBoxes = new TextBox[] { onePointX1, onePointX2, onePointY1, onePointY2,
secondPointX1, secondPointX2, secondPointY1, secondPointY2 };

this.ActiveControl = onePointX1; //курсор в первом тектовом поле при инизиализации
this.ActiveControl = onePointX1; //курсор в первом тектовом поле при инициализации

CheckIfTextAndLockButton();

Expand Down Expand Up @@ -62,21 +63,23 @@ private void ClearButton_Click(object sender, EventArgs e)
ClearTextBoxes();
}


/// <summary>
/// Проверяет, что все текстовые поля содержат целочисленные значения. <para></para>
/// Если хотя бы одно поле не содержит целочисленный тип, выводит сообщение об ошибке и прерывает выполнение метода.
/// Если хотя бы одно поле не содержит целочисленный тип, выводит сообщение об ошибке и прерывает выполнения вычислений в startCalculateButton_Click().
/// </summary>
private void CheckIfAllTextFieldsAreNumbers()
private bool CheckIfAllTextFieldsAreNumbers()
{
foreach (TextBox textBox in textBoxes)
{
if (!double.TryParse(textBox.Text, out _) && !int.TryParse(textBox.Text, out _))
{
MessageBox.Show("Пожалуйста, введите числовое значение во все поля!", "Error!!!");
return;
return false;

}
}

return true;
}


Expand Down Expand Up @@ -114,27 +117,26 @@ public void FieldIntersectionPoint(double x1, double x2, double x3, double x4,
double x = (b2 - b1) / (m1 - m2);
double y = m1 * x + b1;

MessageBox.Show($"Точка пересечения: ({x}, {y})");
MessageBox.Show($"Точка пересечения: ({x} | {y})");
}
}

private void startCalculateButton_Click(object sender, EventArgs e)
{
CheckIfAllTextFieldsAreNumbers();

double x1 = Double.Parse(onePointX1.Text);
double x2 = Double.Parse(onePointX2.Text);
double y1 = Double.Parse(onePointY1.Text);
double y2 = Double.Parse(onePointY2.Text);
if (CheckIfAllTextFieldsAreNumbers())
{
double x1 = Double.Parse(onePointX1.Text);
double x2 = Double.Parse(onePointX2.Text);
double y1 = Double.Parse(onePointY1.Text);
double y2 = Double.Parse(onePointY2.Text);

double x3 = Double.Parse(secondPointX1.Text);
double x4 = Double.Parse(secondPointX2.Text);
double y3 = Double.Parse(secondPointY1.Text);
double y4 = Double.Parse(secondPointY2.Text);
double x3 = Double.Parse(secondPointX1.Text);
double x4 = Double.Parse(secondPointX2.Text);
double y3 = Double.Parse(secondPointY1.Text);
double y4 = Double.Parse(secondPointY2.Text);

FieldIntersectionPoint(x1, x2, x3, x4, y1, y2, y3, y4);
FieldIntersectionPoint(x1, x2, x3, x4, y1, y2, y3, y4);
}
}


}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
31 changes: 31 additions & 0 deletions app_cpp/ConsoleApplicationBan/ConsoleApplicationBan.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.8.34330.188
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ConsoleApplicationBan", "ConsoleApplicationBan\ConsoleApplicationBan.vcxproj", "{1A68F0B3-469E-4C11-882B-355075ACB4C0}"
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
{1A68F0B3-469E-4C11-882B-355075ACB4C0}.Debug|x64.ActiveCfg = Debug|x64
{1A68F0B3-469E-4C11-882B-355075ACB4C0}.Debug|x64.Build.0 = Debug|x64
{1A68F0B3-469E-4C11-882B-355075ACB4C0}.Debug|x86.ActiveCfg = Debug|Win32
{1A68F0B3-469E-4C11-882B-355075ACB4C0}.Debug|x86.Build.0 = Debug|Win32
{1A68F0B3-469E-4C11-882B-355075ACB4C0}.Release|x64.ActiveCfg = Release|x64
{1A68F0B3-469E-4C11-882B-355075ACB4C0}.Release|x64.Build.0 = Release|x64
{1A68F0B3-469E-4C11-882B-355075ACB4C0}.Release|x86.ActiveCfg = Release|Win32
{1A68F0B3-469E-4C11-882B-355075ACB4C0}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {5399D867-8D4F-400A-BE20-5A934A4C771C}
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// ConsoleApplicationBan.cpp : Этот файл содержит функцию "main". Здесь начинается и заканчивается выполнение программы.
//

#include <iostream>
#include <string>
#include <vector>
#include <locale>
using namespace std;

int main()
{
setlocale(LC_ALL, "ru");

std::vector<std::string> nicknames;
std::string nickname;

std::cout << "Введите никнеймы. Когда закончите, введите 'Ex':" << std::endl;

while (true) {
std::cin >> nickname;
if (nickname == "Ex") {
break;
}
nicknames.push_back(nickname);
}

for (const auto& name : nicknames) {
std::cout << "ban " << name << " Набегатор 0" << std::endl;
}

std::cout << "Для продолжения нажмите любую клавишу . . ." << std::endl;
std::cin.get(); // Для остановки консоли после вывода сообщений
return 0;
}

// Запуск программы: CTRL+F5 или меню "Отладка" > "Запуск без отладки"
// Отладка программы: F5 или меню "Отладка" > "Запустить отладку"

// Советы по началу работы
// 1. В окне обозревателя решений можно добавлять файлы и управлять ими.
// 2. В окне Team Explorer можно подключиться к системе управления версиями.
// 3. В окне "Выходные данные" можно просматривать выходные данные сборки и другие сообщения.
// 4. В окне "Список ошибок" можно просматривать ошибки.
// 5. Последовательно выберите пункты меню "Проект" > "Добавить новый элемент", чтобы создать файлы кода, или "Проект" > "Добавить существующий элемент", чтобы добавить в проект существующие файлы кода.
// 6. Чтобы снова открыть этот проект позже, выберите пункты меню "Файл" > "Открыть" > "Проект" и выберите SLN-файл.
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
<?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>
<PropertyGroup Label="Globals">
<VCProjectVersion>17.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{1a68f0b3-469e-4c11-882b-355075acb4c0}</ProjectGuid>
<RootNamespace>ConsoleApplicationBan</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>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<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" />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="ConsoleApplicationBan.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?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;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Файлы заголовков">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;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="ConsoleApplicationBan.cpp">
<Filter>Исходные файлы</Filter>
</ClCompile>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
C:\Lesson\app_cpp\ConsoleApplicationBan\ConsoleApplicationBan\ConsoleApplicationBan.cpp;C:\Lesson\app_cpp\ConsoleApplicationBan\ConsoleApplicationBan\x64\Debug\ConsoleApplicationBan.obj
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.38.33130:TargetPlatformVersion=10.0.19041.0:
Debug|x64|C:\Lesson\app_cpp\ConsoleApplicationBan\|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<ProjectOutputs>
<ProjectOutput>
<FullPath>C:\Lesson\app_cpp\ConsoleApplicationBan\x64\Debug\ConsoleApplicationBan.exe</FullPath>
</ProjectOutput>
</ProjectOutputs>
<ContentFiles />
<SatelliteDlls />
<NonRecipeFileRefs />
</Project>
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
 ConsoleApplicationBan.cpp
ConsoleApplicationBan.vcxproj -> C:\Lesson\app_cpp\ConsoleApplicationBan\x64\Debug\ConsoleApplicationBan.exe
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
[assembly: System.Reflection.AssemblyCompanyAttribute("ConsoleAppCalculeteKvadro")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+6893951f3c30efc1bbbe895cc6c027f878511f6d")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("ConsoleAppCalculeteKvadro")]
[assembly: System.Reflection.AssemblyTitleAttribute("ConsoleAppCalculeteKvadro")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6f5b80b8a108baefc039e51bcac5ae7721ced2bcc0ec2e4423618408f2745884
aa6e81330e833e501712fe3586c64a54d1c21d5a64cd3973245b04eaccf853ee
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")]
Loading

0 comments on commit 46e48de

Please sign in to comment.