←Select platform

RefreshNeeded Property

Summary

Indicates whether a timeout event has triggered and that a refresh of the connection needs to occur.

Syntax
C#
C++/CLI
public bool RefreshNeeded { get; set; } 
public:  
   property bool RefreshNeeded 
   { 
      bool get() 
      void set(bool value) 
   } 

Property Value

Default value is false

Changes to true if a timeout event has triggered.

Remarks

If a timeout has been returned and the RefreshNeeded property is false, a timeout event has truly happened. If RefreshNeeded property is true, just the window hosting the MedicalWebViewer (such as a BrowserForm) needs to be restarted due to the MedicalWebViewer refreshing itself.

This property allows the user to catch timeout events and react to them as they see fit. If a request is returned with a failure message, such as GetImage (string sopInstanceUID) returning an empty string, the RefreshNeeded property can be checked after to see if that failure was caused by the query returning no results or if that failure was caused due to a timeout.

This was added so that when the browser refreshes itself, like when the user changes some options in the MedicalWebViewer, the MedicalWebViewerExternalController object can indicate via the RefreshNeeded property whether a genuine timeout/failure occurred or if the window hosting the browser needs a refresh.

Example
C#
using Leadtools; 
 
using Leadtools.Medical.WebViewer.ExternalControl; 
 
private void MedicalWebViewerExternalController_AccessRefreshNeeded() 
{ 
   string applicationName = string.Empty; 
   string version = string.Empty; 
   int externalControlPort = 500; 
   string username = "user"; 
   string password = "pass"; 
 
   //Set up instance of MedicalWebViewerExternalController object 
   MedicalWebViewerExternalController controller = new MedicalWebViewerExternalController(); 
   controller.ViewerURL = "http://localhost/MedicalViewer22"; 
   controller.ServiceURL = "http://localhost/MedicalViewerServiceAsp22"; 
   controller.AspService = true; 
   controller.InitApplication(out applicationName, out version, externalControlPort); 
 
   ControllerReturnCode ret = controller.UserLogin(username, password); 
 
   ret = controller.ShowPatient("PT_ID"); 
   if (ret == ControllerReturnCode.TimedOut && controller.RefreshNeeded) 
   { 
      string sMsg = "controller.RefreshNeeded is true"; 
      Console.WriteLine(sMsg); 
   } 
   else 
   { 
      string sMsg = "controller.RefreshNeeded is false"; 
      Console.WriteLine(sMsg); 
   } 
 
   controller.CloseApplication(); 
 
   controller.Shutdown(); 
} 
Requirements

Target Platforms

Help Version 22.0.2022.12.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Medical.WebViewer.ExternalControl Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.