

// Unless named starting with GlobalSino, EM, My, Self, the function commands are defined 
//by Gatan DM, please see at link: http://www.globalsino.com/EM/page2597.html

 
Class GlobalSinoUI : UIframe
{
 
TagGroup SelfCreateCheckboxes( object SelfDefindedObject )
  { 
    TagGroup MyCheckBoxGroup = DLGCreateGroup()
   
    //Comparison between two different checkbox creation: a series of checkbox numbered by 1, 2, 3, 4, 5 and a single checkbox.
   
    for ( number i = 1 ; I < 5 ; i++ )
    {   

MyCheckBoxGroup.DLGAddElement( DLGCreateCheckBox( "EM" + I , 0 , "SelfDefinedFunction" ) )
  } 
     MyCheckBoxGroup.DLGAddElement( DLGCreateCheckBox( "GlobalSino" , 0 , "SelfDefinedFunction" ) )
   
  
    return MyCheckBoxGroup
  }
 
 
  TagGroup SelfCreateDLGTags( object SelfDefindedObject )
  {
    TagGroup SelfDLG, MyDLGItems
        
    SelfDLG = DLGCreateDialog( "GlobalSino EM Book Script" , MyDLGItems )
    MyDLGItems.DLGAddElement( SelfDefindedObject.SelfCreateCheckboxes() )
    return SelfDLG
  }
 
  object Init( object SelfDefindedObject )
  {
    return SelfDefindedObject.super.Init( SelfDefindedObject.SelfCreateDLGTags() )
  }
}
 
// The MAIN SCRIPT calling the dialog 
 
{ 
  Object MyDLG = Alloc(GlobalSinoUI).Init()
  MyDLG.pose()
}