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
Quintiq file version 2.0
#parent: #root
Method EnableDisableComponent () id:Method_DialogCreateEditUnit_EnableDisableComponent
{
  #keys: '[11660.0.1349223191]'
  Body:
  [*
    // Enable / disable component
    SelectionParent.Enabled( CheckBoxParent.Checked() );
    
    //Enable / disable date
    GUIDateTimeSelectorStart.Enabled( CheckBoxHasStart.Checked() );
    GUIDateTimeSelectorEnd.Enabled( CheckBoxHasEnd.Checked() );
    
    // Enable / disable maximum quantity editor
    EditorMaximumQuantity.Enabled( CheckBoxMaximumQuantity.Checked() );
    
    // Enable / disable capacity smoothing components
    EditorCapacitySmoothingPercentageDelta.Enabled( CheckBoxHasCapacitySmoothing.Checked() );
    RadioButtonGroupIsSmoothCapacityOverAllPeriods.Enabled( CheckBoxHasCapacitySmoothing.Checked() );
    CheckBoxIsOverlapCapacitySmoothing.Enabled( CheckBoxHasCapacitySmoothing.Checked() );
    EditorCapacitySmoothingLength.Enabled( CheckBoxHasCapacitySmoothing.Checked() and not [Boolean]RadioButtonGroupIsSmoothCapacityOverAllPeriods.BoundValue() );
    
    // Enable / disable FrozenFutureDuration related
    GUIDurationSelectorUserFrozenFutureDuration.Enabled( CheckBoxHasUserFrozenFutureDuration.Checked() );
    
    capacitytype := RadioButtonGroupCapacityType.BoundValue()
    istransport := capacitytype = GlobalParameters_MP::GetCapacityTypeTransportTime()
                   or capacitytype = GlobalParameters_MP::GetCapacityTypeTransportQuantity();
    
    
    RadioButtonGroupIsUsingOutputForCapacity.Enabled( not istransport );
    GroupPanelCapacitySmoothing.Enabled( not istransport );
  *]
}