hongji.li
2023-11-07 192c736b8ac4b2d84cb823ac71f17e507948a5e8
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
Quintiq file version 2.0
#parent: #root
Method UpdateDialog () id:Method_LibWiz_DialogInitProcess_UpdateDialog
{
  #keys: '[121114.1.2065112131]'
  Body:
  [*
    // Activate panel corresponding to manual step or choice based on current init element
    if( not isnull( DataHolderCurrentInitManualStep.Data() ) )
    {
      LayeredPanel.ActivatePanel( PanelInitManualStep );
      
      manualstep := DataHolderCurrentInitManualStep.Data();
      if( manualstep.IsImage() )
      {
        LayeredPanelDescription.ActivatePanel( PanelImageExplanationManualStep );
        ImageManualStep.Image( manualstep.Description() );
      }
      else
      {
        LayeredPanelDescription.ActivatePanel( PanelEditorExplanation );
      }
      
      Dialog.SetSearchDialogData( EditorDescription );
    }
    else if( not isnull( DataHolderCurrentInitChoice.Data() ) )
    {
      LayeredPanel.ActivatePanel( PanelInitChoice );
      
      Dialog.SetSearchDialogData( EditorExplanation );
    }
    else if( not isnull( DataHolderCurrentInitSequence.Data() ) )
    {
      LayeredPanel.ActivatePanel( PanelInitSequence );
      
      sequencestep := DataHolderCurrentInitSequence.Data();
      if( sequencestep.IsImage() )
      {
        LayeredPanelDescriptionSequence.ActivatePanel( PanelImageExplanationSequenceStep );
        ImageSequenceStep.Image( sequencestep.Description() );
      }
      else
      {
        LayeredPanelDescriptionSequence.ActivatePanel( PanelEditorExplanationSequence );
      }
    
      Dialog.SetSearchDialogData( EditorDescriptionSequence );
    }
    else
    {
      LayeredPanel.ActivatePanel( PanelEmpty );
      Dialog.SetSearchDialogData( null( Editor ) );
    }
    
    // Make sure that current init element remains visible in the list
    key := guard( Dialog.Data().Current().Key(), Key::ZeroKey() );
    if( key <> Key::ZeroKey() )
    {
      ListInitElement.EnsureVisible( Dialog.Data().Current().Key() );
    }
    
    //Update buttons
    Dialog.UpdateButtons();
  *]
}