diff --git a/20240311/WindowsFormsApp1/.vs/WindowsFormsApp1/v16/.suo b/20240311/WindowsFormsApp1/.vs/WindowsFormsApp1/v16/.suo index 46f5a18..9f1c474 100644 Binary files a/20240311/WindowsFormsApp1/.vs/WindowsFormsApp1/v16/.suo and b/20240311/WindowsFormsApp1/.vs/WindowsFormsApp1/v16/.suo differ diff --git a/20240311/WindowsFormsApp1/Form1.Designer.cs b/20240311/WindowsFormsApp1/Form1.Designer.cs index 617ccf8..9c12e61 100644 --- a/20240311/WindowsFormsApp1/Form1.Designer.cs +++ b/20240311/WindowsFormsApp1/Form1.Designer.cs @@ -32,12 +32,10 @@ namespace WindowsFormsApp1 this.components = new System.ComponentModel.Container(); this.button1 = new System.Windows.Forms.Button(); this.button2 = new System.Windows.Forms.Button(); - this.label1 = new System.Windows.Forms.Label(); this.timer1 = new System.Windows.Forms.Timer(this.components); this.textBox1 = new System.Windows.Forms.TextBox(); - this.textBox2 = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); this.timer2 = new System.Windows.Forms.Timer(this.components); - this.label2 = new System.Windows.Forms.Label(); this.SuspendLayout(); // // button1 @@ -60,15 +58,6 @@ namespace WindowsFormsApp1 this.button2.UseVisualStyleBackColor = true; this.button2.Click += new System.EventHandler(this.button2_Click); // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(181, 81); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(0, 13); - this.label1.TabIndex = 2; - this.label1.Click += new System.EventHandler(this.label1_Click); - // // timer1 // this.timer1.Enabled = true; @@ -77,46 +66,40 @@ namespace WindowsFormsApp1 // // textBox1 // - this.textBox1.Location = new System.Drawing.Point(128, 106); + this.textBox1.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.textBox1.Location = new System.Drawing.Point(115, 147); this.textBox1.Name = "textBox1"; - this.textBox1.Size = new System.Drawing.Size(100, 20); - this.textBox1.TabIndex = 3; - this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged); + this.textBox1.Size = new System.Drawing.Size(135, 26); + this.textBox1.TabIndex = 4; // - // textBox2 + // label1 // - this.textBox2.Location = new System.Drawing.Point(128, 147); - this.textBox2.Name = "textBox2"; - this.textBox2.Size = new System.Drawing.Size(100, 20); - this.textBox2.TabIndex = 4; - this.textBox2.TextChanged += new System.EventHandler(this.textBox2_TextChanged); + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F); + this.label1.ForeColor = System.Drawing.Color.Yellow; + this.label1.Location = new System.Drawing.Point(128, 190); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(0, 26); + this.label1.TabIndex = 5; + this.label1.Click += new System.EventHandler(this.label2_Click); // // timer2 // this.timer2.Tick += new System.EventHandler(this.timer2_Tick); // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(128, 190); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(0, 13); - this.label2.TabIndex = 5; - this.label2.Click += new System.EventHandler(this.label2_Click); - // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.Navy; this.ClientSize = new System.Drawing.Size(362, 450); - this.Controls.Add(this.label2); - this.Controls.Add(this.textBox2); - this.Controls.Add(this.textBox1); this.Controls.Add(this.label1); + this.Controls.Add(this.textBox1); this.Controls.Add(this.button2); this.Controls.Add(this.button1); + this.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(64))))); this.Name = "Form1"; - this.Text = "Form1"; + this.Text = "Stopper"; this.Load += new System.EventHandler(this.Form1_Load); this.ResumeLayout(false); this.PerformLayout(); @@ -127,12 +110,10 @@ namespace WindowsFormsApp1 private System.Windows.Forms.Button button1; private System.Windows.Forms.Button button2; - private System.Windows.Forms.Label label1; private System.Windows.Forms.Timer timer1; private System.Windows.Forms.TextBox textBox1; - private System.Windows.Forms.TextBox textBox2; + private System.Windows.Forms.Label label1; private System.Windows.Forms.Timer timer2; - private System.Windows.Forms.Label label2; } } diff --git a/20240311/WindowsFormsApp1/Form1.cs b/20240311/WindowsFormsApp1/Form1.cs index d260275..6c5ff9a 100644 --- a/20240311/WindowsFormsApp1/Form1.cs +++ b/20240311/WindowsFormsApp1/Form1.cs @@ -14,7 +14,6 @@ namespace WindowsFormsApp1 { DateTime start = new DateTime(); DateTime stop = new DateTime(); - TimeSpan duration = new TimeSpan(); TimeSpan currSpan = new TimeSpan(); public Form1() { @@ -31,29 +30,37 @@ namespace WindowsFormsApp1 start = DateTime.Now; timer1.Enabled = true; button1.Enabled = false; - - timer2.Start(); } private void button2_Click(object sender, EventArgs e) { stop = DateTime.Now; - duration = stop - start; timer1.Enabled = false; button1.Enabled = true; - timer2.Stop(); - - //Data.lasttime = currSpan.ToString(); - Data.data.Add(currSpan.ToString()); - label2.Text = ""; + + string formatted_time = $"{currSpan.ToString("mm")}:{currSpan.ToString("ss")}:{currSpan.ToString("fff")}"; + if (Data.data.Count > 0) + { + if (Data.data[Data.data.Count - 1] != formatted_time) + { + Data.data.Add(formatted_time); + } + } + else + { + Data.data.Add(formatted_time); + } + + + label1.Text = ""; foreach (var item in Data.data) { - label2.Text += $"{item}\n"; + label1.Text += $"{item}\n"; } - //label2.Text = Data.lasttime; + } private void label1_Click(object sender, EventArgs e) @@ -62,26 +69,22 @@ namespace WindowsFormsApp1 } private void textBox1_TextChanged(object sender, EventArgs e) - { - textBox1.Text = DateTime.Now.ToString("HH:mm:ss:fff"); - } - - private void textBox2_TextChanged(object sender, EventArgs e) { } + private void timer2_Tick(object sender, EventArgs e) { currSpan = DateTime.Now - start; - textBox2.Text = currSpan.ToString(); + textBox1.Text = currSpan.ToString(); } public void InitTimer() { timer1 = new Timer(); timer1.Tick += new EventHandler(timer2_Tick); - timer1.Interval = 10; // in miliseconds + timer1.Interval = 1; // in miliseconds } @@ -92,8 +95,6 @@ namespace WindowsFormsApp1 public static class Data { - public static string lasttime = ""; - public static List data = new List(); } } diff --git a/20240311/WindowsFormsApp1/WindowsFormsApp1.csproj.user b/20240311/WindowsFormsApp1/WindowsFormsApp1.csproj.user new file mode 100644 index 0000000..9b86104 --- /dev/null +++ b/20240311/WindowsFormsApp1/WindowsFormsApp1.csproj.user @@ -0,0 +1,6 @@ + + + + ShowAllFiles + + \ No newline at end of file diff --git a/20240311/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.exe b/20240311/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.exe index 791c755..f0ee1ae 100644 Binary files a/20240311/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.exe and b/20240311/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.exe differ diff --git a/20240311/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.pdb b/20240311/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.pdb index 8612f4f..eea4b7f 100644 Binary files a/20240311/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.pdb and b/20240311/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.pdb differ diff --git a/20240311/WindowsFormsApp1/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/20240311/WindowsFormsApp1/obj/Debug/DesignTimeResolveAssemblyReferences.cache index 2d21f8d..9ed41e9 100644 Binary files a/20240311/WindowsFormsApp1/obj/Debug/DesignTimeResolveAssemblyReferences.cache and b/20240311/WindowsFormsApp1/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/20240311/WindowsFormsApp1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/20240311/WindowsFormsApp1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index 1f0a93b..7927e54 100644 Binary files a/20240311/WindowsFormsApp1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/20240311/WindowsFormsApp1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/20240311/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.AssemblyReference.cache b/20240311/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.AssemblyReference.cache index 825f721..f5e894a 100644 Binary files a/20240311/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.AssemblyReference.cache and b/20240311/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.AssemblyReference.cache differ diff --git a/20240311/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.CoreCompileInputs.cache b/20240311/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.CoreCompileInputs.cache index cf6f1c0..4a5524a 100644 --- a/20240311/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.CoreCompileInputs.cache +++ b/20240311/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -ffeb981a72357c13c78580d1de8dfcfdeab69b3831ebd504970e578b1a834c6f +8069502011d0681850e57a53d5a1673222f430a6 diff --git a/20240311/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.FileListAbsolute.txt b/20240311/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.FileListAbsolute.txt index 41e082e..3663ea2 100644 --- a/20240311/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.FileListAbsolute.txt +++ b/20240311/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.FileListAbsolute.txt @@ -2,7 +2,6 @@ C:\Users\szabomarton\Desktop\C#\20240311\WindowsFormsApp1\bin\Debug\WindowsForms C:\Users\szabomarton\Desktop\C#\20240311\WindowsFormsApp1\bin\Debug\WindowsFormsApp1.exe C:\Users\szabomarton\Desktop\C#\20240311\WindowsFormsApp1\bin\Debug\WindowsFormsApp1.pdb C:\Users\szabomarton\Desktop\C#\20240311\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.csproj.AssemblyReference.cache -C:\Users\szabomarton\Desktop\C#\20240311\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.Form1.resources C:\Users\szabomarton\Desktop\C#\20240311\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.Properties.Resources.resources C:\Users\szabomarton\Desktop\C#\20240311\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.csproj.GenerateResource.cache C:\Users\szabomarton\Desktop\C#\20240311\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.csproj.CoreCompileInputs.cache @@ -28,3 +27,4 @@ E:\Házi\Programozás\C#\Suli\ProgaOra\20240311\WindowsFormsApp1\obj\Debug\Windo E:\Házi\Programozás\C#\Suli\ProgaOra\20240311\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.csproj.CoreCompileInputs.cache E:\Házi\Programozás\C#\Suli\ProgaOra\20240311\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.exe E:\Házi\Programozás\C#\Suli\ProgaOra\20240311\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.pdb +C:\Users\szabomarton\Desktop\C#\20240311\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.Form1.resources diff --git a/20240311/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.GenerateResource.cache b/20240311/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.GenerateResource.cache index 8774286..4ba55c1 100644 Binary files a/20240311/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.GenerateResource.cache and b/20240311/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.GenerateResource.cache differ diff --git a/20240311/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.exe b/20240311/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.exe index 791c755..f0ee1ae 100644 Binary files a/20240311/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.exe and b/20240311/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.exe differ diff --git a/20240311/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.pdb b/20240311/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.pdb index 8612f4f..eea4b7f 100644 Binary files a/20240311/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.pdb and b/20240311/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.pdb differ diff --git a/20240318/WindowsFormsApp1/.vs/WindowsFormsApp1/v16/.suo b/20240318/WindowsFormsApp1/.vs/WindowsFormsApp1/v16/.suo new file mode 100644 index 0000000..545bf29 Binary files /dev/null and b/20240318/WindowsFormsApp1/.vs/WindowsFormsApp1/v16/.suo differ diff --git a/20240318/WindowsFormsApp1/App.config b/20240318/WindowsFormsApp1/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/20240318/WindowsFormsApp1/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/20240318/WindowsFormsApp1/Form1.Designer.cs b/20240318/WindowsFormsApp1/Form1.Designer.cs new file mode 100644 index 0000000..adfe3f7 --- /dev/null +++ b/20240318/WindowsFormsApp1/Form1.Designer.cs @@ -0,0 +1,168 @@ + +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.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.hScrollBar1 = new System.Windows.Forms.HScrollBar(); + this.hScrollBar2 = new System.Windows.Forms.HScrollBar(); + this.hScrollBar3 = new System.Windows.Forms.HScrollBar(); + this.panel1 = new System.Windows.Forms.Panel(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.textBox2 = new System.Windows.Forms.TextBox(); + this.textBox3 = new System.Windows.Forms.TextBox(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(65, 77); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(27, 13); + this.label1.TabIndex = 0; + this.label1.Text = "Red"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(65, 114); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(36, 13); + this.label2.TabIndex = 1; + this.label2.Text = "Green"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(65, 157); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(28, 13); + this.label3.TabIndex = 2; + this.label3.Text = "Blue"; + // + // hScrollBar1 + // + this.hScrollBar1.LargeChange = 1; + this.hScrollBar1.Location = new System.Drawing.Point(125, 72); + this.hScrollBar1.Maximum = 255; + this.hScrollBar1.Name = "hScrollBar1"; + this.hScrollBar1.Size = new System.Drawing.Size(181, 18); + this.hScrollBar1.TabIndex = 3; + this.hScrollBar1.Scroll += new System.Windows.Forms.ScrollEventHandler(this.hScrollBar1_Scroll); + // + // hScrollBar2 + // + this.hScrollBar2.Location = new System.Drawing.Point(125, 114); + this.hScrollBar2.Maximum = 255; + this.hScrollBar2.Name = "hScrollBar2"; + this.hScrollBar2.Size = new System.Drawing.Size(181, 13); + this.hScrollBar2.TabIndex = 4; + this.hScrollBar2.Scroll += new System.Windows.Forms.ScrollEventHandler(this.hScrollBar2_Scroll); + // + // hScrollBar3 + // + this.hScrollBar3.Location = new System.Drawing.Point(125, 157); + this.hScrollBar3.Maximum = 255; + this.hScrollBar3.Name = "hScrollBar3"; + this.hScrollBar3.Size = new System.Drawing.Size(181, 13); + this.hScrollBar3.TabIndex = 5; + this.hScrollBar3.Scroll += new System.Windows.Forms.ScrollEventHandler(this.hScrollBar3_Scroll); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.White; + this.panel1.Location = new System.Drawing.Point(524, 47); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(212, 154); + this.panel1.TabIndex = 6; + this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint); + // + // textBox1 + // + this.textBox1.Location = new System.Drawing.Point(326, 72); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(100, 20); + this.textBox1.TabIndex = 7; + this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged); + // + // textBox2 + // + this.textBox2.Location = new System.Drawing.Point(326, 111); + this.textBox2.Name = "textBox2"; + this.textBox2.Size = new System.Drawing.Size(100, 20); + this.textBox2.TabIndex = 8; + this.textBox2.TextChanged += new System.EventHandler(this.textBox2_TextChanged); + // + // textBox3 + // + this.textBox3.Location = new System.Drawing.Point(326, 150); + this.textBox3.Name = "textBox3"; + this.textBox3.Size = new System.Drawing.Size(100, 20); + this.textBox3.TabIndex = 9; + this.textBox3.TextChanged += new System.EventHandler(this.textBox3_TextChanged); + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 261); + this.Controls.Add(this.textBox3); + this.Controls.Add(this.textBox2); + this.Controls.Add(this.textBox1); + this.Controls.Add(this.panel1); + this.Controls.Add(this.hScrollBar3); + this.Controls.Add(this.hScrollBar2); + this.Controls.Add(this.hScrollBar1); + this.Controls.Add(this.label3); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.Name = "Form1"; + this.Text = "Színkeverő"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.HScrollBar hScrollBar1; + private System.Windows.Forms.HScrollBar hScrollBar2; + private System.Windows.Forms.HScrollBar hScrollBar3; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.TextBox textBox2; + private System.Windows.Forms.TextBox textBox3; + } +} + diff --git a/20240318/WindowsFormsApp1/Form1.cs b/20240318/WindowsFormsApp1/Form1.cs new file mode 100644 index 0000000..6aade92 --- /dev/null +++ b/20240318/WindowsFormsApp1/Form1.cs @@ -0,0 +1,83 @@ +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 panel1_Paint(object sender, PaintEventArgs e) + { + } + + private void hScrollBar1_Scroll(object sender, ScrollEventArgs e) + { + Data.red = hScrollBar1.Value; + panel1.BackColor = Color.FromArgb(Data.red, Data.green, Data.blue); + textBox1.Text = Data.red.ToString(); + } + private void hScrollBar2_Scroll(object sender, ScrollEventArgs e) + { + Data.green = hScrollBar2.Value; + panel1.BackColor = Color.FromArgb(Data.red, Data.green, Data.blue); + textBox2.Text = Data.green.ToString(); + } + + private void hScrollBar3_Scroll(object sender, ScrollEventArgs e) + { + Data.blue = hScrollBar3.Value; + panel1.BackColor = Color.FromArgb(Data.red, Data.green, Data.blue); + textBox3.Text = Data.blue.ToString(); + } + + private void textBox1_TextChanged(object sender, EventArgs e) + { + if (textBox1.Text != "") + { + Data.red = int.Parse(textBox1.Text); + } + + panel1.BackColor = Color.FromArgb(Data.red, Data.green, Data.blue); + } + + private void textBox2_TextChanged(object sender, EventArgs e) + { + if (textBox2.Text != "") + { + Data.green = int.Parse(textBox2.Text); + } + + panel1.BackColor = Color.FromArgb(Data.red, Data.green, Data.blue); + } + + private void textBox3_TextChanged(object sender, EventArgs e) + { + if (textBox3.Text != "") + { + Data.blue = int.Parse(textBox3.Text); + } + + panel1.BackColor = Color.FromArgb(Data.red, Data.green, Data.blue); + } + } + + public static class Data + { + public static int red = 0; + public static int green = 0; + public static int blue = 0; + } +} diff --git a/20240318/WindowsFormsApp1/Form1.resx b/20240318/WindowsFormsApp1/Form1.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/20240318/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/20240318/WindowsFormsApp1/Program.cs b/20240318/WindowsFormsApp1/Program.cs new file mode 100644 index 0000000..30a0128 --- /dev/null +++ b/20240318/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/20240318/WindowsFormsApp1/Properties/AssemblyInfo.cs b/20240318/WindowsFormsApp1/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..81fb2fc --- /dev/null +++ b/20240318/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("3f1a0e64-620a-4cc1-9847-64e8d71e68f1")] + +// 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/20240318/WindowsFormsApp1/Properties/Resources.Designer.cs b/20240318/WindowsFormsApp1/Properties/Resources.Designer.cs new file mode 100644 index 0000000..2b9cd9f --- /dev/null +++ b/20240318/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/20240318/WindowsFormsApp1/Properties/Resources.resx b/20240318/WindowsFormsApp1/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/20240318/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/20240318/WindowsFormsApp1/Properties/Settings.Designer.cs b/20240318/WindowsFormsApp1/Properties/Settings.Designer.cs new file mode 100644 index 0000000..3cdaf80 --- /dev/null +++ b/20240318/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/20240318/WindowsFormsApp1/Properties/Settings.settings b/20240318/WindowsFormsApp1/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/20240318/WindowsFormsApp1/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/20240318/WindowsFormsApp1/WindowsFormsApp1.csproj b/20240318/WindowsFormsApp1/WindowsFormsApp1.csproj new file mode 100644 index 0000000..9e0bf8c --- /dev/null +++ b/20240318/WindowsFormsApp1/WindowsFormsApp1.csproj @@ -0,0 +1,83 @@ + + + + + Debug + AnyCPU + {3F1A0E64-620A-4CC1-9847-64E8D71E68F1} + 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/20240318/WindowsFormsApp1/WindowsFormsApp1.sln b/20240318/WindowsFormsApp1/WindowsFormsApp1.sln new file mode 100644 index 0000000..b9e7202 --- /dev/null +++ b/20240318/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", "{3F1A0E64-620A-4CC1-9847-64E8D71E68F1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3F1A0E64-620A-4CC1-9847-64E8D71E68F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3F1A0E64-620A-4CC1-9847-64E8D71E68F1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3F1A0E64-620A-4CC1-9847-64E8D71E68F1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3F1A0E64-620A-4CC1-9847-64E8D71E68F1}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {4194BB19-B043-44D1-9A53-63F0FAF79761} + EndGlobalSection +EndGlobal diff --git a/20240318/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.exe b/20240318/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.exe new file mode 100644 index 0000000..fc711e1 Binary files /dev/null and b/20240318/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.exe differ diff --git a/20240318/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.exe.config b/20240318/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.exe.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/20240318/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/20240318/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.pdb b/20240318/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.pdb new file mode 100644 index 0000000..2a172ed Binary files /dev/null and b/20240318/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.pdb differ diff --git a/20240318/WindowsFormsApp1/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs b/20240318/WindowsFormsApp1/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs new file mode 100644 index 0000000..3871b18 --- /dev/null +++ b/20240318/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/20240318/WindowsFormsApp1/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/20240318/WindowsFormsApp1/obj/Debug/DesignTimeResolveAssemblyReferences.cache new file mode 100644 index 0000000..a6920de Binary files /dev/null and b/20240318/WindowsFormsApp1/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/20240318/WindowsFormsApp1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/20240318/WindowsFormsApp1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..74e3744 Binary files /dev/null and b/20240318/WindowsFormsApp1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/20240318/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.Form1.resources b/20240318/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.Form1.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/20240318/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.Form1.resources differ diff --git a/20240318/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.Properties.Resources.resources b/20240318/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.Properties.Resources.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/20240318/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.Properties.Resources.resources differ diff --git a/20240318/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.AssemblyReference.cache b/20240318/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.AssemblyReference.cache new file mode 100644 index 0000000..f5e894a Binary files /dev/null and b/20240318/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.AssemblyReference.cache differ diff --git a/20240318/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.CoreCompileInputs.cache b/20240318/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..4a5524a --- /dev/null +++ b/20240318/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +8069502011d0681850e57a53d5a1673222f430a6 diff --git a/20240318/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.FileListAbsolute.txt b/20240318/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..8d4217d --- /dev/null +++ b/20240318/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.FileListAbsolute.txt @@ -0,0 +1,10 @@ +C:\Users\szabomarton\Desktop\C#\20240318\WindowsFormsApp1\bin\Debug\WindowsFormsApp1.exe.config +C:\Users\szabomarton\Desktop\C#\20240318\WindowsFormsApp1\bin\Debug\WindowsFormsApp1.exe +C:\Users\szabomarton\Desktop\C#\20240318\WindowsFormsApp1\bin\Debug\WindowsFormsApp1.pdb +C:\Users\szabomarton\Desktop\C#\20240318\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.csproj.AssemblyReference.cache +C:\Users\szabomarton\Desktop\C#\20240318\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.Form1.resources +C:\Users\szabomarton\Desktop\C#\20240318\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.Properties.Resources.resources +C:\Users\szabomarton\Desktop\C#\20240318\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.csproj.GenerateResource.cache +C:\Users\szabomarton\Desktop\C#\20240318\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.csproj.CoreCompileInputs.cache +C:\Users\szabomarton\Desktop\C#\20240318\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.exe +C:\Users\szabomarton\Desktop\C#\20240318\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.pdb diff --git a/20240318/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.GenerateResource.cache b/20240318/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.GenerateResource.cache new file mode 100644 index 0000000..4783d5e Binary files /dev/null and b/20240318/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.GenerateResource.cache differ diff --git a/20240318/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.exe b/20240318/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.exe new file mode 100644 index 0000000..fc711e1 Binary files /dev/null and b/20240318/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.exe differ diff --git a/20240318/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.pdb b/20240318/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.pdb new file mode 100644 index 0000000..2a172ed Binary files /dev/null and b/20240318/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.pdb differ diff --git a/form_anyag b/form_anyag index 909a116..b1a0be1 100644 --- a/form_anyag +++ b/form_anyag @@ -237,4 +237,22 @@ DayOfWeek DayOfYear int evnapja = int.Parse(now.DayOfYear.ToString()); +Görgetősáv vezérlő +A ScrollBar vezérlőt általában az ablak jobb oldalán és alján találhatjuk meg. +A görgetősávot arra is lehet használni, hogy beállítsunk egy értéket minimum és maximum között. + +A görgetősávon lévő görgetőnégyzet által kijelölt hely egy egész számot ad vissza amit Value tulajdonság tárol. +Két különböző gorgetősáv van c# ban. VScrollBar és HScrollBar. vertikális és horizontális +A görgetősávok alapeseménye a Scroll ami értékmódosításkor aktivizálódik. +A legfontosabb tulajdonságai: + +Tulajdonság |Érték | Leírás +Value |int |A hely értéke +Minimum |int | +Maximum |int | +SmallChange |int |A sáv végén kattintható nyilak ennyivel változtatjk a Value-t +LargeChange |int |Ha a sávon a négyzet elé vagy mögé kattintunk akkor a megaott értékkel változik a Value. + +FELADADT: +színkeverő program