示例#1
0
 public void SetDevice(Guid id, Hashtable row, bool delete)
 {
     try
     {
         DetectorServer.TryRefreshDevices();
     }
     catch (Exception ex)
     {
         DetectorServer.Logger.Error((object)"Error set device", ex);
     }
 }
示例#2
0
 public static async void RefreshDevicesLoop()
 {
     while (!DetectorServer.StopFlag)
     {
         if (DetectorServer._isLoaded)
         {
             DetectorServer.TryRefreshDevices();
         }
         await Task.Delay(10000);
     }
 }
示例#3
0
 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;
 }