public void SetDevice(Guid id, Hashtable row, bool delete) { try { DetectorServer.TryRefreshDevices(); } catch (Exception ex) { DetectorServer.Logger.Error((object)"Error set device", ex); } }
public static async void RefreshDevicesLoop() { while (!DetectorServer.StopFlag) { if (DetectorServer._isLoaded) { DetectorServer.TryRefreshDevices(); } await Task.Delay(10000); } }
public static void LoadServer(Guid serverId) { DetectorServer.Logger.Info((object)(" Server Loaded - ServerID -" + (object)serverId)); try { DetectorServer.TryRefreshDevices(); DetectorServer.MainServer = BcDetectorServer.LoadById(serverId); } catch (Exception ex) { DetectorServer.Logger.Error((object)ex); } DetectorServer._isLoaded = true; }