Mutex hinzugefügt.

Imprägnierprotokoll weitergeführt
This commit is contained in:
HuskyTeufel
2019-09-20 11:02:54 +02:00
parent 9a4335f81a
commit 8d089a7905
7 changed files with 53 additions and 46 deletions

View File

@@ -43,7 +43,9 @@ namespace Database
foreach(string t in projekte) foreach(string t in projekte)
{ {
tempProjekt = XamlServices.Load(Path.Combine("projekte", t,string.Format("{0}.xaml",t))) as KlassenBIB.Projekt; string filepath = Path.Combine("projekte", t, string.Format("{0}.xaml", t));
if (!File.Exists(filepath)) continue;
tempProjekt = XamlServices.Load(filepath) as KlassenBIB.Projekt;
//auftraggebers.Add(tempProjekt.Auftraggeber); //auftraggebers.Add(tempProjekt.Auftraggeber);
if (Datenbank.Instance.MainDatenbank.AuftraggeberListe.Contains(tempProjekt.Auftraggeber)) if (Datenbank.Instance.MainDatenbank.AuftraggeberListe.Contains(tempProjekt.Auftraggeber))

View File

@@ -6,30 +6,24 @@ using System.Threading.Tasks;
namespace KlassenBIB namespace KlassenBIB
{ {
/// <summary>
///
/// </summary>
public abstract class AbstractImprägnier public abstract class AbstractImprägnier
{ {
/// <summary>
///
/// </summary>
public string Schlauchnummer { get; set; } public string Schlauchnummer { get; set; }
/// <summary> public ImprägnierungStrukture ImprägnierungBeginn { get; set; }
/// public ImprägnierungStrukture ImprägnierungEnde { get; set; }
/// </summary> public string ImprägnierDatum
public DateTime Imprägnierdatum { get; set; } {
/// <summary> get
/// {
/// </summary> if (ImprägnierungBeginn == null) return "Nicht definiert";
return ImprägnierungBeginn.Zeitstempel.ToShortDateString();
}
}
public uint DN { get; set; } public uint DN { get; set; }
/// <summary>
///
/// </summary>
public double Wanddicke { get; set; } public double Wanddicke { get; set; }
/// <summary>
///
/// </summary>
public double Länge { get; set; } public double Länge { get; set; }
public double Harzmenge { get; set; }
public string Bediener { get; set; }
} }
} }

View File

@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace KlassenBIB
{
/// <summary>
///
/// </summary>
public class ImprägnierungStrukture
{
/// <summary>
///
/// </summary>
public DateTime Zeitstempel { get; set; }
/// <summary>
///
/// </summary>
public double Temperature { get; set; }
}
}

View File

@@ -21,7 +21,8 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Debug\KlassenBIB.xml</DocumentationFile> <DocumentationFile>
</DocumentationFile>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
@@ -54,6 +55,7 @@
<Compile Include="ChargeNummerCollection.cs" /> <Compile Include="ChargeNummerCollection.cs" />
<Compile Include="Hutprofil.cs" /> <Compile Include="Hutprofil.cs" />
<Compile Include="IImportedObjekte.cs" /> <Compile Include="IImportedObjekte.cs" />
<Compile Include="ImprägnierungStrukture.cs" />
<Compile Include="InlinerSanierung.cs" /> <Compile Include="InlinerSanierung.cs" />
<Compile Include="Kurzliner.cs" /> <Compile Include="Kurzliner.cs" />
<Compile Include="LeistungsVerzeichnis.cs" /> <Compile Include="LeistungsVerzeichnis.cs" />

View File

@@ -6,14 +6,8 @@ using System.Threading.Tasks;
namespace KlassenBIB namespace KlassenBIB
{ {
/// <summary>
///
/// </summary>
public sealed class VorOrtImprägnier : AbstractImprägnier public sealed class VorOrtImprägnier : AbstractImprägnier
{ {
/// <summary>
/// Gibt den Soll Walzenabstand zurück
/// </summary>
public double WalzenAbstandSoll public double WalzenAbstandSoll
{ {
get get
@@ -21,17 +15,8 @@ namespace KlassenBIB
return 2*Wanddicke + 1.0; return 2*Wanddicke + 1.0;
} }
} }
/// <summary>
///
/// </summary>
public double WalzenAbstandIst { get; set; } public double WalzenAbstandIst { get; set; }
/// <summary>
///
/// </summary>
public bool VakuumKorrekt { get; set; } public bool VakuumKorrekt { get; set; }
/// <summary>
///
/// </summary>
public bool EinbautempKorrekt { get; set; } public bool EinbautempKorrekt { get; set; }
} }
} }

View File

@@ -6,18 +6,12 @@ using System.Threading.Tasks;
namespace KlassenBIB namespace KlassenBIB
{ {
/// <summary>
/// public class WerkseitigImprägniert : AbstractImprägnier
/// </summary>
public sealed class WerkseitigImprägniert : AbstractImprägnier
{ {
/// <summary>
///
/// </summary>
public string Imprägniernummer { get; set; } public string Imprägniernummer { get; set; }
/// <summary>
///
/// </summary>
public bool LagerungKorrekt { get; set; } public bool LagerungKorrekt { get; set; }
public int LängeCode { get; set; }
} }
} }

View File

@@ -2,6 +2,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
@@ -15,6 +16,12 @@ namespace SanSystem
[STAThread] [STAThread]
static void Main() static void Main()
{ {
new Mutex(initiallyOwned: true, "SanVerwaltung", out bool result);
if(!result)
{
MessageBox.Show("Bitte nur 1 Instanz starten der Software!", "", MessageBoxButtons.OK, MessageBoxIcon.Hand);
Environment.Exit(1);
}
using (Dongle dongle = new Dongle(60)) using (Dongle dongle = new Dongle(60))
{ {
if (dongle.CheckDongleVorhanden()) if (dongle.CheckDongleVorhanden())