yypsybs
2023-09-09 3cb5a54def670d97301f07170fcaad213bfc54f2
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
Quintiq file version 2.0
#parent: #root
Method EnableDisableComponent (
  Boolean isbatchedit
) id:Method_DialogCreateEditOperation_EnableDisableComponent
{
  #keys: '[109478.0.546856549]'
  Body:
  [*
    // Enable / disable components
    if( isbatchedit )
    {
      SelectionUnit.DisableWithUserFeedback( Translations::MP_Designer_DisableSelectorForBatchEdit( 'unit' ) );
      EditorID.DisableWithUserFeedback( Translations::MP_Designer_DisableSelectorForBatchEdit( 'id' ) );
      TabPageCost.DisableWithUserFeedback( Translations::MP_Designer_DisableTabCostForBatchEdit() );
    }
    
    selectedcapacitytype := guard( SelectionUnit.Data().CapacityType(), Dialog.Data().Unit().CapacityType() );
    
    istime := selectedcapacitytype = GlobalParameters_MP::GetCapacityTypeTime()
              or selectedcapacitytype = GlobalParameters_MP::GetCapacityTypeTimeAggregation();
    
    EditorThroughput.Enabled( istime
                              and ( not isbatchedit or ( isbatchedit and CheckBoxBatchEditThroughput.Checked() ) ) );
    
    if( not istime )
    {
      EditorThroughput.DisableWithUserFeedback( Translations::MP_Operation_InvalidCapacityType_Time() );
    }
    
    CheckBoxHasUserLotSize.Enabled( not isbatchedit
                                    or ( isbatchedit and CheckBoxBatchEditHasUserLotSize.Checked() ) );
    GroupPanelLotSize.Enabled( CheckBoxHasUserLotSize.Enabled() and CheckBoxHasUserLotSize.Checked() );
    EditorUserMaximumQuantity.Enabled( CheckBoxHasUserMaximumQuantity.Checked() and CheckBoxHasUserMaximumQuantity.Enabled() );
    
    GUIDurationSelectorPreprocessingTime.Enabled( not isbatchedit
                                                  or ( isbatchedit and CheckBoxBatchEditPreprocessingTime.Checked() ) );
    
    GUIDurationSelectorStandardDeviationLeadTime.Enabled( not isbatchedit
                                                          or ( isbatchedit and CheckBoxBatchEditStandardDeviation.Checked() ) );
    
    EditorCO2Emission.Enabled( not isbatchedit
                               or ( isbatchedit and CheckBoxBatchEditCO2Emission.Checked() ) );
  *]
}