NetReceiveCGetResponse Example for C#

//This example uses the predefined variable “TreeView1” of type “TreeView” from “.NET Framework”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void LEADDICOMNet1_NetReceiveCGetResponse(int hNet, short nPresentationID, short nMessageID, string pszClass, int nStatus, short nRemaining, short nCompleted, short nFailed, short nWarning, int hDS)
{
   System.Windows.Forms.TreeNode NewNode = null;
   short nRet = 0;
   string szName = null;
   NewNode = new System.Windows.Forms.TreeNode("Command Set - " + "C-GET-RESPONSE");
   TreeView1.Nodes.Add(NewNode);
   NewNode.EnsureVisible();
   NewNode.Nodes.Add("Presentation ID: " + System.Convert.ToString(nPresentationID));
   NewNode.Nodes.Add("Message ID: " + System.Convert.ToString(nMessageID));
   nRet = LEADDICOM1.FindUID(pszClass);
   if (nRet == 0)
   {
      szName = LEADDICOM1.get_CurrentUID().Name;
      NewNode.Nodes.Add("Affected SOP Class: " + szName + " - " + pszClass);
   }
   else
      NewNode.Nodes.Add("Affected SOP Class: " + pszClass);
   NewNode.Nodes.Add("Status: " + System.Convert.ToString(nStatus));
   NewNode.Nodes.Add("Remaining Operations: " + System.Convert.ToString(nRemaining));
   NewNode.Nodes.Add("Failed Operations: " + System.Convert.ToString(nFailed));
   NewNode.Nodes.Add("Warnings: " + System.Convert.ToString(nWarning));
   NewNode.Nodes.Add("Status: " + System.Convert.ToString(nStatus));
}