MoveFirstUID Example for C#

//This example uses the predefined variable “Text1” of type “TextBox” from “.NET Framework”.
//This example uses the predefined variable “Text2” of type “TextBox” from “.NET Framework”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestMoveFirstUID()
{
   try
   {
      LEADDICOM1.EnableMethodErrors = true;
      LEADDICOM1.MoveFirstUID();

      //display the items information
      Text1.Text = LEADDICOM1.get_CurrentUID().Code;
      Text2.Text = LEADDICOM1.get_CurrentUID().Name;
      MessageBox.Show("wait");
      LEADDICOM1.MoveNextUID();

      //display the items information
      Text1.Text = LEADDICOM1.get_CurrentUID().Code;
      Text2.Text = LEADDICOM1.get_CurrentUID().Name;
      MessageBox.Show("wait");
      LEADDICOM1.MoveLastUID();

      //display the items information
      Text1.Text = LEADDICOM1.get_CurrentUID().Code;
      Text2.Text = LEADDICOM1.get_CurrentUID().Name;
      MessageBox.Show("wait");
      LEADDICOM1.MovePrevUID();

      //display the items information
      Text1.Text = LEADDICOM1.get_CurrentUID().Code;
      Text2.Text = LEADDICOM1.get_CurrentUID().Name;
      MessageBox.Show("wait");
   }
   catch { }
}