Programm message box
Wenn kein Dongle gefunden wurde, wird meldung angezeigt
This commit is contained in:
@@ -25,23 +25,29 @@ namespace SanSystem
|
|||||||
Environment.Exit(1);
|
Environment.Exit(1);
|
||||||
}
|
}
|
||||||
#if !DEBUG
|
#if !DEBUG
|
||||||
using (Dongle dongle = new Dongle(60))
|
try
|
||||||
{
|
{
|
||||||
if (dongle.CheckDongleVorhanden())
|
using (Dongle dongle = new Dongle(60))
|
||||||
{
|
{
|
||||||
dongle.CleanDongle();
|
if (dongle.CheckDongleVorhanden())
|
||||||
|
{
|
||||||
|
dongle.CleanDongle();
|
||||||
Application.EnableVisualStyles();
|
Application.EnableVisualStyles();
|
||||||
Application.SetCompatibleTextRenderingDefault(false);
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
Application.Run(new frmMain());
|
Application.Run(new frmMain());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MessageBox.Show("Sorry es wurde kein Dongle gefunden!");
|
MessageBox.Show("Sorry es wurde kein Dongle gefunden!");
|
||||||
Application.Exit();
|
Application.Exit();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show("Sorry es wurde kein Dongle gefunden!\n" + ex.Message);
|
||||||
|
Application.Exit();
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
Application.EnableVisualStyles();
|
Application.EnableVisualStyles();
|
||||||
Application.SetCompatibleTextRenderingDefault(false);
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user