QdvManager.WaitingBar Property

Gets the QDV waiting bar which can be used for displaying the progress of longer operations.
Public ReadOnly Overridable Property WaitingBar() As IWaitingBar
This language is not supported or no code example is available.
public virtual IWaitingBar WaitingBar {get;}
This language is not supported or no code example is available.

Property Value

IWaitingBar

The waiting bar, or null reference (Nothing in Visual Basic), if the waiting bar is not available in the current context.

Example
 

// Get the waiting bar used in QDV.
 var waitBar = context.QdvManager.WaitingBar;
 
 try
 {
  // Enumerate all global variables and display the progress.
  if (waitBar != null)
  {
   waitBar.StartProcess("");
   waitBar.SetCaption("Enumerating global variables...");
  }
 
  var globalVars = es.CurrentVersion.GlobalVariables;
  foreach (var variable in globalVars.GetGlobalVariableNames())
  {
   // Display the progress.
   string progressText = variable;
   progressText += " = ";
   progressText += Convert.ToString(globalVars.GetVariableValue(variable));
   if (waitBar != null)
   {
    waitBar.SetDescription(progressText);
   }
 
   // Simulate a long lasting operation.
   System.Threading.Thread.Sleep(100);
  }
 }
 finally
 {
  // Close the progress bar.
  if (waitBar != null)
  {
   waitBar.StopAllProcesses();
  }
 }					
This language is not supported or no code example is available.

The following example demonstrates how to slowly enumerate all global variables and display the progress.

Version
 
Available since QDV 7.23.1050.

.NET Framework

Supported in: 4.8, 4.7, 4.6, 4.5.2

In this article

Definition