Lista kezeles
This commit is contained in:
6
ListaKezeles/App.config
Normal file
6
ListaKezeles/App.config
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||
</startup>
|
||||
</configuration>
|
||||
54
ListaKezeles/ListaKezeles.csproj
Normal file
54
ListaKezeles/ListaKezeles.csproj
Normal file
@@ -0,0 +1,54 @@
|
||||
<?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>{DF138015-660A-433A-B0D0-1B1FBB70DF02}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>ListaKezeles</RootNamespace>
|
||||
<AssemblyName>ListaKezeles</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<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="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" />
|
||||
<Compile Include="Varosok.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
22
ListaKezeles/Program.cs
Normal file
22
ListaKezeles/Program.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ListaKezeles {
|
||||
public class Program {
|
||||
static void Main(string[] args) {
|
||||
Varosok varosok = new Varosok();
|
||||
//varosok.setDb();
|
||||
varosok.setNevek();
|
||||
varosok.getNevek();
|
||||
varosok.getVan();
|
||||
varosok.delNev();
|
||||
varosok.getNevek();
|
||||
varosok.delLast();
|
||||
varosok.getNevek();
|
||||
Console.ReadKey();
|
||||
}
|
||||
}
|
||||
}
|
||||
36
ListaKezeles/Properties/AssemblyInfo.cs
Normal file
36
ListaKezeles/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("ListaKezeles")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("ListaKezeles")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2022")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("df138015-660a-433a-b0d0-1b1fbb70df02")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
77
ListaKezeles/Varosok.cs
Normal file
77
ListaKezeles/Varosok.cs
Normal file
@@ -0,0 +1,77 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ListaKezeles {
|
||||
public class Varosok {
|
||||
List<string> varosok = new List<string>();
|
||||
string db;
|
||||
|
||||
public string setDb() {
|
||||
Console.WriteLine("Adja meg hany db adatot akar eltarolni, ha 0-t vagy semmit ir be akkor addig fut a beolvasas amig ures sort nem ad be");
|
||||
db = Console.ReadLine();
|
||||
return db;
|
||||
}
|
||||
|
||||
public void setNevek() {
|
||||
string db = setDb();
|
||||
string input = "";
|
||||
|
||||
try {
|
||||
if (db == "" || db == "0") {
|
||||
while (true) {
|
||||
Console.WriteLine("Adja meg a varos nevet");
|
||||
input = Console.ReadLine();
|
||||
if (input == "") break;
|
||||
varosok.Add(input);
|
||||
}
|
||||
} else {
|
||||
int num_db = Convert.ToInt32(db);
|
||||
for (int i = 0; i < num_db; i++) {
|
||||
Console.WriteLine("Adja meg a varos nevet");
|
||||
input = Console.ReadLine();
|
||||
varosok.Add(input);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Console.WriteLine(e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
public void getNevek() {
|
||||
string kiir = "";
|
||||
for (int i = 0; i < varosok.Count; i++) {
|
||||
kiir += varosok[i] + ", ";
|
||||
}
|
||||
kiir.Trim();
|
||||
kiir = kiir.Remove(kiir.Length - 2);
|
||||
Console.WriteLine(kiir);
|
||||
}
|
||||
|
||||
public void getVan() {
|
||||
Console.WriteLine("Adja meg a varos nevet");
|
||||
string input = Console.ReadLine();
|
||||
|
||||
if(varosok.Contains(input))
|
||||
Console.WriteLine("A lista tartalmazza a várost!");
|
||||
else
|
||||
Console.WriteLine("A lista nem tartalmazza a várost!");
|
||||
}
|
||||
|
||||
public void delNev() {
|
||||
Console.WriteLine("Adja meg a varos nevet amit torolni akar, ha nincs a listaban akkor hozza lesz adva");
|
||||
string input = Console.ReadLine();
|
||||
if (varosok.Contains(input))
|
||||
varosok.Remove(input);
|
||||
else
|
||||
varosok.Add(input);
|
||||
}
|
||||
|
||||
public void delLast() {
|
||||
Console.WriteLine("Utolso elem torlese");
|
||||
varosok.RemoveAt(varosok.Count - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
ListaKezeles/bin/Debug/ListaKezeles.exe
Normal file
BIN
ListaKezeles/bin/Debug/ListaKezeles.exe
Normal file
Binary file not shown.
6
ListaKezeles/bin/Debug/ListaKezeles.exe.config
Normal file
6
ListaKezeles/bin/Debug/ListaKezeles.exe.config
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||
</startup>
|
||||
</configuration>
|
||||
BIN
ListaKezeles/bin/Debug/ListaKezeles.pdb
Normal file
BIN
ListaKezeles/bin/Debug/ListaKezeles.pdb
Normal file
Binary file not shown.
@@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
bd721b19d1c7a622a005bdac3632ee39481dbd73
|
||||
@@ -0,0 +1,8 @@
|
||||
C:\dev\c#\c-sharp\ListaKezeles\bin\Debug\ListaKezeles.exe.config
|
||||
C:\dev\c#\c-sharp\ListaKezeles\bin\Debug\ListaKezeles.exe
|
||||
C:\dev\c#\c-sharp\ListaKezeles\bin\Debug\ListaKezeles.pdb
|
||||
C:\dev\c#\c-sharp\ListaKezeles\obj\Debug\ListaKezeles.csproj.AssemblyReference.cache
|
||||
C:\dev\c#\c-sharp\ListaKezeles\obj\Debug\ListaKezeles.csproj.SuggestedBindingRedirects.cache
|
||||
C:\dev\c#\c-sharp\ListaKezeles\obj\Debug\ListaKezeles.csproj.CoreCompileInputs.cache
|
||||
C:\dev\c#\c-sharp\ListaKezeles\obj\Debug\ListaKezeles.exe
|
||||
C:\dev\c#\c-sharp\ListaKezeles\obj\Debug\ListaKezeles.pdb
|
||||
BIN
ListaKezeles/obj/Debug/ListaKezeles.exe
Normal file
BIN
ListaKezeles/obj/Debug/ListaKezeles.exe
Normal file
Binary file not shown.
BIN
ListaKezeles/obj/Debug/ListaKezeles.pdb
Normal file
BIN
ListaKezeles/obj/Debug/ListaKezeles.pdb
Normal file
Binary file not shown.
Reference in New Issue
Block a user