Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/100prznt/FlowCalc
Browse files Browse the repository at this point in the history
  • Loading branch information
Elias Ruemmler committed Mar 7, 2019
2 parents a8219f1 + a6c58f1 commit c0d3558
Show file tree
Hide file tree
Showing 18 changed files with 466 additions and 2,012 deletions.
2 changes: 1 addition & 1 deletion FlowCalc/Controller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public double SystemHead
}

/// <summary>
/// Aktueller Systemförderstrom
/// Aktueller Systemvolumenstrom
/// in [m³/h]
/// </summary>
public double SystemFlowRate { get; set; }
Expand Down
15 changes: 13 additions & 2 deletions FlowCalc/FlowCalc.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,12 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>iconfinder_100_Pressure_Reading_183415.ico</ApplicationIcon>
<ApplicationIcon>Media\iconfinder_100_Pressure_Reading_183415.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
Expand All @@ -47,6 +50,9 @@
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="ZedGraph, Version=5.1.7.430, Culture=neutral, PublicKeyToken=02a83cbd123fcd60, processorArchitecture=MSIL">
<HintPath>..\packages\ZedGraph.5.1.7\lib\net35-Client\ZedGraph.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Controller.cs" />
Expand All @@ -58,10 +64,12 @@
</Compile>
<Compile Include="Mathematics\CheckRoutines.cs" />
<Compile Include="Mathematics\LinInterp.cs" />
<Compile Include="PoolSystem\Pipe.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Pump.cs" />
<Compile Include="PumpPerformancePoint.cs" />
<Compile Include="PoolSystem\Fitting.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
Expand All @@ -73,7 +81,9 @@
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
Expand All @@ -88,7 +98,8 @@
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<Content Include="iconfinder_100_Pressure_Reading_183415.ico" />
<Content Include="License-LGPL.txt" />
<Content Include="Media\iconfinder_100_Pressure_Reading_183415.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
193 changes: 103 additions & 90 deletions FlowCalc/Form1.Designer.cs

Large diffs are not rendered by default.

14 changes: 11 additions & 3 deletions FlowCalc/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public Form1()
InitializeComponent();

this.Text = WindowTitle; //Title
this.Icon = Properties.Resources.iconfinder_100_Pressure_Reading_183415;
lbl_PumpFileAuthor.Text = "";

m_Controller = new Controller();
Expand Down Expand Up @@ -65,7 +66,7 @@ private void btn_CalcFlowRate_Click(object sender, EventArgs e)
{
var flowRate = m_Controller.CalcFlowRate(pressure);
txt_SystemFlowRate.Text = flowRate.ToString("f2") + " m³/h";
txt_SystemHead.Text = m_Controller.SystemHead.ToString("f2") + " m";
txt_SystemHead.Text = m_Controller.SystemHead.ToString("f2") + " mWS";

if (flowRate <= 0)
MessageBox.Show("Der angegebene Systemdruck entspricht einer Förderhöhe, welche außerhalb der Pumpenkennlinie liegt.\n\n" +
Expand All @@ -79,8 +80,8 @@ private void applyPumpDefinition()
txt_PumpManufracturer.Text = m_Controller.Pump.Manufacturer;
txt_PumpPowerOut.Text = m_Controller.Pump.PowerOutput + " kW";
txt_PumpNominalFlowRate.Text = m_Controller.Pump.NominalFlowRate + " m³/h";
txt_PumpNominalHead.Text = m_Controller.Pump.NominalDynamicHead + " m";
txt_PumpMaxHead.Text = m_Controller.Pump.MaxTotalHead + " m";
txt_PumpNominalHead.Text = m_Controller.Pump.NominalDynamicHead + " mWS";
txt_PumpMaxHead.Text = m_Controller.Pump.MaxTotalHead + " mWS";

lbl_PumpFileAuthor.Text = m_Controller.Pump.AuthorPumpFile;
toolTip1.SetToolTip(lbl_PumpFileAuthor, m_Controller.Pump.AuthorEmailPumpFile);
Expand All @@ -103,5 +104,12 @@ private void lbl_PumpFileAuthor_LinkClicked(object sender, LinkLabelLinkClickedE
// Navigate to a URL.
System.Diagnostics.Process.Start("mailto:" + m_Controller.Pump.AuthorEmailPumpFile);
}

private void btn_ToJson_Click(object sender, EventArgs e)
{
var path = m_Controller.PumpDefinitionPath.Replace(".xml", ".json");

m_Controller.Pump.ToFile(path);
}
}
}
Loading

0 comments on commit c0d3558

Please sign in to comment.