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

@@ -2,6 +2,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
@@ -15,6 +16,12 @@ namespace SanSystem
[STAThread]
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))
{
if (dongle.CheckDongleVorhanden())