Branch restructuring

This commit is contained in:
Vizard
2026-09-26 20:41:03 +03:00
parent e480b87d9a
commit badb3e0662
6 changed files with 0 additions and 0 deletions
+90
View File
@@ -0,0 +1,90 @@
using System;
using HelpMethods;
namespace Test
{
internal class Program
{
static void Main(string[] args)
{
string
pokemonName = "Чармандер"
, elementType = "Огонь";
byte level = 1;
short hp = 95;
GetInfo(pokemonName, elementType, level, hp);
CreatePassport();
}
/// <summary>
/// Метод для задания №1.
/// </summary>
/// <param name="name"></param>
/// <param name="elType"></param>
/// <param name="lvl"></param>
/// <param name="hp"></param>
static void GetInfo(string name, string elType, byte lvl, short hp)
{
const sbyte margine = -10;
string message =
$@"
====== INFO ======
{"Pokemon:",margine}{name}
{"Element:",margine}{elType}
{"Level:",margine}{lvl} | HP: {hp}
====================
";
Console.WriteLine(message);
SystemHelp.Waiting();
}
/// <summary>
/// Методы для задания №2.
/// </summary>
static void CreatePassport()
{
SetValues();
static void SetValues()
{
byte maxStringLength = 20;
Console.Write("Fill out the forms.\t[20 chars]\n\nTrainer name: ");
string trainerName = StringHelp.CutString(Console.ReadLine(), maxStringLength);
Console.Write("Pokemon name: ");
string pokemonName = StringHelp.CutString(Console.ReadLine(), maxStringLength);
Console.Write("Element type: ");
string elementType = StringHelp.CutString(Console.ReadLine(), maxStringLength);
Console.Write("Region name: ");
string regionName = StringHelp.CutString(Console.ReadLine(), maxStringLength);
PrintPassport(trainerName, pokemonName, elementType, regionName);
}
static void PrintPassport(string trainer, string pokemon, string element, string region)
{
const sbyte
margine1 = -9
, margine2 = -11;
string message =
$@"
*************************************************************
POKEMON'S PASSPORT
{"Trainer:",margine1}{trainer}{" (Region:",margine2}{region})
{"Pokemon:",margine1}{pokemon}{" (Element:",margine2}{element})
*************************************************************
";
Console.WriteLine(message);
}
}
}
}
+58
View File
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{0580ACC5-9C57-48B6-A97B-75103119F024}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>Test</RootNamespace>
<AssemblyName>Test</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<LangVersion>latest</LangVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="MyDll, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>.\MyDll.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
Binary file not shown.