xiaoding721
2023-11-13 e4edcfd0b987b239526f5375881b919789782dad
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
Quintiq file version 2.0
#parent: #root
Method ShowHideNavigationPanel (
  Boolean showpanel
) id:Method_ApplicationLibMacroPlanner_ShowHideNavigationPanel
{
  #keys: '[11660.0.1095398008]'
  Body:
  [*
    //Show / hide navigation panel based on button status
    tooltip := 'Show navigation panel';
    size := 0.0;
    state := false.AsQUILL()
    pressed := false;
    
    if( showpanel )
    {
      // retrieve the previous size
      size := ApplicationLibMacroPlanner.FormatStringToReal( ValueHolderNavigationPanelSize.Value() );
      pressed := true;
      tooltip := 'Hide navigation panel';
      state := true.AsQUILL();
      
      if( size < 50 )
      {
        size := 320;
      }
    }
    else
    {
      // save the current size
      currentsize := ToolbarSupplyChainPanel.GetProperty( "Size" );
      ValueHolderNavigationPanelSize.Value( currentsize );
    }
    
    ToolbarSupplyChainPanel.SetProperty( "Size", size );
    ButtonOpenCloseSupplyChainPanel.Pressed( pressed );
    ButtonOpenCloseSupplyChainPanel.SetProperty( 'Tooltip', tooltip );
    ValueHolderNavigationPanelState.Value( state );
  *]
}