Beispiel #1
0
 public override void OnButtonPress()
 {
     Logging.Write("IsConnected: {0}", IsConnected);
     foreach (string name in HBRelogRemoteApi.GetProfileNames())
     {
         Logging.Write("{1}: GetProfileStatus: {0}", HBRelogRemoteApi.GetProfileStatus(name), name);
         HBRelogRemoteApi.SetProfileStatusText(HbProcId, TreeRoot.StatusText);
     }
 }
Beispiel #2
0
 public static void MonitorTimerCb(object sender, EventArgs args)
 {
     try
     {
         if (!IsConnected)
         {
             return;
         }
         if (!TreeRoot.IsRunning)
         {
             int profileStatus = HBRelogRemoteApi.GetProfileStatus(CurrentProfileName);
             // if HB isn't running after 30 seconds
             // and the HBRelog profile isn't paused then restart hb
             if (profileStatus != 1 && DateTime.Now - _runningTimeStamp >= TimeSpan.FromSeconds(50))
             {
                 HBRelogRemoteApi.RestartHB(HbProcId);
             }
         }
         else
         {
             _runningTimeStamp = DateTime.Now;
         }
         if (TreeRoot.StatusText != _lastStatus && !string.IsNullOrEmpty(TreeRoot.StatusText))
         {
             HBRelogRemoteApi.SetProfileStatusText(HbProcId, TreeRoot.StatusText);
             _lastStatus = TreeRoot.StatusText;
         }
         if (InfoPanel.IsMeasuring)
         {
             UpdateTooltip();
         }
     }
     catch (Exception ex)
     {
         Logging.WriteException(ex);
     }
 }
Beispiel #3
0
 public static int GetProfileStatus(string profileName)
 {
     return(HBRelogRemoteApi.GetProfileStatus(profileName));
 }