Add project files.
This commit is contained in:
Generated
+120
@@ -0,0 +1,120 @@
|
||||
namespace RollCalculator
|
||||
{
|
||||
partial class Form1
|
||||
{
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
private System.Windows.Forms.TextBox txtL1;
|
||||
private System.Windows.Forms.TextBox txtD1;
|
||||
private System.Windows.Forms.TextBox txtH1;
|
||||
private System.Windows.Forms.TextBox txtL2;
|
||||
private System.Windows.Forms.TextBox txtH2;
|
||||
private System.Windows.Forms.Button btnBerechnen;
|
||||
private System.Windows.Forms.Label lblErgebnis;
|
||||
private System.Windows.Forms.Label lblFooter;
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.txtL1 = new System.Windows.Forms.TextBox();
|
||||
this.txtD1 = new System.Windows.Forms.TextBox();
|
||||
this.txtH1 = new System.Windows.Forms.TextBox();
|
||||
this.txtL2 = new System.Windows.Forms.TextBox();
|
||||
this.txtH2 = new System.Windows.Forms.TextBox();
|
||||
this.btnBerechnen = new System.Windows.Forms.Button();
|
||||
this.lblErgebnis = new System.Windows.Forms.Label();
|
||||
this.lblFooter = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// txtL1
|
||||
//
|
||||
this.txtL1.Location = new System.Drawing.Point(30, 20);
|
||||
this.txtL1.Name = "txtL1";
|
||||
this.txtL1.Size = new System.Drawing.Size(200, 20);
|
||||
this.txtL1.TabIndex = 0;
|
||||
this.txtL1.PlaceholderText = "Original length (m)";
|
||||
//
|
||||
// txtD1
|
||||
//
|
||||
this.txtD1.Location = new System.Drawing.Point(30, 50);
|
||||
this.txtD1.Name = "txtD1";
|
||||
this.txtD1.Size = new System.Drawing.Size(200, 20);
|
||||
this.txtD1.TabIndex = 1;
|
||||
this.txtD1.PlaceholderText = "Original outer diameter (cm)";
|
||||
//
|
||||
// txtH1
|
||||
//
|
||||
this.txtH1.Location = new System.Drawing.Point(30, 80);
|
||||
this.txtH1.Name = "txtH1";
|
||||
this.txtH1.Size = new System.Drawing.Size(200, 20);
|
||||
this.txtH1.TabIndex = 2;
|
||||
this.txtH1.PlaceholderText = "Original core diameter (cm)";
|
||||
//
|
||||
// txtL2
|
||||
//
|
||||
this.txtL2.Location = new System.Drawing.Point(30, 110);
|
||||
this.txtL2.Name = "txtL2";
|
||||
this.txtL2.Size = new System.Drawing.Size(200, 20);
|
||||
this.txtL2.TabIndex = 3;
|
||||
this.txtL2.PlaceholderText = "New length (m)";
|
||||
//
|
||||
// txtH2
|
||||
//
|
||||
this.txtH2.Location = new System.Drawing.Point(30, 140);
|
||||
this.txtH2.Name = "txtH2";
|
||||
this.txtH2.Size = new System.Drawing.Size(200, 20);
|
||||
this.txtH2.TabIndex = 4;
|
||||
this.txtH2.PlaceholderText = "New core diameter (cm)";
|
||||
//
|
||||
// btnBerechnen
|
||||
//
|
||||
this.btnBerechnen.Location = new System.Drawing.Point(30, 170);
|
||||
this.btnBerechnen.Name = "btnBerechnen";
|
||||
this.btnBerechnen.Size = new System.Drawing.Size(200, 30);
|
||||
this.btnBerechnen.TabIndex = 5;
|
||||
this.btnBerechnen.Text = "Calculate";
|
||||
this.btnBerechnen.UseVisualStyleBackColor = true;
|
||||
this.btnBerechnen.Click += new System.EventHandler(this.btnBerechnen_Click);
|
||||
//
|
||||
// lblErgebnis
|
||||
//
|
||||
this.lblErgebnis.AutoSize = true;
|
||||
this.lblErgebnis.Location = new System.Drawing.Point(30, 210);
|
||||
this.lblErgebnis.Name = "lblErgebnis";
|
||||
this.lblErgebnis.Size = new System.Drawing.Size(0, 13);
|
||||
this.lblErgebnis.TabIndex = 6;
|
||||
//
|
||||
// lblFooter
|
||||
//
|
||||
this.lblFooter.AutoSize = true;
|
||||
this.lblFooter.Location = new System.Drawing.Point(30, 240);
|
||||
this.lblFooter.Name = "lblFooter";
|
||||
this.lblFooter.Size = new System.Drawing.Size(220, 13);
|
||||
this.lblFooter.TabIndex = 7;
|
||||
this.lblFooter.Text = "Ver. 0.1beta - contact mtazl@naue.com";
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.ClientSize = new System.Drawing.Size(284, 270);
|
||||
this.Controls.Add(this.lblFooter);
|
||||
this.Controls.Add(this.lblErgebnis);
|
||||
this.Controls.Add(this.btnBerechnen);
|
||||
this.Controls.Add(this.txtH2);
|
||||
this.Controls.Add(this.txtL2);
|
||||
this.Controls.Add(this.txtH1);
|
||||
this.Controls.Add(this.txtD1);
|
||||
this.Controls.Add(this.txtL1);
|
||||
this.Name = "Form1";
|
||||
this.Text = "Roll Calculator";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace RollCalculator
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void btnBerechnen_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
double L1 = double.Parse(txtL1.Text);
|
||||
double D1 = double.Parse(txtD1.Text);
|
||||
double H1 = double.Parse(txtH1.Text);
|
||||
double L2 = double.Parse(txtL2.Text);
|
||||
double H2 = double.Parse(txtH2.Text);
|
||||
|
||||
double A1 = D1 * D1 - H1 * H1;
|
||||
double A2 = L2 * A1 / L1;
|
||||
|
||||
double D2 = Math.Sqrt(A2 + H2 * H2);
|
||||
|
||||
lblErgebnis.Text = $"New outer diameter: {D2:F2} cm";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show("Error during calculation: " + ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+120
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 5.9 KiB |
+16
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace RollCalculator
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new Form1());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net9.0-windows</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.13.35931.197 d17.13
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RollCalculator", "RollCalculator.csproj", "{8F884BFB-BFC5-4A8B-BDEF-AFF0427167B4}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{8F884BFB-BFC5-4A8B-BDEF-AFF0427167B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8F884BFB-BFC5-4A8B-BDEF-AFF0427167B4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8F884BFB-BFC5-4A8B-BDEF-AFF0427167B4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8F884BFB-BFC5-4A8B-BDEF-AFF0427167B4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {FD514568-8D9D-4426-B127-021D46641B60}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
Reference in New Issue
Block a user