COnf x recupero user in recipe

This commit is contained in:
Samuele Locatelli
2020-07-14 14:34:02 +02:00
parent 3801b9ba0e
commit a4b8162355
4 changed files with 34 additions and 24 deletions
-19
View File
@@ -210,7 +210,6 @@ public static class ThreadsFunctions
ncAdapter.Dispose();
}
}
public static void ReadAlarms()
{
NcAdapter ncAdapter = new NcAdapter();
@@ -254,7 +253,6 @@ public static class ThreadsFunctions
ncAdapter.Dispose();
}
}
public static void ReadPowerOnData()
{
NcAdapter ncAdapter = new NcAdapter();
@@ -296,7 +294,6 @@ public static class ThreadsFunctions
ncAdapter.Dispose();
}
}
public static void ReadProcessesPPStatus()
{
NcAdapter ncAdapter = new NcAdapter();
@@ -350,7 +347,6 @@ public static class ThreadsFunctions
ncAdapter.Dispose();
}
}
public static void ReadEnabledFunctionality()
{
NcAdapter ncAdapter = new NcAdapter();
@@ -394,7 +390,6 @@ public static class ThreadsFunctions
ncAdapter.Dispose();
}
}
public static void ReadExpiredMaintenances()
{
NcAdapter ncAdapter = new NcAdapter();
@@ -450,7 +445,6 @@ public static class ThreadsFunctions
}
}
public static void ReadUserSoftKeysData()
{
NcAdapter ncAdapter = new NcAdapter();
@@ -494,7 +488,6 @@ public static class ThreadsFunctions
ncAdapter.Dispose();
}
}
public static void ReadAxesNamesData()
{
NcAdapter ncAdapter = new NcAdapter();
@@ -538,7 +531,6 @@ public static class ThreadsFunctions
ncAdapter.Dispose();
}
}
public static void ReadAxesPositionsData()
{
NcAdapter ncAdapter = new NcAdapter();
@@ -582,7 +574,6 @@ public static class ThreadsFunctions
ncAdapter.Dispose();
}
}
public static void ReadScadaData()
{
NcAdapter ncAdapter = new NcAdapter();
@@ -1256,7 +1247,6 @@ public static class ThreadsFunctions
reconnectionIsRunning = false;
}
}
public static void RestoreConnection()
{
if (reconnectionIsRunning == false)
@@ -1271,13 +1261,11 @@ public static class ThreadsFunctions
ConnThread.Start();
}
}
public static void AbortNcConnection()
{
if (ConnThread != null && ConnThread.IsAlive)
ConnThread.Abort();
}
public static void ManageLibraryError(CmsError libraryError)
{
switch (libraryError.errorCode)
@@ -1309,7 +1297,6 @@ public static class ThreadsFunctions
break;
}
}
internal static void UpdateStat(string functionName, long timer)
{
if (!Timers.ContainsKey(functionName))
@@ -1323,7 +1310,6 @@ public static class ThreadsFunctions
else
Counter[functionName]++;
}
internal static void StatThread()
{
while (true)
@@ -1343,7 +1329,6 @@ public static class ThreadsFunctions
Thread.Sleep(2000);
}
}
private static void StatReset()
{
foreach (var value in Counter)
@@ -1352,7 +1337,6 @@ public static class ThreadsFunctions
Counter[value.Key] = 0;
}
}
private static int CalcSleepTime(int maxSleep, int execTime)
{
int sleep = 0;
@@ -1378,7 +1362,6 @@ public static class ThreadsFunctions
ThreadsHandler.StartClient.Start();
}
}
private static void clientProcess()
{
string CMSClientPath = "";
@@ -1399,7 +1382,6 @@ public static class ThreadsFunctions
}
}
}
private static bool ClientIsRunning()
{
Process[] p = Process.GetProcessesByName(CLIENT_EXE_NAME_NOEXT);
@@ -1414,7 +1396,6 @@ public static class ThreadsFunctions
}
return false;
}
private static Dictionary<string, string> GetPlcAlarmsTranslations(string language)
{
using (NcAdapter ncAdapter = new NcAdapter())