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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
Quintiq file version 2.0
#parent: #root
Method PTF_BatchEditTestScript (
  internal[GUIComponent] parent,
  structured[LibPTF_TestScript] selection
) id:Method_LibPTF_dlgCreateEditTestScript_PTF_BatchEditTestScript
{
  #keys: '[104342.0.746836539]'
  Body:
  [*
    // Batch edit test script
    this.Title( "Bacth edit " + [String]selection.Size() + " test scripts" );
    
    this.PTF_ToggleBatchEditUIState( false );
    
    result := this.DoModal( parent );
    
    if( result > 0 )
    {
      totalnrofsessions        := 0;
      nrofsimultaneoussessions := 0;
      offset                   := Duration::MinDuration();
      minstartclientdelay      := Duration::MinDuration();
      maxstartclientdelay      := Duration::MinDuration();
    
      if( edtTotalNrOfSessions.Text().Length() > 0 )
      {
        totalnrofsessions := [Number]edtTotalNrOfSessions.Text();
      }
    
      if( edtNrOfSimultaneousSessions.Text().Length() > 0 )
      {
        nrofsimultaneoussessions := [Number]edtNrOfSimultaneousSessions.Text();
      }
    
      if( chkOffset.Checked() )
      {
        offset := durOffset.Duration();
      }
    
      if( chkStartClientDelay.Checked() )
      {
        minstartclientdelay := durMinStartClientDelay.Duration();
        maxstartclientdelay := durMaxStartClientDelay.Duration();
      }
    
      if( selClientType.BoundValue().Length() > 0
          or selLogging.BoundValue().Length() > 0
          or selProject.BoundValue().Length() > 0
          or edtView.Text().TrimBoth().Length() > 0
          or edtCustomArgument.Text().TrimBoth().Length() > 0
          or totalnrofsessions <> 0
          or nrofsimultaneoussessions <> 0
          or offset <> Duration::MinDuration()
          or minstartclientdelay <> Duration::MinDuration()
          or maxstartclientdelay <> Duration::MinDuration()
          or edtDataset.Text().Length() > 0
          or edtDatasetFolder.Text().Length() > 0
          or edtDatasetKind.Text().Length() > 0
        )
      {
        LibPTF_TestScript::BatchEditTestScripts( selection,
                                               selClientType.BoundValue(),
                                               selLogging.BoundValue(),
                                               selProject.BoundValue(),
                                               edtView.Text().TrimBoth(),
                                               edtCustomArgument.Text().TrimBoth(),
                                               totalnrofsessions,
                                               nrofsimultaneoussessions,
                                               offset,
                                               minstartclientdelay,
                                               maxstartclientdelay,
                                               edtDataset.Text().TrimBoth(),
                                               edtDatasetFolder.Text().TrimBoth(),
                                               edtDatasetKind.Text().TrimBoth()
                                             );
      }
    }
  *]
}