diff --git a/dharomszog_grafikus.pdf b/dharomszog_grafikus.pdf
new file mode 100644
index 0000000..125de0d
Binary files /dev/null and b/dharomszog_grafikus.pdf differ
diff --git a/haromszogek/DHaromszog.cs b/haromszogek/DHaromszog.cs
index 4eb4a9a..9e9e32a 100644
--- a/haromszogek/DHaromszog.cs
+++ b/haromszogek/DHaromszog.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using System.Windows.Forms;
namespace haromszogek
{
@@ -84,6 +85,20 @@ namespace haromszogek
return c * c == a * a + b * b;
}
}
+ public double Kerület
+ {
+ get
+ {
+ return a + b + c;
+ }
+ }
+ public double Terület
+ {
+ get
+ {
+ return a * b / 2;
+ }
+ }
public DHaromszog(string sor, int sorSzama)
{
@@ -93,6 +108,10 @@ namespace haromszogek
a = double.Parse(oldalak[0]);
b = double.Parse(oldalak[1]);
c = double.Parse(oldalak[2]);
+
+ if (!EllNovekvoSorrend) throw new Exception($"{Sorszama}. sor: Az adatok nincsenek növekvő sorrendben!");
+ if (!EllMegszerkesztheto) throw new Exception($"{Sorszama}. sor: A háromszöget nem lehet megszerkeszteni!");
+ if (!EllDerekszogu) throw new Exception($"{Sorszama}. sor:A háromszög nem derékszögű!");
}
}
}
diff --git a/haromszogek/Derékszögű Háromszögek.Designer.cs b/haromszogek/Derékszögű Háromszögek.Designer.cs
new file mode 100644
index 0000000..467ad0d
--- /dev/null
+++ b/haromszogek/Derékszögű Háromszögek.Designer.cs
@@ -0,0 +1,155 @@
+
+namespace haromszogek
+{
+ 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.button1 = new System.Windows.Forms.Button();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.listBox1 = new System.Windows.Forms.ListBox();
+ this.groupBox2 = new System.Windows.Forms.GroupBox();
+ this.listBox2 = new System.Windows.Forms.ListBox();
+ this.groupBox3 = new System.Windows.Forms.GroupBox();
+ this.listBox3 = new System.Windows.Forms.ListBox();
+ this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
+ this.groupBox1.SuspendLayout();
+ this.groupBox2.SuspendLayout();
+ this.groupBox3.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // button1
+ //
+ this.button1.Location = new System.Drawing.Point(16, 13);
+ this.button1.Margin = new System.Windows.Forms.Padding(4);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(140, 38);
+ this.button1.TabIndex = 0;
+ this.button1.Text = "Adatok Betöltése";
+ this.button1.UseVisualStyleBackColor = true;
+ this.button1.Click += new System.EventHandler(this.button1_Click);
+ //
+ // groupBox1
+ //
+ this.groupBox1.Controls.Add(this.listBox1);
+ this.groupBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.groupBox1.Location = new System.Drawing.Point(16, 61);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(1039, 100);
+ this.groupBox1.TabIndex = 1;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "Hibák a kiválasztott állományban";
+ //
+ // listBox1
+ //
+ this.listBox1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.listBox1.FormattingEnabled = true;
+ this.listBox1.ItemHeight = 20;
+ this.listBox1.Location = new System.Drawing.Point(3, 23);
+ this.listBox1.Name = "listBox1";
+ this.listBox1.Size = new System.Drawing.Size(1033, 74);
+ this.listBox1.TabIndex = 0;
+ //
+ // groupBox2
+ //
+ this.groupBox2.Controls.Add(this.listBox2);
+ this.groupBox2.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.groupBox2.Location = new System.Drawing.Point(19, 187);
+ this.groupBox2.Name = "groupBox2";
+ this.groupBox2.Size = new System.Drawing.Size(324, 355);
+ this.groupBox2.TabIndex = 2;
+ this.groupBox2.TabStop = false;
+ this.groupBox2.Text = "Derékszögű háromszögek";
+ //
+ // listBox2
+ //
+ this.listBox2.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.listBox2.FormattingEnabled = true;
+ this.listBox2.ItemHeight = 20;
+ this.listBox2.Location = new System.Drawing.Point(3, 23);
+ this.listBox2.Name = "listBox2";
+ this.listBox2.Size = new System.Drawing.Size(318, 329);
+ this.listBox2.TabIndex = 0;
+ //
+ // groupBox3
+ //
+ this.groupBox3.Controls.Add(this.listBox3);
+ this.groupBox3.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.groupBox3.Location = new System.Drawing.Point(416, 187);
+ this.groupBox3.Name = "groupBox3";
+ this.groupBox3.Size = new System.Drawing.Size(636, 186);
+ this.groupBox3.TabIndex = 3;
+ this.groupBox3.TabStop = false;
+ this.groupBox3.Text = "Kiválasztott derékszögű háromszög adatai";
+ //
+ // listBox3
+ //
+ this.listBox3.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.listBox3.FormattingEnabled = true;
+ this.listBox3.ItemHeight = 20;
+ this.listBox3.Location = new System.Drawing.Point(3, 23);
+ this.listBox3.Name = "listBox3";
+ this.listBox3.Size = new System.Drawing.Size(630, 160);
+ this.listBox3.TabIndex = 0;
+ //
+ // openFileDialog1
+ //
+ this.openFileDialog1.FileName = "openFileDialog1";
+ this.openFileDialog1.FileOk += new System.ComponentModel.CancelEventHandler(this.openFileDialog1_FileOk);
+ //
+ // Form1
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(1067, 554);
+ this.Controls.Add(this.groupBox3);
+ this.Controls.Add(this.groupBox2);
+ this.Controls.Add(this.groupBox1);
+ this.Controls.Add(this.button1);
+ this.Margin = new System.Windows.Forms.Padding(4);
+ this.Name = "Form1";
+ this.Text = "Derékszögű Háromszögek";
+ this.groupBox1.ResumeLayout(false);
+ this.groupBox2.ResumeLayout(false);
+ this.groupBox3.ResumeLayout(false);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Button button1;
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.ListBox listBox1;
+ private System.Windows.Forms.GroupBox groupBox2;
+ private System.Windows.Forms.ListBox listBox2;
+ private System.Windows.Forms.GroupBox groupBox3;
+ private System.Windows.Forms.ListBox listBox3;
+ private System.Windows.Forms.OpenFileDialog openFileDialog1;
+ }
+}
+
diff --git a/haromszogek/Form1.cs b/haromszogek/Derékszögű Háromszögek.cs
similarity index 76%
rename from haromszogek/Form1.cs
rename to haromszogek/Derékszögű Háromszögek.cs
index 8c84c60..47a4ee7 100644
--- a/haromszogek/Form1.cs
+++ b/haromszogek/Derékszögű Háromszögek.cs
@@ -19,7 +19,12 @@ namespace haromszogek
private void button1_Click(object sender, EventArgs e)
{
-
+ openFileDialog1.ShowDialog();
+ }
+
+ private void openFileDialog1_FileOk(object sender, CancelEventArgs e)
+ {
+
}
}
}
diff --git a/haromszogek/Form1.resx b/haromszogek/Derékszögű Háromszögek.resx
similarity index 96%
rename from haromszogek/Form1.resx
rename to haromszogek/Derékszögű Háromszögek.resx
index 1af7de1..9bad2f5 100644
--- a/haromszogek/Form1.resx
+++ b/haromszogek/Derékszögű Háromszögek.resx
@@ -117,4 +117,7 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ 17, 17
+
\ No newline at end of file
diff --git a/haromszogek/Form1.Designer.cs b/haromszogek/Form1.Designer.cs
deleted file mode 100644
index 72695e0..0000000
--- a/haromszogek/Form1.Designer.cs
+++ /dev/null
@@ -1,62 +0,0 @@
-
-namespace haromszogek
-{
- 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.button1 = new System.Windows.Forms.Button();
- this.SuspendLayout();
- //
- // button1
- //
- this.button1.Location = new System.Drawing.Point(12, 12);
- this.button1.Name = "button1";
- this.button1.Size = new System.Drawing.Size(105, 31);
- this.button1.TabIndex = 0;
- this.button1.Text = "Adatok Betöltése";
- this.button1.UseVisualStyleBackColor = true;
- this.button1.Click += new System.EventHandler(this.button1_Click);
- //
- // Form1
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(800, 450);
- this.Controls.Add(this.button1);
- this.Name = "Form1";
- this.Text = "Form1";
- this.ResumeLayout(false);
-
- }
-
- #endregion
-
- private System.Windows.Forms.Button button1;
- }
-}
-
diff --git a/haromszogek/haromszogek.csproj b/haromszogek/haromszogek.csproj
index 975a3e9..8e605c5 100644
--- a/haromszogek/haromszogek.csproj
+++ b/haromszogek/haromszogek.csproj
@@ -47,16 +47,16 @@
-
+
Form
-
- Form1.cs
+
+ Derékszögű Háromszögek.cs
-
- Form1.cs
+
+ Derékszögű Háromszögek.cs
ResXFileCodeGenerator