+ Added new alarm id and data
+ Added new library version (30) with pre and post power on data * Refactor
This commit is contained in:
@@ -29,7 +29,6 @@ namespace Step.Core
|
||||
};
|
||||
private volatile static List<Thread> RunningThreadsList = new List<Thread>();
|
||||
internal volatile static Dictionary<String, String> RunningThreadStatus = new Dictionary<String, String>();
|
||||
private static Thread StatThread;
|
||||
|
||||
public static void Start()
|
||||
{
|
||||
@@ -38,8 +37,8 @@ namespace Step.Core
|
||||
|
||||
public static void StartWorkers()
|
||||
{
|
||||
lock (RunningThreadStatus)
|
||||
RunningThreadStatus.Clear();
|
||||
|
||||
RunningThreadStatus.Clear();
|
||||
|
||||
// For each function run in the list a thread
|
||||
ThreadFunctionsList.ForEach(threadFunction =>
|
||||
@@ -53,12 +52,11 @@ namespace Step.Core
|
||||
lock (RunningThreadsList)
|
||||
RunningThreadsList.Add(t);
|
||||
|
||||
lock (RunningThreadStatus)
|
||||
if (!RunningThreadStatus.ContainsKey(threadFunction.Method.Name))
|
||||
RunningThreadStatus.Add(threadFunction.Method.Name, "---");
|
||||
|
||||
RunningThreadStatus.Add(threadFunction.Method.Name, "---");
|
||||
});
|
||||
|
||||
MessageServices.Current.Publish(MVVM_NC_THREADS, null, RunningThreadStatus);
|
||||
MessageServices.Current.Publish(SEND_THREADS_STATUS, null, RunningThreadStatus);
|
||||
}
|
||||
|
||||
public static void Stop()
|
||||
@@ -75,12 +73,9 @@ namespace Step.Core
|
||||
lock (RunningThreadsList)
|
||||
RunningThreadsList.Clear();
|
||||
|
||||
lock (RunningThreadStatus)
|
||||
{
|
||||
RunningThreadStatus.Clear();
|
||||
RunningThreadStatus.Add("TryNcConnection", "---");
|
||||
}
|
||||
MessageServices.Current.Publish(MVVM_NC_THREADS, null, RunningThreadStatus);
|
||||
RunningThreadStatus.Clear();
|
||||
RunningThreadStatus.Add("TryNcConnection", "---");
|
||||
MessageServices.Current.Publish(SEND_THREADS_STATUS, null, RunningThreadStatus);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user