master
Gyula Baranya 4 months ago
parent 55988d30eb
commit ae6ae5fad4

Binary file not shown.

@ -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ű!");
}
}
}

@ -0,0 +1,155 @@

namespace haromszogek
{
partial class Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
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;
}
}

@ -19,7 +19,12 @@ namespace haromszogek
private void button1_Click(object sender, EventArgs e)
{
openFileDialog1.ShowDialog();
}
private void openFileDialog1_FileOk(object sender, CancelEventArgs e)
{
}
}
}

@ -117,4 +117,7 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

@ -1,62 +0,0 @@

namespace haromszogek
{
partial class Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
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;
}
}

@ -47,16 +47,16 @@
</ItemGroup>
<ItemGroup>
<Compile Include="DHaromszog.cs" />
<Compile Include="Form1.cs">
<Compile Include="Derékszögű Háromszögek.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
<Compile Include="Derékszögű Háromszögek.Designer.cs">
<DependentUpon>Derékszögű Háromszögek.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
<EmbeddedResource Include="Derékszögű Háromszögek.resx">
<DependentUpon>Derékszögű Háromszögek.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>

Loading…
Cancel
Save