lazhen
2025-01-09 8afe90b633046db39042aada36b88193062f8cff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Quintiq file version 2.0
#parent: #root
Method ParseDialogSubComponents (TG_UIDialog tg_dialog, GUIComponent component) id:Method_GlobalStateTestGenerator_ParseDialogSubComponents
{
  #keys: '[142876.9.1250934789]'
  Body:
  [*
    name := '';
    componentkey := Key::ZeroKey();
    display := component.Display();
    databinding := component.GetProperty( 'DataBinding' );
    type := '';
    issupported := true;
    
    if( component.istype( Editor ) )
    {
      type := 'Editor';
    }
    else if( component.istype( GUIDurationSelector ) )
    {
      type := 'GUIDurationSelector';
    }
    else if( component.istype( CheckBox ) )
    {
      type := 'CheckBox';
    }
    else if( component.istype( RadioButtonGroup ) )
    {
      type := 'RadioButtonGroup';
    }
    else if( component.istype( Selection ) )
    {
      type := 'Selection';
    }
    else if( component.istype( GUIDateTimeSelector ) )
    {
      type := 'GUIDateTimeSelector';
    }
    else
    {
      issupported := false;
    }
    
    name := GlobalStateTestGenerator.GetComponentNameFromDisplay( display );
    componentkey := component.Key();
    
    if( issupported )
    {
      cd := select( ApplicationScope.Project().ComponentRegistry().GetAllComponents(), Elements, mcd,
                    mcd.Name() = name );
      index := guard( cd.Index(), -1 );
      sizeposition := component.GetProperty( 'SizePosition' );
      TG_UIField::FindOrCreate( tg_dialog, componentkey, name, display, type, databinding, index, sizeposition );
    }
    
    traverse( component, SubComponents, child )
    {
      GlobalStateTestGenerator.ParseDialogSubComponents( tg_dialog, child );
    }
  *]
}