Generell wird kein doc mehr erzeugt

prüfung ob uv anlage erreichbar ist
This commit is contained in:
HuskyTeufel
2022-03-25 13:42:15 +01:00
parent dea733183e
commit 3a51ada9d6
5 changed files with 36 additions and 4 deletions

View File

@@ -3,8 +3,10 @@ using Microsoft.Win32;
using SanShared;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net.NetworkInformation;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
@@ -17,6 +19,8 @@ namespace SanSystem
public event EventHandler OnStatusMessageChanged;
public static readonly Global instance = new Global();
const string userroot = "HKEY_CURRENT_USER\\Software";
const string firmkey = "Cosysda";
const string subkey = "SanManager";
@@ -29,6 +33,8 @@ namespace SanSystem
string statusMessage = "";
public string StatusMessage
{
get
@@ -171,7 +177,18 @@ namespace SanSystem
}
}
public static bool CheckNetworkAnlageAvaible()
{
Ping pingSender = new Ping();
PingOptions options = new PingOptions();
string data = "aaaaaaaaaaaaa";
byte[] buffer = Encoding.ASCII.GetBytes(data);
int timeout = 20;
PingReply reply = pingSender.Send("192.168.2.248", timeout, buffer, options);
return reply.Status == IPStatus.Success;
}
public void LoadLanguage()
{
@@ -181,7 +198,6 @@ namespace SanSystem
public Global()
{
LadeRegistry();
}
~Global()