diff --git a/BerichtGen/Bericht.cs b/BerichtGen/Bericht.cs
index c6ae055..09709b7 100644
--- a/BerichtGen/Bericht.cs
+++ b/BerichtGen/Bericht.cs
@@ -31,6 +31,7 @@ namespace BerichtGen
/// Ein Pdf datei soll erzeugt werden
public void Erzeuge(string source, string savepath,string filename, Hashtable daten,List bilderObjects,DataTable tableContents, bool erzeugeDOC = false , bool erzeugePDF = true)
{
+
if (bilderObjects != null)
{
_listImages = new List();
diff --git a/BerichtGen/BerichtGen.csproj b/BerichtGen/BerichtGen.csproj
index 3f00d19..676f357 100644
--- a/BerichtGen/BerichtGen.csproj
+++ b/BerichtGen/BerichtGen.csproj
@@ -32,35 +32,44 @@
4
-
- ..\packages\Syncfusion.Compression.Base.17.1.0.50\lib\net46\Syncfusion.Compression.Base.dll
+
+ ..\packages\Syncfusion.Chart.Base.17.2.0.34\lib\net46\Syncfusion.Chart.Base.dll
-
- ..\packages\Syncfusion.Xamarin.Compression.17.1.0.50\lib\netstandard2.0\Syncfusion.Compression.Portable.dll
+
+ ..\packages\Syncfusion.Chart.Windows.17.2.0.34\lib\net46\Syncfusion.Chart.Windows.dll
-
- ..\packages\Syncfusion.Core.WinForms.17.1.0.50\lib\net46\Syncfusion.Core.WinForms.dll
+
+ ..\packages\Syncfusion.Compression.Base.17.2.0.34\lib\net46\Syncfusion.Compression.Base.dll
-
- ..\packages\Syncfusion.DocIO.WinForms.17.1.0.50\lib\net46\Syncfusion.DocIO.Base.dll
+
+ ..\packages\Syncfusion.Xamarin.Compression.17.2.0.34\lib\netstandard2.0\Syncfusion.Compression.Portable.dll
-
- ..\packages\Syncfusion.DocToPDFConverter.WinForms.17.1.0.50\lib\net46\Syncfusion.DocToPdfConverter.Base.dll
+
+ ..\packages\Syncfusion.Core.WinForms.17.2.0.34\lib\net46\Syncfusion.Core.WinForms.dll
-
- ..\packages\Syncfusion.Licensing.17.1.0.50\lib\net46\Syncfusion.Licensing.dll
+
+ ..\packages\Syncfusion.DocIO.WinForms.17.2.0.34\lib\net46\Syncfusion.DocIO.Base.dll
-
- ..\packages\Syncfusion.OfficeChart.Base.17.1.0.50\lib\net46\Syncfusion.OfficeChart.Base.dll
+
+ ..\packages\Syncfusion.DocToPDFConverter.WinForms.17.2.0.34\lib\net46\Syncfusion.DocToPdfConverter.Base.dll
-
- ..\packages\Syncfusion.Pdf.WinForms.17.1.0.50\lib\net46\Syncfusion.Pdf.Base.dll
+
+ ..\packages\Syncfusion.Grouping.Base.17.2.0.34\lib\net46\Syncfusion.Grouping.Base.dll
-
- ..\packages\Syncfusion.PdfViewer.Windows.17.1.0.50\lib\net46\Syncfusion.PdfViewer.Windows.dll
+
+ ..\packages\Syncfusion.Licensing.17.2.0.34\lib\net46\Syncfusion.Licensing.dll
-
- ..\packages\Syncfusion.Shared.Base.17.1.0.50\lib\net46\Syncfusion.Shared.Base.dll
+
+ ..\packages\Syncfusion.OfficeChart.Base.17.2.0.34\lib\net46\Syncfusion.OfficeChart.Base.dll
+
+
+ ..\packages\Syncfusion.Pdf.WinForms.17.2.0.34\lib\net46\Syncfusion.Pdf.Base.dll
+
+
+ ..\packages\Syncfusion.PdfViewer.Windows.17.2.0.34\lib\net46\Syncfusion.PdfViewer.Windows.dll
+
+
+ ..\packages\Syncfusion.Shared.Base.17.2.0.34\lib\net46\Syncfusion.Shared.Base.dll
@@ -87,6 +96,7 @@
FrmPDFViewer.cs
+
@@ -104,6 +114,7 @@
+
diff --git a/BerichtGen/FrmOptions.cs b/BerichtGen/FrmOptions.cs
index 911243a..abcbae4 100644
--- a/BerichtGen/FrmOptions.cs
+++ b/BerichtGen/FrmOptions.cs
@@ -4,6 +4,7 @@ using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
+using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
@@ -41,6 +42,7 @@ namespace BerichtGen
///
public FrmOptions(string firma, string vorlage, string speicherpfad,string filename, Hashtable grunddaten, List bilderObjects, DataTable tableContent = null)
{
+
InitializeComponent();
this.firma = firma;
@@ -51,6 +53,7 @@ namespace BerichtGen
this.tableContent = tableContent;
this.source = Path.Combine("documents", firma, vorlage);
this.filename = filename;
+
}
void Gen()
diff --git a/BerichtGen/app.config b/BerichtGen/app.config
new file mode 100644
index 0000000..4c1860f
--- /dev/null
+++ b/BerichtGen/app.config
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/BerichtGen/makeGraphic.cs b/BerichtGen/makeGraphic.cs
new file mode 100644
index 0000000..3f11951
--- /dev/null
+++ b/BerichtGen/makeGraphic.cs
@@ -0,0 +1,105 @@
+using SanShared;
+using Syncfusion.Windows.Forms.Chart;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Drawing;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BerichtGen
+{
+ ///
+ ///
+ ///
+ public static class makeGraphic
+ {
+ private static ChartControl getGraph(List input, string type)
+ {
+ Size size = new Size(600, 400);
+
+ ChartControl chartControl = new ChartControl();
+ chartControl.Size = size;
+
+ ChartAxis axis = chartControl.PrimaryYAxis;
+
+
+ ChartAxisLayout layout1 = new ChartAxisLayout();
+
+
+ layout1.Spacing = 12;
+
+ layout1.Axes.Add(axis);
+
+
+ chartControl.ChartArea.YLayouts.Add(layout1);
+
+ ChartSeries mychart = new ChartSeries(type, ChartSeriesType.Line);
+
+
+ int counter = 0;
+
+ foreach (UVcsvStrukture pars in input)
+ {
+ if (type.Equals("Temperatur"))
+ mychart.Points.Add(counter, pars.Temperatur);
+ else if (type.Equals("Druck"))
+ mychart.Points.Add(counter, pars.Druck);
+ else
+ throw new Exception("Kein gültiger Aufruf");
+ counter++;
+ }
+
+ mychart.YAxis = axis;
+
+ switch (type)
+ {
+ case "Temperatur":
+ axis.Title = "°C";
+ break;
+
+ case "Druck":
+ axis.Title = "[bar]";
+ break;
+ }
+
+ axis.TitleFont = new Font("Segeo UI", 14F);
+
+
+ chartControl.LegendsPlacement = ChartPlacement.Outside;
+ chartControl.LegendPosition = ChartDock.Bottom;
+ chartControl.LegendAlignment = ChartAlignment.Center;
+ chartControl.Title.Visible = false;
+
+ chartControl.Series.Add(mychart);
+ chartControl.Skins = Skins.Metro;
+
+ axis.EdgeLabelsDrawingMode = ChartAxisEdgeLabelsDrawingMode.Shift;
+
+
+ return chartControl;
+ }
+ ///
+ /// Erstellt die Drucksverlauf kurve
+ ///
+ ///
+ ///
+ ///
+ public static bool GetGraphics(List struktures,string destinationPath)
+ {
+ Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("MTIwMjk0QDMxMzcyZTMyMmUzME9BaCs3SUNHQklVTE11ZTZnTGdQcmk2eU4xeWphZDdMYkUrbytOTTRveXc9");
+
+ ChartControl tempChart = getGraph(struktures, "Temperatur");
+ if (tempChart == null) return false;
+ else
+ tempChart.SaveImage(Path.Combine(destinationPath, "linerGraph_temp.jpg"));
+ ChartControl druckChart = getGraph(struktures, "Druck");
+ if (druckChart == null) return false;
+ else
+ druckChart.SaveImage(Path.Combine(destinationPath, "linerGraph_druck.jpg"));
+ return true;
+ }
+ }
+}
diff --git a/BerichtGen/packages.config b/BerichtGen/packages.config
index 2a0e3ff..5259690 100644
--- a/BerichtGen/packages.config
+++ b/BerichtGen/packages.config
@@ -1,13 +1,16 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SanShared/Exceptions/DataBaseVersionMismatchException.cs b/SanShared/Exceptions/DataBaseVersionMismatchException.cs
index a04f7a1..4656fae 100644
--- a/SanShared/Exceptions/DataBaseVersionMismatchException.cs
+++ b/SanShared/Exceptions/DataBaseVersionMismatchException.cs
@@ -7,20 +7,37 @@ using System.Threading.Tasks;
namespace SanShared.Exceptions
{
+ ///
+ ///
+ ///
public class DataBaseVersionMismatchException : Exception
{
+ ///
+ ///
+ ///
public DataBaseVersionMismatchException()
{
}
-
+ ///
+ ///
+ ///
+ ///
public DataBaseVersionMismatchException(string message) : base(message)
{
}
-
+ ///
+ ///
+ ///
+ ///
+ ///
public DataBaseVersionMismatchException(string message, Exception innerException) : base(message, innerException)
{
}
-
+ ///
+ ///
+ ///
+ ///
+ ///
protected DataBaseVersionMismatchException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
diff --git a/SanSystem/App.config b/SanSystem/App.config
index c209a84..a2836ff 100644
--- a/SanSystem/App.config
+++ b/SanSystem/App.config
@@ -7,11 +7,11 @@
-
+
-
+
diff --git a/SanSystem/Program.cs b/SanSystem/Program.cs
index 229ac86..21e396c 100644
--- a/SanSystem/Program.cs
+++ b/SanSystem/Program.cs
@@ -20,7 +20,7 @@ namespace SanSystem
if (dongle.CheckDongleVorhanden())
{
dongle.CleanDongle();
- Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("MTA3MjIwQDMxMzcyZTMxMmUzMFpGMWh4K3R1aUZERnM0WVQvOTdOK2pkSERKTlZKNzFTcUJZY1pZQ2ZHL1k9");
+
Global.Instance.LoadLanguage();
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
diff --git a/SanSystem/SanSystem.csproj b/SanSystem/SanSystem.csproj
index 6ad8817..ad2539f 100644
--- a/SanSystem/SanSystem.csproj
+++ b/SanSystem/SanSystem.csproj
@@ -46,46 +46,6 @@
..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll
-
- ..\packages\Syncfusion.Chart.Base.17.1.0.49\lib\net46\Syncfusion.Chart.Base.dll
-
-
- ..\packages\Syncfusion.Chart.Windows.17.1.0.49\lib\net46\Syncfusion.Chart.Windows.dll
-
-
- ..\packages\Syncfusion.Core.WinForms.17.1.0.49\lib\net46\Syncfusion.Core.WinForms.dll
-
-
- ..\packages\Syncfusion.Grid.Base.17.1.0.49\lib\net46\Syncfusion.Grid.Base.dll
-
-
- ..\packages\Syncfusion.Grid.Windows.17.1.0.49\lib\net46\Syncfusion.Grid.Windows.dll
-
-
- ..\packages\Syncfusion.Licensing.17.1.0.49\lib\net46\Syncfusion.Licensing.dll
-
-
- ..\packages\Syncfusion.SfInput.WinForms.17.1.0.49\lib\net46\Syncfusion.SfInput.WinForms.dll
-
-
- ..\packages\Syncfusion.SfSpellChecker.WPF.17.1.0.49\lib\net46\Syncfusion.SfSpellChecker.WPF.dll
-
-
- ..\packages\Syncfusion.Shared.Base.17.1.0.49\lib\net46\Syncfusion.Shared.Base.dll
-
-
- ..\packages\Syncfusion.Shared.Windows.17.1.0.49\lib\net46\Syncfusion.Shared.Windows.dll
-
-
- ..\packages\Syncfusion.SpellChecker.Base.17.1.0.49\lib\net46\Syncfusion.SpellChecker.Base.dll
-
-
- ..\packages\Syncfusion.Tools.Base.17.1.0.49\lib\net46\Syncfusion.Tools.Base.dll
-
-
- ..\packages\Syncfusion.Tools.Windows.17.1.0.49\lib\net46\Syncfusion.Tools.Windows.dll
- True
-
diff --git a/SanSystem/UCInliner.cs b/SanSystem/UCInliner.cs
index 519ab13..026ea15 100644
--- a/SanSystem/UCInliner.cs
+++ b/SanSystem/UCInliner.cs
@@ -13,8 +13,8 @@ using System.IO;
using SanShared;
using FluentFTP;
using System.Collections;
-using Syncfusion.Windows.Forms.Chart;
using CSVParser;
+using BerichtGen;
namespace SanSystem
{
@@ -213,71 +213,7 @@ namespace SanSystem
}
- private static ChartControl getGraph(List input,string type)
- {
- Size size = new Size(600, 400);
-
- ChartControl chartControl = new ChartControl();
- chartControl.Size = size;
-
- ChartAxis axis = chartControl.PrimaryYAxis;
-
-
- ChartAxisLayout layout1 = new ChartAxisLayout();
-
-
- layout1.Spacing = 12;
-
- layout1.Axes.Add(axis);
-
-
- chartControl.ChartArea.YLayouts.Add(layout1);
-
- ChartSeries mychart = new ChartSeries(type, ChartSeriesType.Line);
-
-
- int counter = 0;
-
- foreach (UVcsvStrukture pars in input)
- {
- if (type.Equals("Temperatur"))
- mychart.Points.Add(counter, pars.Temperatur);
- else if (type.Equals("Druck"))
- mychart.Points.Add(counter, pars.Druck);
- else
- throw new Exception("Kein gültiger Aufruf");
- counter++;
- }
-
- mychart.YAxis = axis;
-
- switch(type)
- {
- case "Temperatur":
- axis.Title = "°C";
- break;
-
- case "Druck":
- axis.Title = "[bar]";
- break;
- }
-
- axis.TitleFont = new Font("Segeo UI", 14F);
-
-
- chartControl.LegendsPlacement = ChartPlacement.Outside;
- chartControl.LegendPosition = ChartDock.Bottom;
- chartControl.LegendAlignment = ChartAlignment.Center;
- chartControl.Title.Visible = false;
-
- chartControl.Series.Add(mychart);
- chartControl.Skins = Skins.Metro;
-
- axis.EdgeLabelsDrawingMode = ChartAxisEdgeLabelsDrawingMode.Shift;
-
-
- return chartControl;
- }
+
private bool AccessCSV()
@@ -295,15 +231,8 @@ namespace SanSystem
inliner.AnfangAushaertung = struktures.Select(x => x.Zeitstempel).Min();
inliner.EndeAushaertung = struktures.Select(x => x.Zeitstempel).Max();
- ChartControl tempChart = getGraph(struktures,"Temperatur");
- if (tempChart == null) return false;
- else
- tempChart.SaveImage(Path.Combine(destinationPath, "linerGraph_temp.jpg"));
- ChartControl druckChart = getGraph(struktures, "Druck");
- if (druckChart == null) return false;
- else
- druckChart.SaveImage(Path.Combine(destinationPath, "linerGraph_druck.jpg"));
- return true;
+
+ return makeGraphic.GetGraphics(struktures, destinationPath);
}
private void btn_create_protokol_Click(object sender, EventArgs e)