hongji.li
2023-11-05 2713c338a98325cad21ebec2085802a5e49a98ef
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
Quintiq file version 2.0
#parent: #root
Method PTF_PopulateParametersText () id:Method_LibPTF_dlgCreateEditTestScript_PTF_PopulateParametersText
{
  #keys: '[103546.0.67093836]'
  Body:
  [*
    // Populate the information about parameters on the LabelKeywordArguments
    infotext := "";
    keyword  := selKeyWord.BoundValue();
    
    if( keyword = LibPTF_StandardAction::Loop() )
    {
      infotext := "<Nr>";
    }
    else if( keyword = LibPTF_StandardAction::OpenView() )
    {
      infotext := "<ViewName>";
    }
    else if( keyword = LibPTF_StandardAction::ScrollGCLeftRight()
             or keyword = LibPTF_StandardAction::ScrollGCPageLeftRight()
             or keyword = LibPTF_StandardAction::ScrollGCUpDown()
             or keyword = LibPTF_StandardAction::ScrollGCPageUpDown()
           )
    {
      infotext := "<TargetFormName>, <TargetGanttChartName>, <Nr>";
    }
    else if( keyword = LibPTF_StandardAction::ScrollGCToBottom()
             or keyword = LibPTF_StandardAction::ScrollGCToNow()
             or keyword = LibPTF_StandardAction::ScrollGCToTop()
           )
    {
      infotext := "<TargetFormName>, <TargetGanttChartName>";
    }
    else if( keyword = LibPTF_StandardAction::ScrollListToLast() )
    {
      infotext := "<TargetFormName>, <TargetListName>";
    }
    else if( keyword = LibPTF_StandardAction::SelectListFrom() )
    {
      infotext := "<TargetFormName>, <TargetListName>, <TargetListIndex>";
    }
    else if( keyword = LibPTF_StandardAction::Wait() )
    {
      infotext := "<TimeInSeconds> or Wait <MinTimeInSeconds>, <MaxTimeInSeconds>";
    }
    else if( keyword = LibPTF_StandardAction::ZoomGC() )
    {
      infotext := "<TargetFormName>, <TargetGanttChartName>, <ZoomLevel>";
    }
    else if( keyword = LibPTF_StandardAction::ProfilerReset() )
    {
      infotext := "<Optional:ExportFileName>";
    }
    else if( keyword = LibPTF_StandardAction::ProfilerStop() )
    {
      infotext := "<Optional:ExportFileName>";
    }
    
    // Disable the parameter editor if there is no parameters needed
    keywordparameditorenabled := keyword.Length() > 0
                                 and infotext.Length() > 0
    
    edtKeyWordParameter.Enabled( keywordparameditorenabled );
    
    // Info texts for remaining actions
    if( infotext.Length() > 0 )
    {
      infotext := ' ' + keyword + ' ' + infotext;
    }
    else if( keyword.Length() > 0 )
    {
      infotext := " No argument is needed for this action.";
    }
    else
    {
      infotext := " No standard action is selected";
    }
    
    lblKeywordArguments.Text( infotext );
    
    // Set focus
    if( keywordparameditorenabled )
    {
      edtKeyWordParameter.SetFocus();
    }
    else
    {
      btnInsert.SetFocus();
    }
  *]
}