asd
This commit is contained in:
parent
21cb07657d
commit
0fc2b5f641
BIN
20250130/Gyakorló feladat.pdf
Normal file
BIN
20250130/Gyakorló feladat.pdf
Normal file
Binary file not shown.
Binary file not shown.
BIN
20250130/KonyvtariRendszerWPF/.vs/KonyvtariRendszerWPF/v17/.suo
Normal file
BIN
20250130/KonyvtariRendszerWPF/.vs/KonyvtariRendszerWPF/v17/.suo
Normal file
Binary file not shown.
|
@ -0,0 +1,53 @@
|
|||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250130\\KonyvtariRendszerWPF\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{96701F99-C281-4113-876B-8CF41CF826D8}|KonyvtariRendszerWPF\\KonyvtariRendszerWPF.csproj|c:\\users\\szabomarton\\desktop\\c#\\progaora\\20250130\\konyvtarirendszerwpf\\konyvtarirendszerwpf\\mainwindow.xaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{96701F99-C281-4113-876B-8CF41CF826D8}|KonyvtariRendszerWPF\\KonyvtariRendszerWPF.csproj|solutionrelative:konyvtarirendszerwpf\\mainwindow.xaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{96701F99-C281-4113-876B-8CF41CF826D8}|KonyvtariRendszerWPF\\KonyvtariRendszerWPF.csproj|c:\\users\\szabomarton\\desktop\\c#\\progaora\\20250130\\konyvtarirendszerwpf\\konyvtarirendszerwpf\\mainwindow.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}",
|
||||
"RelativeMoniker": "D:0:0:{96701F99-C281-4113-876B-8CF41CF826D8}|KonyvtariRendszerWPF\\KonyvtariRendszerWPF.csproj|solutionrelative:konyvtarirendszerwpf\\mainwindow.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}"
|
||||
}
|
||||
],
|
||||
"DocumentGroupContainers": [
|
||||
{
|
||||
"Orientation": 0,
|
||||
"VerticalTabListWidth": 256,
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": 1,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 1,
|
||||
"Title": "MainWindow.xaml",
|
||||
"DocumentMoniker": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250130\\KonyvtariRendszerWPF\\KonyvtariRendszerWPF\\MainWindow.xaml",
|
||||
"RelativeDocumentMoniker": "KonyvtariRendszerWPF\\MainWindow.xaml",
|
||||
"ToolTip": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250130\\KonyvtariRendszerWPF\\KonyvtariRendszerWPF\\MainWindow.xaml",
|
||||
"RelativeToolTip": "KonyvtariRendszerWPF\\MainWindow.xaml",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|",
|
||||
"WhenOpened": "2025-01-30T08:05:14.953Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "MainWindow.xaml.cs",
|
||||
"DocumentMoniker": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250130\\KonyvtariRendszerWPF\\KonyvtariRendszerWPF\\MainWindow.xaml.cs",
|
||||
"RelativeDocumentMoniker": "KonyvtariRendszerWPF\\MainWindow.xaml.cs",
|
||||
"ToolTip": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250130\\KonyvtariRendszerWPF\\KonyvtariRendszerWPF\\MainWindow.xaml.cs",
|
||||
"RelativeToolTip": "KonyvtariRendszerWPF\\MainWindow.xaml.cs",
|
||||
"ViewState": "AgIAAAABAAAAAAAAAAAzwCYBAAAKAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-01-30T08:05:14.694Z",
|
||||
"EditorCaption": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250130\\KonyvtariRendszerWPF\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{96701F99-C281-4113-876B-8CF41CF826D8}|KonyvtariRendszerWPF\\KonyvtariRendszerWPF.csproj|c:\\users\\szabomarton\\desktop\\c#\\progaora\\20250130\\konyvtarirendszerwpf\\konyvtarirendszerwpf\\mainwindow.xaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{96701F99-C281-4113-876B-8CF41CF826D8}|KonyvtariRendszerWPF\\KonyvtariRendszerWPF.csproj|solutionrelative:konyvtarirendszerwpf\\mainwindow.xaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{96701F99-C281-4113-876B-8CF41CF826D8}|KonyvtariRendszerWPF\\KonyvtariRendszerWPF.csproj|c:\\users\\szabomarton\\desktop\\c#\\progaora\\20250130\\konyvtarirendszerwpf\\konyvtarirendszerwpf\\mainwindow.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}",
|
||||
"RelativeMoniker": "D:0:0:{96701F99-C281-4113-876B-8CF41CF826D8}|KonyvtariRendszerWPF\\KonyvtariRendszerWPF.csproj|solutionrelative:konyvtarirendszerwpf\\mainwindow.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}"
|
||||
}
|
||||
],
|
||||
"DocumentGroupContainers": [
|
||||
{
|
||||
"Orientation": 0,
|
||||
"VerticalTabListWidth": 256,
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": 1,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 1,
|
||||
"Title": "MainWindow.xaml",
|
||||
"DocumentMoniker": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250130\\KonyvtariRendszerWPF\\KonyvtariRendszerWPF\\MainWindow.xaml",
|
||||
"RelativeDocumentMoniker": "KonyvtariRendszerWPF\\MainWindow.xaml",
|
||||
"ToolTip": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250130\\KonyvtariRendszerWPF\\KonyvtariRendszerWPF\\MainWindow.xaml",
|
||||
"RelativeToolTip": "KonyvtariRendszerWPF\\MainWindow.xaml",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|",
|
||||
"WhenOpened": "2025-01-30T08:05:14.953Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "MainWindow.xaml.cs",
|
||||
"DocumentMoniker": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250130\\KonyvtariRendszerWPF\\KonyvtariRendszerWPF\\MainWindow.xaml.cs",
|
||||
"RelativeDocumentMoniker": "KonyvtariRendszerWPF\\MainWindow.xaml.cs",
|
||||
"ToolTip": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250130\\KonyvtariRendszerWPF\\KonyvtariRendszerWPF\\MainWindow.xaml.cs",
|
||||
"RelativeToolTip": "KonyvtariRendszerWPF\\MainWindow.xaml.cs",
|
||||
"ViewState": "AgIAAAcBAAAAAAAAAADwvyYBAAAKAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-01-30T08:05:14.694Z",
|
||||
"EditorCaption": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
25
20250130/KonyvtariRendszerWPF/KonyvtariRendszerWPF.sln
Normal file
25
20250130/KonyvtariRendszerWPF/KonyvtariRendszerWPF.sln
Normal file
|
@ -0,0 +1,25 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.11.35222.181
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KonyvtariRendszerWPF", "KonyvtariRendszerWPF\KonyvtariRendszerWPF.csproj", "{96701F99-C281-4113-876B-8CF41CF826D8}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{96701F99-C281-4113-876B-8CF41CF826D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{96701F99-C281-4113-876B-8CF41CF826D8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{96701F99-C281-4113-876B-8CF41CF826D8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{96701F99-C281-4113-876B-8CF41CF826D8}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {AF9ED3F9-677E-4C65-92D3-43214C3C83D0}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -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>
|
|
@ -0,0 +1,9 @@
|
|||
<Application x:Class="KonyvtariRendszerWPF.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:KonyvtariRendszerWPF"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
|
||||
</Application.Resources>
|
||||
</Application>
|
|
@ -0,0 +1,17 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
||||
namespace KonyvtariRendszerWPF
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for App.xaml
|
||||
/// </summary>
|
||||
public partial class App : Application
|
||||
{
|
||||
}
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
<?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>{96701F99-C281-4113-876B-8CF41CF826D8}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>KonyvtariRendszerWPF</RootNamespace>
|
||||
<AssemblyName>KonyvtariRendszerWPF</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<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.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xaml">
|
||||
<RequiredTargetFramework>4.0</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="WindowsBase" />
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ApplicationDefinition Include="App.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</ApplicationDefinition>
|
||||
<Page Include="MainWindow.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Compile Include="App.xaml.cs">
|
||||
<DependentUpon>App.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MainWindow.xaml.cs">
|
||||
<DependentUpon>MainWindow.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
|
@ -0,0 +1,62 @@
|
|||
<Window x:Class="KonyvtariRendszerWPF.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:KonyvtariRendszerWPF"
|
||||
mc:Ignorable="d"
|
||||
Title="MainWindow" Height="450" Width="800">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ListView Grid.Row="0" Grid.Column="0" Grid.RowSpan="4" x:Name="konyvekList" SelectionChanged="konyvekList_SelectionChanged"></ListView>
|
||||
<Grid Grid.Row="0" Grid.Column="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBox Grid.Row="0" Grid.Column="1" x:Name="CimTextbox"></TextBox>
|
||||
<TextBox Grid.Row="1" Grid.Column="1" x:Name="SzerzoTextbox"></TextBox>
|
||||
<TextBox Grid.Row="2" Grid.Column="1" x:Name="KiadasTextbox"></TextBox>
|
||||
<TextBox Grid.Row="3" Grid.Column="1" x:Name="DarabTextbox"></TextBox>
|
||||
|
||||
<Label Grid.Row="0" Grid.Column="0" FontSize="20" HorizontalAlignment="Center">Cím</Label>
|
||||
<Label Grid.Row="1" Grid.Column="0" FontSize="20" HorizontalAlignment="Center">Szerző</Label>
|
||||
<Label Grid.Row="2" Grid.Column="0" FontSize="20" HorizontalAlignment="Center">Kiadás éve</Label>
|
||||
<Label Grid.Row="3" Grid.Column="0" FontSize="20" HorizontalAlignment="Center">Darabszám</Label>
|
||||
|
||||
<Button Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ElemhozzaadButton" Click="ElemhozzaadButton_Click">Elem hozzáadása</Button>
|
||||
|
||||
</Grid>
|
||||
<Grid Grid.Row="1" Grid.Column="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Click="Remove_Click">Könyv törlése</Button>
|
||||
<Button Grid.Row="0" Grid.Column="1" Click="Edit_Click">Könyv Módosítása</Button>
|
||||
<Button Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" Click="Search_Click">Keresés cím alapján</Button>
|
||||
<Button Grid.Row="2" Grid.Column="0">Adatok betöltése</Button>
|
||||
<Button Grid.Row="2" Grid.Column="1">Adatok mentése</Button>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Window>
|
|
@ -0,0 +1,297 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace KonyvtariRendszerWPF
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MainWindow.xaml
|
||||
/// </summary>
|
||||
public class Konyvtar
|
||||
{
|
||||
public List<Konyv> konyvek = new List<Konyv>();
|
||||
|
||||
public Konyvtar(List<Konyv> konyvek)
|
||||
{
|
||||
this.konyvek = konyvek;
|
||||
}
|
||||
|
||||
public Konyvtar()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void KonyvFelvetel(Konyv konyv)
|
||||
{
|
||||
if (!konyvek.Contains(konyv))
|
||||
{
|
||||
konyvek.Add(konyv);
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < konyvek.Count; i++)
|
||||
{
|
||||
if (konyvek[i].cim == konyv.cim)
|
||||
{
|
||||
konyvek[i].darabszam++;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
public void Kiiras()
|
||||
{
|
||||
foreach (var item in konyvek)
|
||||
{
|
||||
Console.WriteLine($"Cím: {item.cim}, Szerző: {item.szerzo}, Kiadás éve: {item.kiadasEve}, Darab: {item.darabszam}");
|
||||
}
|
||||
}
|
||||
|
||||
public List<string> Kilistazas()
|
||||
{
|
||||
var list = new List<string>();
|
||||
foreach (var item in konyvek)
|
||||
{
|
||||
list.Add($"{item.cim}");
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
public Konyv KeresesCimAlapjan(string cim)
|
||||
{
|
||||
foreach (var item in konyvek)
|
||||
{
|
||||
if (cim == item.cim)
|
||||
{
|
||||
return item;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
/*
|
||||
public void KeresesCimAlapjan(string cim)
|
||||
{
|
||||
Konyv konyv = KeresesCim(cim);
|
||||
if (konyv != null)
|
||||
{
|
||||
Console.WriteLine($"Cím: {konyv.cim}, Szerző: {konyv.szerzo}, Kiadás éve: {konyv.kiadasEve}, Darab: {konyv.darabszam}");
|
||||
return;
|
||||
}
|
||||
|
||||
Console.WriteLine("Nincs ilyen című könyv!");
|
||||
}
|
||||
*/
|
||||
|
||||
private List<Konyv> KeresesSzerzo(string szerzo)
|
||||
{
|
||||
List<Konyv> talalatok = new List<Konyv>();
|
||||
foreach (var item in konyvek)
|
||||
{
|
||||
if (item.szerzo == szerzo)
|
||||
{
|
||||
talalatok.Add(item);
|
||||
}
|
||||
}
|
||||
|
||||
return talalatok;
|
||||
}
|
||||
|
||||
public void KeresesSzerzoAlapjan(string szerzo)
|
||||
{
|
||||
List<Konyv> talalatok = KeresesSzerzo(szerzo);
|
||||
|
||||
if (talalatok.Count != 0)
|
||||
{
|
||||
foreach (var item in talalatok)
|
||||
{
|
||||
Console.WriteLine($"Cím: {item.cim}, Szerző: {item.szerzo}, Kiadás éve: {item.kiadasEve}, Darab: {item.darabszam}");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Console.WriteLine("A keresett szerzőtől nem találtunk könyvet!");
|
||||
}
|
||||
|
||||
public void KonyvModositas(Konyv modositando, Konyv modositott)
|
||||
{
|
||||
for (int i = 0; i < konyvek.Count; i++)
|
||||
{
|
||||
if (konyvek[i].cim == modositando.cim)
|
||||
{
|
||||
konyvek[i] = modositott;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void KonyvTorles(Konyv torlendo)
|
||||
{
|
||||
konyvek.Remove(torlendo);
|
||||
}
|
||||
}
|
||||
|
||||
public class Konyv
|
||||
{
|
||||
public string cim;
|
||||
public string szerzo;
|
||||
public int kiadasEve;
|
||||
public int darabszam = 1;
|
||||
|
||||
public Konyv(string cim, string szerzo, int kiadasEve)
|
||||
{
|
||||
this.cim = cim;
|
||||
this.szerzo = szerzo;
|
||||
this.kiadasEve = kiadasEve;
|
||||
}
|
||||
|
||||
public Konyv(string cim, string szerzo, int kiadasEve, int darabszam)
|
||||
{
|
||||
this.cim = cim;
|
||||
this.szerzo = szerzo;
|
||||
this.kiadasEve = kiadasEve;
|
||||
this.darabszam = darabszam;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
public static Konyvtar konyvtar = new Konyvtar();
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
string path = "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250130\\konyvek.txt";
|
||||
konyvtar = new Konyvtar(FileReading(path));
|
||||
|
||||
Kilistazas();
|
||||
}
|
||||
|
||||
public void Kilistazas()
|
||||
{
|
||||
konyvekList.Items.Clear();
|
||||
|
||||
List<string> asd = konyvtar.Kilistazas();
|
||||
foreach (var item in asd)
|
||||
{
|
||||
konyvekList.Items.Add(item);
|
||||
}
|
||||
}
|
||||
|
||||
private void konyvekList_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
string cim = konyvekList.SelectedItem.ToString();
|
||||
|
||||
Konyv konyv = konyvtar.KeresesCimAlapjan(cim);
|
||||
|
||||
if (konyv != null)
|
||||
{
|
||||
CimTextbox.Text = konyv.cim;
|
||||
SzerzoTextbox.Text = konyv.szerzo;
|
||||
KiadasTextbox.Text = $"{konyv.kiadasEve}";
|
||||
DarabTextbox.Text = $"{konyv.darabszam}";
|
||||
}
|
||||
}
|
||||
|
||||
public static List<Konyv> FileReading(string path)
|
||||
{
|
||||
List<Konyv> konyvek = new List<Konyv>();
|
||||
|
||||
FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read);
|
||||
StreamReader streamReader = new StreamReader(fileStream);
|
||||
|
||||
string line = streamReader.ReadLine();
|
||||
while (line != null)
|
||||
{
|
||||
string[] adatok = line.Split(';');
|
||||
Konyv konyv = new Konyv(adatok[0], adatok[1], Convert.ToInt32(adatok[2]), Convert.ToInt32(adatok[3]));
|
||||
konyvek.Add(konyv);
|
||||
line = streamReader.ReadLine();
|
||||
}
|
||||
|
||||
|
||||
streamReader.Close();
|
||||
fileStream.Close();
|
||||
|
||||
return konyvek;
|
||||
}
|
||||
|
||||
private void ElemhozzaadButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (CimTextbox.Text != "" &&
|
||||
SzerzoTextbox.Text != "" &&
|
||||
KiadasTextbox.Text != "" &&
|
||||
DarabTextbox.Text != "")
|
||||
{
|
||||
// Az elemek ki vannak töltve
|
||||
string cim = CimTextbox.Text;
|
||||
string szerzo = SzerzoTextbox.Text;
|
||||
int kiadasInt;
|
||||
bool kiadas = Int32.TryParse(KiadasTextbox.Text, out kiadasInt);
|
||||
int darabInt;
|
||||
bool darab = Int32.TryParse(DarabTextbox.Text, out darabInt);
|
||||
if (kiadas && darab)
|
||||
{
|
||||
Konyv konyv = new Konyv(cim, szerzo, kiadasInt, darabInt);
|
||||
konyvtar.KonyvFelvetel(konyv);
|
||||
}
|
||||
}
|
||||
|
||||
Kilistazas();
|
||||
}
|
||||
|
||||
private void Search_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
string cim = CimTextbox.Text;
|
||||
if (cim != "")
|
||||
{
|
||||
Konyv konyv = konyvtar.KeresesCimAlapjan(cim);
|
||||
|
||||
if (konyv != null)
|
||||
{
|
||||
CimTextbox.Text = konyv.cim;
|
||||
SzerzoTextbox.Text = konyv.szerzo;
|
||||
KiadasTextbox.Text = $"{konyv.kiadasEve}";
|
||||
DarabTextbox.Text = $"{konyv.darabszam}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
private void Remove_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
string cim = CimTextbox.Text;
|
||||
if (cim != "")
|
||||
{
|
||||
Konyv konyv = konyvtar.KeresesCimAlapjan(cim);
|
||||
|
||||
if (konyv != null)
|
||||
{
|
||||
konyvtar.KonyvTorles(konyv);
|
||||
}
|
||||
}
|
||||
|
||||
CimTextbox.Text = "";
|
||||
SzerzoTextbox.Text = "";
|
||||
KiadasTextbox.Text = "";
|
||||
DarabTextbox.Text = "";
|
||||
|
||||
Kilistazas();
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
using System.Reflection;
|
||||
using System.Resources;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows;
|
||||
|
||||
// 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("KonyvtariRendszerWPF")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("KonyvtariRendszerWPF")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2025")]
|
||||
[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)]
|
||||
|
||||
//In order to begin building localizable applications, set
|
||||
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
|
||||
//inside a <PropertyGroup>. For example, if you are using US english
|
||||
//in your source files, set the <UICulture> to en-US. Then uncomment
|
||||
//the NeutralResourceLanguage attribute below. Update the "en-US" in
|
||||
//the line below to match the UICulture setting in the project file.
|
||||
|
||||
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
|
||||
|
||||
|
||||
[assembly: ThemeInfo(
|
||||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
|
||||
//(used if a resource is not found in the page,
|
||||
// or application resource dictionaries)
|
||||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
|
||||
//(used if a resource is not found in the page,
|
||||
// app, or any theme specific resource dictionaries)
|
||||
)]
|
||||
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
71
20250130/KonyvtariRendszerWPF/KonyvtariRendszerWPF/Properties/Resources.Designer.cs
generated
Normal file
71
20250130/KonyvtariRendszerWPF/KonyvtariRendszerWPF/Properties/Resources.Designer.cs
generated
Normal file
|
@ -0,0 +1,71 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace KonyvtariRendszerWPF.Properties
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources
|
||||
{
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((resourceMan == null))
|
||||
{
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("KonyvtariRendszerWPF.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
return resourceCulture;
|
||||
}
|
||||
set
|
||||
{
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,117 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
30
20250130/KonyvtariRendszerWPF/KonyvtariRendszerWPF/Properties/Settings.Designer.cs
generated
Normal file
30
20250130/KonyvtariRendszerWPF/KonyvtariRendszerWPF/Properties/Settings.Designer.cs
generated
Normal file
|
@ -0,0 +1,30 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace KonyvtariRendszerWPF.Properties
|
||||
{
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default
|
||||
{
|
||||
get
|
||||
{
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
Binary file not shown.
|
@ -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>
|
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")]
|
|
@ -0,0 +1,70 @@
|
|||
#pragma checksum "..\..\App.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "826A44A5137BD9A2E84C016727CA40415D6302CB43F9EF2D08724AE1FE228262"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using KonyvtariRendszerWPF;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Effects;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media.Media3D;
|
||||
using System.Windows.Media.TextFormatting;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Shell;
|
||||
|
||||
|
||||
namespace KonyvtariRendszerWPF {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// App
|
||||
/// </summary>
|
||||
public partial class App : System.Windows.Application {
|
||||
|
||||
/// <summary>
|
||||
/// InitializeComponent
|
||||
/// </summary>
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
public void InitializeComponent() {
|
||||
|
||||
#line 5 "..\..\App.xaml"
|
||||
this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Application Entry Point.
|
||||
/// </summary>
|
||||
[System.STAThreadAttribute()]
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
public static void Main() {
|
||||
KonyvtariRendszerWPF.App app = new KonyvtariRendszerWPF.App();
|
||||
app.InitializeComponent();
|
||||
app.Run();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
#pragma checksum "..\..\App.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "826A44A5137BD9A2E84C016727CA40415D6302CB43F9EF2D08724AE1FE228262"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using KonyvtariRendszerWPF;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Effects;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media.Media3D;
|
||||
using System.Windows.Media.TextFormatting;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Shell;
|
||||
|
||||
|
||||
namespace KonyvtariRendszerWPF {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// App
|
||||
/// </summary>
|
||||
public partial class App : System.Windows.Application {
|
||||
|
||||
/// <summary>
|
||||
/// InitializeComponent
|
||||
/// </summary>
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
public void InitializeComponent() {
|
||||
|
||||
#line 5 "..\..\App.xaml"
|
||||
this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Application Entry Point.
|
||||
/// </summary>
|
||||
[System.STAThreadAttribute()]
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
public static void Main() {
|
||||
KonyvtariRendszerWPF.App app = new KonyvtariRendszerWPF.App();
|
||||
app.InitializeComponent();
|
||||
app.Run();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
022e8afb99dabbb417179cef61ab38bd83ebc02ee932f709e12e51353f5525a8
|
|
@ -0,0 +1,15 @@
|
|||
C:\Users\szabomarton\Desktop\C#\ProgaOra\20250130\KonyvtariRendszerWPF\KonyvtariRendszerWPF\bin\Debug\KonyvtariRendszerWPF.exe.config
|
||||
C:\Users\szabomarton\Desktop\C#\ProgaOra\20250130\KonyvtariRendszerWPF\KonyvtariRendszerWPF\bin\Debug\KonyvtariRendszerWPF.exe
|
||||
C:\Users\szabomarton\Desktop\C#\ProgaOra\20250130\KonyvtariRendszerWPF\KonyvtariRendszerWPF\bin\Debug\KonyvtariRendszerWPF.pdb
|
||||
C:\Users\szabomarton\Desktop\C#\ProgaOra\20250130\KonyvtariRendszerWPF\KonyvtariRendszerWPF\obj\Debug\KonyvtariRendszerWPF.csproj.AssemblyReference.cache
|
||||
C:\Users\szabomarton\Desktop\C#\ProgaOra\20250130\KonyvtariRendszerWPF\KonyvtariRendszerWPF\obj\Debug\MainWindow.g.cs
|
||||
C:\Users\szabomarton\Desktop\C#\ProgaOra\20250130\KonyvtariRendszerWPF\KonyvtariRendszerWPF\obj\Debug\App.g.cs
|
||||
C:\Users\szabomarton\Desktop\C#\ProgaOra\20250130\KonyvtariRendszerWPF\KonyvtariRendszerWPF\obj\Debug\KonyvtariRendszerWPF_MarkupCompile.cache
|
||||
C:\Users\szabomarton\Desktop\C#\ProgaOra\20250130\KonyvtariRendszerWPF\KonyvtariRendszerWPF\obj\Debug\KonyvtariRendszerWPF_MarkupCompile.lref
|
||||
C:\Users\szabomarton\Desktop\C#\ProgaOra\20250130\KonyvtariRendszerWPF\KonyvtariRendszerWPF\obj\Debug\MainWindow.baml
|
||||
C:\Users\szabomarton\Desktop\C#\ProgaOra\20250130\KonyvtariRendszerWPF\KonyvtariRendszerWPF\obj\Debug\KonyvtariRendszerWPF.g.resources
|
||||
C:\Users\szabomarton\Desktop\C#\ProgaOra\20250130\KonyvtariRendszerWPF\KonyvtariRendszerWPF\obj\Debug\KonyvtariRendszerWPF.Properties.Resources.resources
|
||||
C:\Users\szabomarton\Desktop\C#\ProgaOra\20250130\KonyvtariRendszerWPF\KonyvtariRendszerWPF\obj\Debug\KonyvtariRendszerWPF.csproj.GenerateResource.cache
|
||||
C:\Users\szabomarton\Desktop\C#\ProgaOra\20250130\KonyvtariRendszerWPF\KonyvtariRendszerWPF\obj\Debug\KonyvtariRendszerWPF.csproj.CoreCompileInputs.cache
|
||||
C:\Users\szabomarton\Desktop\C#\ProgaOra\20250130\KonyvtariRendszerWPF\KonyvtariRendszerWPF\obj\Debug\KonyvtariRendszerWPF.exe
|
||||
C:\Users\szabomarton\Desktop\C#\ProgaOra\20250130\KonyvtariRendszerWPF\KonyvtariRendszerWPF\obj\Debug\KonyvtariRendszerWPF.pdb
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,20 @@
|
|||
KonyvtariRendszerWPF
|
||||
|
||||
|
||||
winexe
|
||||
C#
|
||||
.cs
|
||||
C:\Users\szabomarton\Desktop\C#\ProgaOra\20250130\KonyvtariRendszerWPF\KonyvtariRendszerWPF\obj\Debug\
|
||||
KonyvtariRendszerWPF
|
||||
none
|
||||
false
|
||||
DEBUG;TRACE
|
||||
C:\Users\szabomarton\Desktop\C#\ProgaOra\20250130\KonyvtariRendszerWPF\KonyvtariRendszerWPF\App.xaml
|
||||
1219584333
|
||||
|
||||
51579654133
|
||||
13-1310406943
|
||||
MainWindow.xaml;
|
||||
|
||||
True
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
KonyvtariRendszerWPF
|
||||
|
||||
|
||||
winexe
|
||||
C#
|
||||
.cs
|
||||
C:\Users\szabomarton\Desktop\C#\ProgaOra\20250130\KonyvtariRendszerWPF\KonyvtariRendszerWPF\obj\Debug\
|
||||
KonyvtariRendszerWPF
|
||||
none
|
||||
false
|
||||
DEBUG;TRACE
|
||||
C:\Users\szabomarton\Desktop\C#\ProgaOra\20250130\KonyvtariRendszerWPF\KonyvtariRendszerWPF\App.xaml
|
||||
1219584333
|
||||
|
||||
6-502434485
|
||||
13-1310406943
|
||||
MainWindow.xaml;
|
||||
|
||||
True
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
|
||||
|
||||
FC:\Users\szabomarton\Desktop\C#\ProgaOra\20250130\KonyvtariRendszerWPF\KonyvtariRendszerWPF\MainWindow.xaml;;
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
|
||||
|
||||
FC:\Users\szabomarton\Desktop\C#\ProgaOra\20250130\KonyvtariRendszerWPF\KonyvtariRendszerWPF\MainWindow.xaml;;
|
||||
|
|
@ -0,0 +1,180 @@
|
|||
#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "1445D2A2B36D35331254583D5C7B403673E5A4925E440345B7D55B811324131E"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using KonyvtariRendszerWPF;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Effects;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media.Media3D;
|
||||
using System.Windows.Media.TextFormatting;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Shell;
|
||||
|
||||
|
||||
namespace KonyvtariRendszerWPF {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// MainWindow
|
||||
/// </summary>
|
||||
public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
|
||||
|
||||
|
||||
#line 18 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.ListView konyvekList;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 32 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox CimTextbox;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 33 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox SzerzoTextbox;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 34 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox KiadasTextbox;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 35 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox DarabTextbox;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 42 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.Button ElemhozzaadButton;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
/// InitializeComponent
|
||||
/// </summary>
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
public void InitializeComponent() {
|
||||
if (_contentLoaded) {
|
||||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/KonyvtariRendszerWPF;component/mainwindow.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\MainWindow.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
|
||||
switch (connectionId)
|
||||
{
|
||||
case 1:
|
||||
this.konyvekList = ((System.Windows.Controls.ListView)(target));
|
||||
|
||||
#line 18 "..\..\MainWindow.xaml"
|
||||
this.konyvekList.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.konyvekList_SelectionChanged);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 2:
|
||||
this.CimTextbox = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 3:
|
||||
this.SzerzoTextbox = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 4:
|
||||
this.KiadasTextbox = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 5:
|
||||
this.DarabTextbox = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 6:
|
||||
this.ElemhozzaadButton = ((System.Windows.Controls.Button)(target));
|
||||
|
||||
#line 42 "..\..\MainWindow.xaml"
|
||||
this.ElemhozzaadButton.Click += new System.Windows.RoutedEventHandler(this.ElemhozzaadButton_Click);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 7:
|
||||
|
||||
#line 55 "..\..\MainWindow.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Remove_Click);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 8:
|
||||
|
||||
#line 56 "..\..\MainWindow.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Edit_Click);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 9:
|
||||
|
||||
#line 57 "..\..\MainWindow.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Search_Click);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
}
|
||||
this._contentLoaded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,180 @@
|
|||
#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "1445D2A2B36D35331254583D5C7B403673E5A4925E440345B7D55B811324131E"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using KonyvtariRendszerWPF;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Effects;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media.Media3D;
|
||||
using System.Windows.Media.TextFormatting;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Shell;
|
||||
|
||||
|
||||
namespace KonyvtariRendszerWPF {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// MainWindow
|
||||
/// </summary>
|
||||
public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
|
||||
|
||||
|
||||
#line 18 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.ListView konyvekList;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 32 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox CimTextbox;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 33 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox SzerzoTextbox;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 34 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox KiadasTextbox;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 35 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox DarabTextbox;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 42 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.Button ElemhozzaadButton;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
/// InitializeComponent
|
||||
/// </summary>
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
public void InitializeComponent() {
|
||||
if (_contentLoaded) {
|
||||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/KonyvtariRendszerWPF;component/mainwindow.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\MainWindow.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
|
||||
switch (connectionId)
|
||||
{
|
||||
case 1:
|
||||
this.konyvekList = ((System.Windows.Controls.ListView)(target));
|
||||
|
||||
#line 18 "..\..\MainWindow.xaml"
|
||||
this.konyvekList.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.konyvekList_SelectionChanged);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 2:
|
||||
this.CimTextbox = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 3:
|
||||
this.SzerzoTextbox = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 4:
|
||||
this.KiadasTextbox = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 5:
|
||||
this.DarabTextbox = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 6:
|
||||
this.ElemhozzaadButton = ((System.Windows.Controls.Button)(target));
|
||||
|
||||
#line 42 "..\..\MainWindow.xaml"
|
||||
this.ElemhozzaadButton.Click += new System.Windows.RoutedEventHandler(this.ElemhozzaadButton_Click);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 7:
|
||||
|
||||
#line 55 "..\..\MainWindow.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Remove_Click);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 8:
|
||||
|
||||
#line 56 "..\..\MainWindow.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Edit_Click);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 9:
|
||||
|
||||
#line 57 "..\..\MainWindow.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Search_Click);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
}
|
||||
this._contentLoaded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
BIN
20250130/Konyvtari_Rendszer/.vs/Konyvtari_Rendszer/v17/.suo
Normal file
BIN
20250130/Konyvtari_Rendszer/.vs/Konyvtari_Rendszer/v17/.suo
Normal file
Binary file not shown.
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250130\\Konyvtari_Rendszer\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{0B7010BC-8A3D-4289-AFDB-FEA2C7B1AE15}|Konyvtari_Rendszer\\Konyvtari_Rendszer.csproj|c:\\users\\szabomarton\\desktop\\c#\\progaora\\20250130\\konyvtari_rendszer\\konyvtari_rendszer\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{0B7010BC-8A3D-4289-AFDB-FEA2C7B1AE15}|Konyvtari_Rendszer\\Konyvtari_Rendszer.csproj|solutionrelative:konyvtari_rendszer\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
}
|
||||
],
|
||||
"DocumentGroupContainers": [
|
||||
{
|
||||
"Orientation": 0,
|
||||
"VerticalTabListWidth": 256,
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": 0,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "Program.cs",
|
||||
"DocumentMoniker": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250130\\Konyvtari_Rendszer\\Konyvtari_Rendszer\\Program.cs",
|
||||
"RelativeDocumentMoniker": "Konyvtari_Rendszer\\Program.cs",
|
||||
"ToolTip": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250130\\Konyvtari_Rendszer\\Konyvtari_Rendszer\\Program.cs",
|
||||
"RelativeToolTip": "Konyvtari_Rendszer\\Program.cs",
|
||||
"ViewState": "AgIAAKEAAAAAAAAAAAAcwLAAAAAAAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-01-30T06:56:13.633Z",
|
||||
"EditorCaption": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250130\\Konyvtari_Rendszer\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{0B7010BC-8A3D-4289-AFDB-FEA2C7B1AE15}|Konyvtari_Rendszer\\Konyvtari_Rendszer.csproj|c:\\users\\szabomarton\\desktop\\c#\\progaora\\20250130\\konyvtari_rendszer\\konyvtari_rendszer\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{0B7010BC-8A3D-4289-AFDB-FEA2C7B1AE15}|Konyvtari_Rendszer\\Konyvtari_Rendszer.csproj|solutionrelative:konyvtari_rendszer\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
}
|
||||
],
|
||||
"DocumentGroupContainers": [
|
||||
{
|
||||
"Orientation": 0,
|
||||
"VerticalTabListWidth": 256,
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": 0,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "Program.cs",
|
||||
"DocumentMoniker": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250130\\Konyvtari_Rendszer\\Konyvtari_Rendszer\\Program.cs",
|
||||
"RelativeDocumentMoniker": "Konyvtari_Rendszer\\Program.cs",
|
||||
"ToolTip": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250130\\Konyvtari_Rendszer\\Konyvtari_Rendszer\\Program.cs",
|
||||
"RelativeToolTip": "Konyvtari_Rendszer\\Program.cs",
|
||||
"ViewState": "AgIAAK0AAAAAAAAAAAAcwMwAAAAAAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-01-30T06:56:13.633Z",
|
||||
"EditorCaption": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
25
20250130/Konyvtari_Rendszer/Konyvtari_Rendszer.sln
Normal file
25
20250130/Konyvtari_Rendszer/Konyvtari_Rendszer.sln
Normal file
|
@ -0,0 +1,25 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.11.35222.181
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Konyvtari_Rendszer", "Konyvtari_Rendszer\Konyvtari_Rendszer.csproj", "{0B7010BC-8A3D-4289-AFDB-FEA2C7B1AE15}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{0B7010BC-8A3D-4289-AFDB-FEA2C7B1AE15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0B7010BC-8A3D-4289-AFDB-FEA2C7B1AE15}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0B7010BC-8A3D-4289-AFDB-FEA2C7B1AE15}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0B7010BC-8A3D-4289-AFDB-FEA2C7B1AE15}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {EDE0055D-B30F-4BD3-B2D2-D9E69D31DD3C}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -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>
|
|
@ -0,0 +1,53 @@
|
|||
<?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>{0B7010BC-8A3D-4289-AFDB-FEA2C7B1AE15}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>Konyvtari_Rendszer</RootNamespace>
|
||||
<AssemblyName>Konyvtari_Rendszer</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" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
204
20250130/Konyvtari_Rendszer/Konyvtari_Rendszer/Program.cs
Normal file
204
20250130/Konyvtari_Rendszer/Konyvtari_Rendszer/Program.cs
Normal file
|
@ -0,0 +1,204 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.Contracts;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Konyvtari_Rendszer
|
||||
{
|
||||
public class Konyvtar
|
||||
{
|
||||
public List<Konyv> konyvek = new List<Konyv>();
|
||||
|
||||
public Konyvtar(List<Konyv> konyvek) {
|
||||
this.konyvek = konyvek;
|
||||
}
|
||||
|
||||
public Konyvtar()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void KonyvFelvetel(Konyv konyv)
|
||||
{
|
||||
if (!konyvek.Contains(konyv))
|
||||
{
|
||||
konyvek.Add(konyv);
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < konyvek.Count; i++)
|
||||
{
|
||||
if (konyvek[i].cim == konyv.cim)
|
||||
{
|
||||
konyvek[i].darabszam++;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
public void Kilistazas()
|
||||
{
|
||||
foreach (var item in konyvek)
|
||||
{
|
||||
Console.WriteLine($"Cím: {item.cim}, Szerző: {item.szerzo}, Kiadás éve: {item.kiadasEve}, Darab: {item.darabszam}");
|
||||
}
|
||||
}
|
||||
|
||||
private Konyv KeresesCim(string cim)
|
||||
{
|
||||
foreach (var item in konyvek) {
|
||||
if (cim == item.cim)
|
||||
{
|
||||
return item;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public void KeresesCimAlapjan(string cim)
|
||||
{
|
||||
Konyv konyv = KeresesCim(cim);
|
||||
if (konyv != null)
|
||||
{
|
||||
Console.WriteLine($"Cím: {konyv.cim}, Szerző: {konyv.szerzo}, Kiadás éve: {konyv.kiadasEve}, Darab: {konyv.darabszam}");
|
||||
return;
|
||||
}
|
||||
|
||||
Console.WriteLine("Nincs ilyen című könyv!");
|
||||
}
|
||||
|
||||
private List<Konyv> KeresesSzerzo(string szerzo)
|
||||
{
|
||||
List<Konyv> talalatok = new List<Konyv>();
|
||||
foreach (var item in konyvek) {
|
||||
if (item.szerzo == szerzo)
|
||||
{
|
||||
talalatok.Add(item);
|
||||
}
|
||||
}
|
||||
|
||||
return talalatok;
|
||||
}
|
||||
|
||||
public void KeresesSzerzoAlapjan(string szerzo)
|
||||
{
|
||||
List<Konyv> talalatok = KeresesSzerzo(szerzo);
|
||||
|
||||
if (talalatok.Count != 0)
|
||||
{
|
||||
foreach (var item in talalatok)
|
||||
{
|
||||
Console.WriteLine($"Cím: {item.cim}, Szerző: {item.szerzo}, Kiadás éve: {item.kiadasEve}, Darab: {item.darabszam}");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Console.WriteLine("A keresett szerzőtől nem találtunk könyvet!");
|
||||
}
|
||||
|
||||
public void KonyvModositas(Konyv modositando, Konyv modositott)
|
||||
{
|
||||
for (int i = 0; i < konyvek.Count; i++)
|
||||
{
|
||||
if (konyvek[i].cim == modositando.cim)
|
||||
{
|
||||
konyvek[i] = modositott;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void KonyvTorles(Konyv torlendo)
|
||||
{
|
||||
konyvek.Remove(torlendo);
|
||||
}
|
||||
}
|
||||
|
||||
public class Konyv {
|
||||
public string cim;
|
||||
public string szerzo;
|
||||
public int kiadasEve;
|
||||
public int darabszam = 1;
|
||||
|
||||
public Konyv(string cim, string szerzo, int kiadasEve) {
|
||||
this.cim = cim;
|
||||
this.szerzo = szerzo;
|
||||
this.kiadasEve = kiadasEve;
|
||||
}
|
||||
|
||||
public Konyv(string cim, string szerzo, int kiadasEve, int darabszam)
|
||||
{
|
||||
this.cim = cim;
|
||||
this.szerzo = szerzo;
|
||||
this.kiadasEve = kiadasEve;
|
||||
this.darabszam = darabszam;
|
||||
}
|
||||
}
|
||||
|
||||
internal class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
string path = "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250130\\konyvek.txt";
|
||||
Konyvtar konyvtar = new Konyvtar(FileReading(path));
|
||||
|
||||
Konyv HP = new Konyv("Harry Potter", "J.K.Rowling", 2000);
|
||||
Konyv HP_2 = new Konyv("Harry Potter és a Tűz Serlege", "J.K.Rowling", 2005);
|
||||
Konyv AH = new Konyv("Atomic Habits", "James Clear", 2015);
|
||||
|
||||
konyvtar.KonyvFelvetel(HP);
|
||||
konyvtar.KonyvFelvetel(HP);
|
||||
|
||||
konyvtar.KonyvFelvetel(AH);
|
||||
konyvtar.KonyvFelvetel(HP_2);
|
||||
|
||||
konyvtar.Kilistazas();
|
||||
|
||||
konyvtar.KeresesCimAlapjan("Atomic Habits");
|
||||
konyvtar.KeresesCimAlapjan("Aranyember");
|
||||
|
||||
|
||||
konyvtar.KeresesSzerzoAlapjan("J.K.Rowling");
|
||||
|
||||
Console.WriteLine();
|
||||
|
||||
konyvtar.KonyvModositas(HP, HP_2);
|
||||
konyvtar.KeresesSzerzoAlapjan("J.K.Rowling");
|
||||
Console.WriteLine();
|
||||
|
||||
konyvtar.KonyvTorles(HP_2);
|
||||
konyvtar.KeresesSzerzoAlapjan("J.K.Rowling");
|
||||
|
||||
Console.ReadLine();
|
||||
}
|
||||
|
||||
public static List<Konyv> FileReading(string path)
|
||||
{
|
||||
List<Konyv> konyvek = new List<Konyv>();
|
||||
|
||||
FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read);
|
||||
StreamReader streamReader = new StreamReader(fileStream);
|
||||
|
||||
string line = streamReader.ReadLine();
|
||||
while(line != null)
|
||||
{
|
||||
string[] adatok = line.Split(';');
|
||||
Konyv konyv = new Konyv(adatok[0], adatok[1], Convert.ToInt32(adatok[2]), Convert.ToInt32(adatok[3]));
|
||||
konyvek.Add(konyv);
|
||||
line = streamReader.ReadLine();
|
||||
}
|
||||
|
||||
|
||||
streamReader.Close();
|
||||
fileStream.Close();
|
||||
|
||||
return konyvek;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
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("Konyvtari_Rendszer")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Konyvtari_Rendszer")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2025")]
|
||||
[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("0b7010bc-8a3d-4289-afdb-fea2c7b1ae15")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
Binary file not shown.
|
@ -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>
|
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 @@
|
|||
137ddb1975586287657f37337b64d051167bb6a147915d9fb5b8eb94b1093509
|
|
@ -0,0 +1,7 @@
|
|||
C:\Users\szabomarton\Desktop\C#\ProgaOra\20250130\Konyvtari_Rendszer\Konyvtari_Rendszer\bin\Debug\Konyvtari_Rendszer.exe.config
|
||||
C:\Users\szabomarton\Desktop\C#\ProgaOra\20250130\Konyvtari_Rendszer\Konyvtari_Rendszer\bin\Debug\Konyvtari_Rendszer.exe
|
||||
C:\Users\szabomarton\Desktop\C#\ProgaOra\20250130\Konyvtari_Rendszer\Konyvtari_Rendszer\bin\Debug\Konyvtari_Rendszer.pdb
|
||||
C:\Users\szabomarton\Desktop\C#\ProgaOra\20250130\Konyvtari_Rendszer\Konyvtari_Rendszer\obj\Debug\Konyvtari_Rendszer.csproj.AssemblyReference.cache
|
||||
C:\Users\szabomarton\Desktop\C#\ProgaOra\20250130\Konyvtari_Rendszer\Konyvtari_Rendszer\obj\Debug\Konyvtari_Rendszer.csproj.CoreCompileInputs.cache
|
||||
C:\Users\szabomarton\Desktop\C#\ProgaOra\20250130\Konyvtari_Rendszer\Konyvtari_Rendszer\obj\Debug\Konyvtari_Rendszer.exe
|
||||
C:\Users\szabomarton\Desktop\C#\ProgaOra\20250130\Konyvtari_Rendszer\Konyvtari_Rendszer\obj\Debug\Konyvtari_Rendszer.pdb
|
Binary file not shown.
Binary file not shown.
204
20250130/asd.txt
Normal file
204
20250130/asd.txt
Normal file
|
@ -0,0 +1,204 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.Contracts;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Konyvtari_Rendszer
|
||||
{
|
||||
public class Konyvtar
|
||||
{
|
||||
public List<Konyv> konyvek = new List<Konyv>();
|
||||
|
||||
public Konyvtar(List<Konyv> konyvek) {
|
||||
this.konyvek = konyvek;
|
||||
}
|
||||
|
||||
public Konyvtar()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void KonyvFelvetel(Konyv konyv)
|
||||
{
|
||||
if (!konyvek.Contains(konyv))
|
||||
{
|
||||
konyvek.Add(konyv);
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < konyvek.Count; i++)
|
||||
{
|
||||
if (konyvek[i].cim == konyv.cim)
|
||||
{
|
||||
konyvek[i].darabszam++;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
public void Kilistazas()
|
||||
{
|
||||
foreach (var item in konyvek)
|
||||
{
|
||||
Console.WriteLine($"Cím: {item.cim}, Szerző: {item.szerzo}, Kiadás éve: {item.kiadasEve}, Darab: {item.darabszam}");
|
||||
}
|
||||
}
|
||||
|
||||
private Konyv KeresesCim(string cim)
|
||||
{
|
||||
foreach (var item in konyvek) {
|
||||
if (cim == item.cim)
|
||||
{
|
||||
return item;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public void KeresesCimAlapjan(string cim)
|
||||
{
|
||||
Konyv konyv = KeresesCim(cim);
|
||||
if (konyv != null)
|
||||
{
|
||||
Console.WriteLine($"Cím: {konyv.cim}, Szerző: {konyv.szerzo}, Kiadás éve: {konyv.kiadasEve}, Darab: {konyv.darabszam}");
|
||||
return;
|
||||
}
|
||||
|
||||
Console.WriteLine("Nincs ilyen című könyv!");
|
||||
}
|
||||
|
||||
private List<Konyv> KeresesSzerzo(string szerzo)
|
||||
{
|
||||
List<Konyv> talalatok = new List<Konyv>();
|
||||
foreach (var item in konyvek) {
|
||||
if (item.szerzo == szerzo)
|
||||
{
|
||||
talalatok.Add(item);
|
||||
}
|
||||
}
|
||||
|
||||
return talalatok;
|
||||
}
|
||||
|
||||
public void KeresesSzerzoAlapjan(string szerzo)
|
||||
{
|
||||
List<Konyv> talalatok = KeresesSzerzo(szerzo);
|
||||
|
||||
if (talalatok.Count != 0)
|
||||
{
|
||||
foreach (var item in talalatok)
|
||||
{
|
||||
Console.WriteLine($"Cím: {item.cim}, Szerző: {item.szerzo}, Kiadás éve: {item.kiadasEve}, Darab: {item.darabszam}");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Console.WriteLine("A keresett szerzőtől nem találtunk könyvet!");
|
||||
}
|
||||
|
||||
public void KonyvModositas(Konyv modositando, Konyv modositott)
|
||||
{
|
||||
for (int i = 0; i < konyvek.Count; i++)
|
||||
{
|
||||
if (konyvek[i].cim == modositando.cim)
|
||||
{
|
||||
konyvek[i] = modositott;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void KonyvTorles(Konyv torlendo)
|
||||
{
|
||||
konyvek.Remove(torlendo);
|
||||
}
|
||||
}
|
||||
|
||||
public class Konyv {
|
||||
public string cim;
|
||||
public string szerzo;
|
||||
public int kiadasEve;
|
||||
public int darabszam = 1;
|
||||
|
||||
public Konyv(string cim, string szerzo, int kiadasEve) {
|
||||
this.cim = cim;
|
||||
this.szerzo = szerzo;
|
||||
this.kiadasEve = kiadasEve;
|
||||
}
|
||||
|
||||
public Konyv(string cim, string szerzo, int kiadasEve, int darabszam)
|
||||
{
|
||||
this.cim = cim;
|
||||
this.szerzo = szerzo;
|
||||
this.kiadasEve = kiadasEve;
|
||||
this.darabszam = darabszam;
|
||||
}
|
||||
}
|
||||
|
||||
internal class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
string path = "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250130\\konyvek.txt";
|
||||
Konyvtar konyvtar = new Konyvtar(FileReading(path));
|
||||
|
||||
Konyv HP = new Konyv("Harry Potter", "J.K.Rowling", 2000);
|
||||
Konyv HP_2 = new Konyv("Harry Potter és a Tűz Serlege", "J.K.Rowling", 2005);
|
||||
Konyv AH = new Konyv("Atomic Habits", "James Clear", 2015);
|
||||
|
||||
konyvtar.KonyvFelvetel(HP);
|
||||
konyvtar.KonyvFelvetel(HP);
|
||||
|
||||
konyvtar.KonyvFelvetel(AH);
|
||||
konyvtar.KonyvFelvetel(HP_2);
|
||||
|
||||
konyvtar.Kilistazas();
|
||||
|
||||
konyvtar.KeresesCimAlapjan("Atomic Habits");
|
||||
konyvtar.KeresesCimAlapjan("Aranyember");
|
||||
|
||||
|
||||
konyvtar.KeresesSzerzoAlapjan("J.K.Rowling");
|
||||
|
||||
Console.WriteLine();
|
||||
|
||||
konyvtar.KonyvModositas(HP, HP_2);
|
||||
konyvtar.KeresesSzerzoAlapjan("J.K.Rowling");
|
||||
Console.WriteLine();
|
||||
|
||||
konyvtar.KonyvTorles(HP_2);
|
||||
konyvtar.KeresesSzerzoAlapjan("J.K.Rowling");
|
||||
|
||||
Console.ReadLine();
|
||||
}
|
||||
|
||||
public static List<Konyv> FileReading(string path)
|
||||
{
|
||||
List<Konyv> konyvek = new List<Konyv>();
|
||||
|
||||
FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read);
|
||||
StreamReader streamReader = new StreamReader(fileStream);
|
||||
|
||||
string line = streamReader.ReadLine();
|
||||
while(line != null)
|
||||
{
|
||||
string[] adatok = line.Split(';');
|
||||
Konyv konyv = new Konyv(adatok[0], adatok[1], Convert.ToInt32(adatok[2]), Convert.ToInt32(adatok[3]));
|
||||
konyvek.Add(konyv);
|
||||
line = streamReader.ReadLine();
|
||||
}
|
||||
|
||||
|
||||
streamReader.Close();
|
||||
fileStream.Close();
|
||||
|
||||
return konyvek;
|
||||
}
|
||||
}
|
||||
}
|
20
20250130/konyvek.txt
Normal file
20
20250130/konyvek.txt
Normal file
|
@ -0,0 +1,20 @@
|
|||
Egri csillagok;Gardonyi Geza;1899;5
|
||||
Pal utcai fiuk;Molnar Ferenc;1906;8
|
||||
Legy jo mindhalalig;Moricz Zsigmond;1920;7
|
||||
A Pendragon legenda;Szerb Antal;1934;4
|
||||
A koszivu ember fiai;Jokai Mor;1869;6
|
||||
Abigel;Szabo Magda;1970;3
|
||||
Tuskevar;Fekete Istvan;1957;9
|
||||
Abel a rengetegben;Tamasi Aron;1932;5
|
||||
Esti Kornel;Kosztolanyi Dezso;1933;4
|
||||
Szindbad;Krudy Gyula;1911;2
|
||||
Iskola a hataron;Ottlik Geza;1959;3
|
||||
A lathatatlan ember;Gardonyi Geza;1902;5
|
||||
A gazdag szegenyek;Jokai Mor;1860;7
|
||||
Edes Anna;Kosztolanyi Dezso;1926;4
|
||||
Katalin utca;Szabo Magda;1969;6
|
||||
Toldi;Arany Janos;1847;4
|
||||
Szent Peter esernyoje;Mikszath Kalman;1895;6
|
||||
A beszelo kontos;Mora Ferenc;1908;5
|
||||
Het krajcar;Moricz Zsigmond;1909;2
|
||||
Egy magyar nabob;Jokai Mor;1853;4
|
Loading…
Reference in New Issue
Block a user