diff --git a/20240408/WindowsFormsApp1/.vs/WindowsFormsApp1/v16/.suo b/20240408/WindowsFormsApp1/.vs/WindowsFormsApp1/v16/.suo new file mode 100644 index 0000000..1db4855 Binary files /dev/null and b/20240408/WindowsFormsApp1/.vs/WindowsFormsApp1/v16/.suo differ diff --git a/20240408/WindowsFormsApp1/App.config b/20240408/WindowsFormsApp1/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/20240408/WindowsFormsApp1/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/20240408/WindowsFormsApp1/Form1.Designer.cs b/20240408/WindowsFormsApp1/Form1.Designer.cs new file mode 100644 index 0000000..5c826a7 --- /dev/null +++ b/20240408/WindowsFormsApp1/Form1.Designer.cs @@ -0,0 +1,110 @@ + +namespace WindowsFormsApp1 +{ + partial class Form1 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.listBox1 = new System.Windows.Forms.ListBox(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.button1 = new System.Windows.Forms.Button(); + this.button2 = new System.Windows.Forms.Button(); + this.button3 = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // listBox1 + // + this.listBox1.FormattingEnabled = true; + this.listBox1.Location = new System.Drawing.Point(72, 73); + this.listBox1.Name = "listBox1"; + this.listBox1.Size = new System.Drawing.Size(187, 290); + this.listBox1.TabIndex = 0; + // + // textBox1 + // + this.textBox1.Location = new System.Drawing.Point(72, 31); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(187, 20); + this.textBox1.TabIndex = 1; + // + // button1 + // + this.button1.Location = new System.Drawing.Point(309, 31); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(101, 23); + this.button1.TabIndex = 2; + this.button1.Text = "Hozzáad"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // button2 + // + this.button2.Location = new System.Drawing.Point(309, 73); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(101, 23); + this.button2.TabIndex = 3; + this.button2.Text = "Kijelölt törlése"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // button3 + // + this.button3.Location = new System.Drawing.Point(309, 120); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(101, 23); + this.button3.TabIndex = 4; + this.button3.Text = "Összes törlése"; + this.button3.UseVisualStyleBackColor = true; + this.button3.Click += new System.EventHandler(this.button3_Click); + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(475, 402); + this.Controls.Add(this.button3); + this.Controls.Add(this.button2); + this.Controls.Add(this.button1); + this.Controls.Add(this.textBox1); + this.Controls.Add(this.listBox1); + this.Name = "Form1"; + this.Text = "Form1"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.ListBox listBox1; + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.Button button3; + } +} + diff --git a/20240408/WindowsFormsApp1/Form1.cs b/20240408/WindowsFormsApp1/Form1.cs new file mode 100644 index 0000000..84b5ac1 --- /dev/null +++ b/20240408/WindowsFormsApp1/Form1.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace WindowsFormsApp1 +{ + public partial class Form1 : Form + { + public Form1() + { + InitializeComponent(); + } + + private void button1_Click(object sender, EventArgs e) + { + listBox1.Items.Add(textBox1.Text); + } + + private void button2_Click(object sender, EventArgs e) + { + int index = listBox1.SelectedIndex; + if (index != -1) + { + listBox1.Items.RemoveAt(index); + } + } + + private void button3_Click(object sender, EventArgs e) + { + listBox1.Items.Clear(); + } + } +} diff --git a/20240408/WindowsFormsApp1/Form1.resx b/20240408/WindowsFormsApp1/Form1.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/20240408/WindowsFormsApp1/Form1.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/20240408/WindowsFormsApp1/Program.cs b/20240408/WindowsFormsApp1/Program.cs new file mode 100644 index 0000000..30a0128 --- /dev/null +++ b/20240408/WindowsFormsApp1/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace WindowsFormsApp1 +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} diff --git a/20240408/WindowsFormsApp1/Properties/AssemblyInfo.cs b/20240408/WindowsFormsApp1/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..69964f8 --- /dev/null +++ b/20240408/WindowsFormsApp1/Properties/AssemblyInfo.cs @@ -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("WindowsFormsApp1")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("WindowsFormsApp1")] +[assembly: AssemblyCopyright("Copyright © 2024")] +[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("27b45018-553c-41d9-9655-15837d916404")] + +// 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")] diff --git a/20240408/WindowsFormsApp1/Properties/Resources.Designer.cs b/20240408/WindowsFormsApp1/Properties/Resources.Designer.cs new file mode 100644 index 0000000..2b9cd9f --- /dev/null +++ b/20240408/WindowsFormsApp1/Properties/Resources.Designer.cs @@ -0,0 +1,70 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + + +namespace WindowsFormsApp1.Properties +{ + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // 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() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [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("WindowsFormsApp1.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/20240408/WindowsFormsApp1/Properties/Resources.resx b/20240408/WindowsFormsApp1/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/20240408/WindowsFormsApp1/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/20240408/WindowsFormsApp1/Properties/Settings.Designer.cs b/20240408/WindowsFormsApp1/Properties/Settings.Designer.cs new file mode 100644 index 0000000..3cdaf80 --- /dev/null +++ b/20240408/WindowsFormsApp1/Properties/Settings.Designer.cs @@ -0,0 +1,29 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + + +namespace WindowsFormsApp1.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; + } + } + } +} diff --git a/20240408/WindowsFormsApp1/Properties/Settings.settings b/20240408/WindowsFormsApp1/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/20240408/WindowsFormsApp1/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/20240408/WindowsFormsApp1/WindowsFormsApp1.csproj b/20240408/WindowsFormsApp1/WindowsFormsApp1.csproj new file mode 100644 index 0000000..8cfcae9 --- /dev/null +++ b/20240408/WindowsFormsApp1/WindowsFormsApp1.csproj @@ -0,0 +1,83 @@ + + + + + Debug + AnyCPU + {27B45018-553C-41D9-9655-15837D916404} + WinExe + WindowsFormsApp1 + WindowsFormsApp1 + v4.7.2 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + Form + + + Form1.cs + + + + + Form1.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + \ No newline at end of file diff --git a/20240408/WindowsFormsApp1/WindowsFormsApp1.sln b/20240408/WindowsFormsApp1/WindowsFormsApp1.sln new file mode 100644 index 0000000..737a622 --- /dev/null +++ b/20240408/WindowsFormsApp1/WindowsFormsApp1.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.33529.622 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WindowsFormsApp1", "WindowsFormsApp1.csproj", "{27B45018-553C-41D9-9655-15837D916404}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {27B45018-553C-41D9-9655-15837D916404}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {27B45018-553C-41D9-9655-15837D916404}.Debug|Any CPU.Build.0 = Debug|Any CPU + {27B45018-553C-41D9-9655-15837D916404}.Release|Any CPU.ActiveCfg = Release|Any CPU + {27B45018-553C-41D9-9655-15837D916404}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {63314373-20EA-4BE2-81A5-D70855696FC2} + EndGlobalSection +EndGlobal diff --git a/20240408/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.exe b/20240408/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.exe new file mode 100644 index 0000000..aa2bc75 Binary files /dev/null and b/20240408/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.exe differ diff --git a/20240408/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.exe.config b/20240408/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.exe.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/20240408/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/20240408/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.pdb b/20240408/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.pdb new file mode 100644 index 0000000..1f8b8b8 Binary files /dev/null and b/20240408/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.pdb differ diff --git a/20240408/WindowsFormsApp1/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs b/20240408/WindowsFormsApp1/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs new file mode 100644 index 0000000..3871b18 --- /dev/null +++ b/20240408/WindowsFormsApp1/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] diff --git a/20240408/WindowsFormsApp1/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/20240408/WindowsFormsApp1/obj/Debug/DesignTimeResolveAssemblyReferences.cache new file mode 100644 index 0000000..a6920de Binary files /dev/null and b/20240408/WindowsFormsApp1/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/20240408/WindowsFormsApp1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/20240408/WindowsFormsApp1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..6ee309c Binary files /dev/null and b/20240408/WindowsFormsApp1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/20240408/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.Form1.resources b/20240408/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.Form1.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/20240408/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.Form1.resources differ diff --git a/20240408/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.Properties.Resources.resources b/20240408/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.Properties.Resources.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/20240408/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.Properties.Resources.resources differ diff --git a/20240408/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.AssemblyReference.cache b/20240408/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.AssemblyReference.cache new file mode 100644 index 0000000..f5e894a Binary files /dev/null and b/20240408/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.AssemblyReference.cache differ diff --git a/20240408/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.CoreCompileInputs.cache b/20240408/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..4a5524a --- /dev/null +++ b/20240408/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +8069502011d0681850e57a53d5a1673222f430a6 diff --git a/20240408/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.FileListAbsolute.txt b/20240408/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..14e1cfa --- /dev/null +++ b/20240408/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.FileListAbsolute.txt @@ -0,0 +1,10 @@ +C:\Users\szabomarton\Desktop\C#\20240408\WindowsFormsApp1\bin\Debug\WindowsFormsApp1.exe.config +C:\Users\szabomarton\Desktop\C#\20240408\WindowsFormsApp1\bin\Debug\WindowsFormsApp1.exe +C:\Users\szabomarton\Desktop\C#\20240408\WindowsFormsApp1\bin\Debug\WindowsFormsApp1.pdb +C:\Users\szabomarton\Desktop\C#\20240408\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.csproj.AssemblyReference.cache +C:\Users\szabomarton\Desktop\C#\20240408\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.Form1.resources +C:\Users\szabomarton\Desktop\C#\20240408\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.Properties.Resources.resources +C:\Users\szabomarton\Desktop\C#\20240408\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.csproj.GenerateResource.cache +C:\Users\szabomarton\Desktop\C#\20240408\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.csproj.CoreCompileInputs.cache +C:\Users\szabomarton\Desktop\C#\20240408\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.exe +C:\Users\szabomarton\Desktop\C#\20240408\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.pdb diff --git a/20240408/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.GenerateResource.cache b/20240408/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.GenerateResource.cache new file mode 100644 index 0000000..2ddc9fd Binary files /dev/null and b/20240408/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.GenerateResource.cache differ diff --git a/20240408/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.exe b/20240408/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.exe new file mode 100644 index 0000000..aa2bc75 Binary files /dev/null and b/20240408/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.exe differ diff --git a/20240408/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.pdb b/20240408/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.pdb new file mode 100644 index 0000000..1f8b8b8 Binary files /dev/null and b/20240408/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.pdb differ diff --git a/20240408/WindowsFormsApp2/.vs/WindowsFormsApp2/v16/.suo b/20240408/WindowsFormsApp2/.vs/WindowsFormsApp2/v16/.suo new file mode 100644 index 0000000..42927f0 Binary files /dev/null and b/20240408/WindowsFormsApp2/.vs/WindowsFormsApp2/v16/.suo differ diff --git a/20240408/WindowsFormsApp2/App.config b/20240408/WindowsFormsApp2/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/20240408/WindowsFormsApp2/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/20240408/WindowsFormsApp2/Form1.Designer.cs b/20240408/WindowsFormsApp2/Form1.Designer.cs new file mode 100644 index 0000000..ee18566 --- /dev/null +++ b/20240408/WindowsFormsApp2/Form1.Designer.cs @@ -0,0 +1,122 @@ + +namespace WindowsFormsApp2 +{ + partial class Form1 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.listBox1 = new System.Windows.Forms.ListBox(); + this.listBox2 = new System.Windows.Forms.ListBox(); + this.button1 = new System.Windows.Forms.Button(); + this.button2 = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(36, 25); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(49, 13); + this.label1.TabIndex = 0; + this.label1.Text = "Párosak:"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(177, 25); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(61, 13); + this.label2.TabIndex = 1; + this.label2.Text = "Páratlanok:"; + // + // listBox1 + // + this.listBox1.FormattingEnabled = true; + this.listBox1.Location = new System.Drawing.Point(39, 60); + this.listBox1.Name = "listBox1"; + this.listBox1.Size = new System.Drawing.Size(120, 251); + this.listBox1.TabIndex = 2; + // + // listBox2 + // + this.listBox2.FormattingEnabled = true; + this.listBox2.Location = new System.Drawing.Point(180, 60); + this.listBox2.Name = "listBox2"; + this.listBox2.Size = new System.Drawing.Size(125, 251); + this.listBox2.TabIndex = 3; + // + // button1 + // + this.button1.Location = new System.Drawing.Point(59, 344); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(75, 23); + this.button1.TabIndex = 4; + this.button1.Text = "Beolvasás "; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // button2 + // + this.button2.Location = new System.Drawing.Point(205, 344); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(75, 23); + this.button2.TabIndex = 5; + this.button2.Text = "Kiírás"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(352, 450); + this.Controls.Add(this.button2); + this.Controls.Add(this.button1); + this.Controls.Add(this.listBox2); + this.Controls.Add(this.listBox1); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.Name = "Form1"; + this.Text = "Form1"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.ListBox listBox1; + private System.Windows.Forms.ListBox listBox2; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button button2; + } +} + diff --git a/20240408/WindowsFormsApp2/Form1.cs b/20240408/WindowsFormsApp2/Form1.cs new file mode 100644 index 0000000..8d3494d --- /dev/null +++ b/20240408/WindowsFormsApp2/Form1.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using System.IO; + +namespace WindowsFormsApp2 +{ + + public partial class Form1 : Form + { + int n; + public Form1() + { + InitializeComponent(); + } + + private void button1_Click(object sender, EventArgs e) + { + n = 0; + string filename = "szamok.txt"; + if (File.Exists(filename)) + { + StreamReader streamReader = File.OpenText(filename); + while (!streamReader.EndOfStream && n < 100) + { + int val = Convert.ToInt32(streamReader.ReadLine()); + if (val % 2 == 0) + { + listBox1.Items.Add(val); + } + else + { + listBox2.Items.Add(val); + } + Data.szamok[n] = val; + n++; + } + streamReader.Close(); + } + else + { + MessageBox.Show("HIBA!!"); + } + } + + private void button2_Click(object sender, EventArgs e) + { + string filename = "paros.txt"; + StreamWriter sw = File.CreateText(filename); + for (int i = 0; i < n; i++) + { + if (Data.szamok[i] % 2 == 0) + { + sw.WriteLine(Data.szamok[i]); + } + } + sw.Close(); + } + } + + public static class Data + { + public const int MAX = 100; + public static int[] szamok = new int[MAX]; + } +} + + + + +/* + * + * creation of 100 random numbers + FileStream fs = new FileStream("szamok.txt", FileMode.Create, FileAccess.ReadWrite); + StreamWriter streamWriter = new StreamWriter(fs); + Random random = new Random(); + for (int i = 0; i < 100; i++) + { + streamWriter.WriteLine(random.Next(1, 10)); + } + + streamWriter.Close(); + fs.Close(); +*/ \ No newline at end of file diff --git a/20240408/WindowsFormsApp2/Form1.resx b/20240408/WindowsFormsApp2/Form1.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/20240408/WindowsFormsApp2/Form1.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/20240408/WindowsFormsApp2/Program.cs b/20240408/WindowsFormsApp2/Program.cs new file mode 100644 index 0000000..b187573 --- /dev/null +++ b/20240408/WindowsFormsApp2/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace WindowsFormsApp2 +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} diff --git a/20240408/WindowsFormsApp2/Properties/AssemblyInfo.cs b/20240408/WindowsFormsApp2/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..02fafda --- /dev/null +++ b/20240408/WindowsFormsApp2/Properties/AssemblyInfo.cs @@ -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("WindowsFormsApp2")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("WindowsFormsApp2")] +[assembly: AssemblyCopyright("Copyright © 2024")] +[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("d9c544ea-ebd1-4eda-955a-93ff281e1b2a")] + +// 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")] diff --git a/20240408/WindowsFormsApp2/Properties/Resources.Designer.cs b/20240408/WindowsFormsApp2/Properties/Resources.Designer.cs new file mode 100644 index 0000000..fedadbe --- /dev/null +++ b/20240408/WindowsFormsApp2/Properties/Resources.Designer.cs @@ -0,0 +1,70 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + + +namespace WindowsFormsApp2.Properties +{ + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // 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() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [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("WindowsFormsApp2.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/20240408/WindowsFormsApp2/Properties/Resources.resx b/20240408/WindowsFormsApp2/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/20240408/WindowsFormsApp2/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/20240408/WindowsFormsApp2/Properties/Settings.Designer.cs b/20240408/WindowsFormsApp2/Properties/Settings.Designer.cs new file mode 100644 index 0000000..fec7aa7 --- /dev/null +++ b/20240408/WindowsFormsApp2/Properties/Settings.Designer.cs @@ -0,0 +1,29 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + + +namespace WindowsFormsApp2.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; + } + } + } +} diff --git a/20240408/WindowsFormsApp2/Properties/Settings.settings b/20240408/WindowsFormsApp2/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/20240408/WindowsFormsApp2/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/20240408/WindowsFormsApp2/WindowsFormsApp2.csproj b/20240408/WindowsFormsApp2/WindowsFormsApp2.csproj new file mode 100644 index 0000000..c343b9f --- /dev/null +++ b/20240408/WindowsFormsApp2/WindowsFormsApp2.csproj @@ -0,0 +1,83 @@ + + + + + Debug + AnyCPU + {D9C544EA-EBD1-4EDA-955A-93FF281E1B2A} + WinExe + WindowsFormsApp2 + WindowsFormsApp2 + v4.7.2 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + Form + + + Form1.cs + + + + + Form1.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + \ No newline at end of file diff --git a/20240408/WindowsFormsApp2/WindowsFormsApp2.sln b/20240408/WindowsFormsApp2/WindowsFormsApp2.sln new file mode 100644 index 0000000..37ff9bd --- /dev/null +++ b/20240408/WindowsFormsApp2/WindowsFormsApp2.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.33529.622 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WindowsFormsApp2", "WindowsFormsApp2.csproj", "{D9C544EA-EBD1-4EDA-955A-93FF281E1B2A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D9C544EA-EBD1-4EDA-955A-93FF281E1B2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D9C544EA-EBD1-4EDA-955A-93FF281E1B2A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D9C544EA-EBD1-4EDA-955A-93FF281E1B2A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D9C544EA-EBD1-4EDA-955A-93FF281E1B2A}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {41A3FD05-50E0-4863-9D1B-AAA07581EC43} + EndGlobalSection +EndGlobal diff --git a/20240408/WindowsFormsApp2/bin/Debug/WindowsFormsApp2.exe b/20240408/WindowsFormsApp2/bin/Debug/WindowsFormsApp2.exe new file mode 100644 index 0000000..b80eb53 Binary files /dev/null and b/20240408/WindowsFormsApp2/bin/Debug/WindowsFormsApp2.exe differ diff --git a/20240408/WindowsFormsApp2/bin/Debug/WindowsFormsApp2.exe.config b/20240408/WindowsFormsApp2/bin/Debug/WindowsFormsApp2.exe.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/20240408/WindowsFormsApp2/bin/Debug/WindowsFormsApp2.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/20240408/WindowsFormsApp2/bin/Debug/WindowsFormsApp2.pdb b/20240408/WindowsFormsApp2/bin/Debug/WindowsFormsApp2.pdb new file mode 100644 index 0000000..4f56e17 Binary files /dev/null and b/20240408/WindowsFormsApp2/bin/Debug/WindowsFormsApp2.pdb differ diff --git a/20240408/WindowsFormsApp2/bin/Debug/paros.txt b/20240408/WindowsFormsApp2/bin/Debug/paros.txt new file mode 100644 index 0000000..38ce7f1 --- /dev/null +++ b/20240408/WindowsFormsApp2/bin/Debug/paros.txt @@ -0,0 +1,53 @@ +4 +4 +4 +2 +2 +2 +8 +8 +2 +8 +6 +6 +8 +6 +2 +6 +4 +6 +2 +6 +4 +6 +8 +8 +6 +2 +2 +4 +8 +6 +6 +4 +8 +2 +4 +2 +2 +8 +2 +8 +4 +2 +4 +8 +8 +6 +2 +6 +8 +8 +2 +8 +2 diff --git a/20240408/WindowsFormsApp2/bin/Debug/szamok.txt b/20240408/WindowsFormsApp2/bin/Debug/szamok.txt new file mode 100644 index 0000000..ac31530 --- /dev/null +++ b/20240408/WindowsFormsApp2/bin/Debug/szamok.txt @@ -0,0 +1,100 @@ +4 +4 +4 +7 +2 +2 +1 +1 +3 +5 +1 +7 +2 +7 +8 +5 +1 +5 +8 +9 +2 +8 +6 +7 +6 +7 +3 +8 +6 +2 +6 +9 +9 +4 +6 +1 +2 +9 +3 +6 +4 +7 +9 +6 +3 +8 +8 +6 +7 +7 +2 +2 +4 +8 +7 +6 +7 +6 +1 +4 +8 +2 +4 +2 +9 +2 +7 +8 +2 +8 +4 +2 +3 +3 +5 +4 +8 +1 +5 +7 +8 +7 +1 +9 +1 +5 +6 +2 +6 +9 +3 +5 +8 +9 +8 +2 +3 +8 +7 +2 diff --git a/20240408/WindowsFormsApp2/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs b/20240408/WindowsFormsApp2/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs new file mode 100644 index 0000000..3871b18 --- /dev/null +++ b/20240408/WindowsFormsApp2/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] diff --git a/20240408/WindowsFormsApp2/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/20240408/WindowsFormsApp2/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..f25a2bc Binary files /dev/null and b/20240408/WindowsFormsApp2/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/20240408/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.Form1.resources b/20240408/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.Form1.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/20240408/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.Form1.resources differ diff --git a/20240408/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.Properties.Resources.resources b/20240408/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.Properties.Resources.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/20240408/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.Properties.Resources.resources differ diff --git a/20240408/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.csproj.AssemblyReference.cache b/20240408/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.csproj.AssemblyReference.cache new file mode 100644 index 0000000..f5e894a Binary files /dev/null and b/20240408/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.csproj.AssemblyReference.cache differ diff --git a/20240408/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.csproj.CoreCompileInputs.cache b/20240408/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..4a5524a --- /dev/null +++ b/20240408/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +8069502011d0681850e57a53d5a1673222f430a6 diff --git a/20240408/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.csproj.FileListAbsolute.txt b/20240408/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..52d48b5 --- /dev/null +++ b/20240408/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.csproj.FileListAbsolute.txt @@ -0,0 +1,10 @@ +C:\Users\szabomarton\Desktop\C#\20240408\WindowsFormsApp2\bin\Debug\WindowsFormsApp2.exe.config +C:\Users\szabomarton\Desktop\C#\20240408\WindowsFormsApp2\bin\Debug\WindowsFormsApp2.exe +C:\Users\szabomarton\Desktop\C#\20240408\WindowsFormsApp2\bin\Debug\WindowsFormsApp2.pdb +C:\Users\szabomarton\Desktop\C#\20240408\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.csproj.AssemblyReference.cache +C:\Users\szabomarton\Desktop\C#\20240408\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.Form1.resources +C:\Users\szabomarton\Desktop\C#\20240408\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.Properties.Resources.resources +C:\Users\szabomarton\Desktop\C#\20240408\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.csproj.GenerateResource.cache +C:\Users\szabomarton\Desktop\C#\20240408\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.csproj.CoreCompileInputs.cache +C:\Users\szabomarton\Desktop\C#\20240408\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.exe +C:\Users\szabomarton\Desktop\C#\20240408\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.pdb diff --git a/20240408/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.csproj.GenerateResource.cache b/20240408/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.csproj.GenerateResource.cache new file mode 100644 index 0000000..d88b40c Binary files /dev/null and b/20240408/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.csproj.GenerateResource.cache differ diff --git a/20240408/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.exe b/20240408/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.exe new file mode 100644 index 0000000..b80eb53 Binary files /dev/null and b/20240408/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.exe differ diff --git a/20240408/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.pdb b/20240408/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.pdb new file mode 100644 index 0000000..4f56e17 Binary files /dev/null and b/20240408/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.pdb differ diff --git a/form_anyag b/form_anyag index bb82638..0128ebf 100644 --- a/form_anyag +++ b/form_anyag @@ -294,3 +294,35 @@ Items | |tervezés és futásidőben is módosítható. A lista elemeit tarta Sorted |bool |A listát sortolja MultiColumn |bool | SelectionMode |None One MultiSimple MultiExtended| + +A lista elemeit a tervezési időben az Items tulajdonság melletti ... ikonra kattintva +tudjuk feltölteni a megjelenő szerkesztőablakban. + +A listában lévő elemekre futásidőben is tudunk hivatkozni a sorszámuk megadásával. +A listában lévő elemek felülről lefelé haladva sorszámozzuk 0-tól kezdbe. +A lista egy adott elemére a listbox1.Items[x] formában tudunk hivatkozni. +A következő metódusok segítik a ListBox kezelését: + +METÓDUS LEÍRÁS +Items.Add(elem) +Items.Insert(n,elem) +Items.Remove(szöveg) Az adott szöveget tartalmazó sor törlése +Items.RemoveAt(n) +Items.Clear() +Items.Count() +Items.SelectedIndex A kiválasztott elem indexét adja, ha nincs akkor -1 +Items.SelectedItem +Items.SelectedItems +SetSelected(n,milyen) Az n edik elemet a listában kijelölltté teszi, a milyen TRUE +FindString(szöveg) A megadott szöveget keresi a listában + +A lenyíló lista ComboBox + +A lenyíló lista tulajdonképpen egy szövegmező és egy lista kereszezéséből jött létre. +Ezért a tulajdonságai és eseményei is többnyire ettől a két vezérlőtől öröklődnek. +A lenyíló listából csak egy elemet lehet kiválasztani és csak egyoszlopos megjelenítésre alkalmas. +Ha a lista elemeinek száma több mint az egyszerre megjeleníthető sorok száma, akkor a görgetősáv autómatikusan megjelenik. +Azt hogy a lenyíló lista milyen stílusú legyen, a DropDownStyle tulajdonság határozza meg. + +Feladat: beolvasás szövegfájlból kiírás fájlba. +Szamok.txt tartalmát válogassa párosra és páratlanra.