Quintiq file version 2.0
#parent: #root
Method ShowHideComponent () id:Method_DialogCreateEditUnit_ShowHideComponent
{
  #keys: '[110880.7.347289179]'
  Body:
  [*
    // Show / hide component
    
    // Show / hide unit depending on user selection
    uom := guard( Dialog.Data().UnitOfMeasure_MP(), null( UnitOfMeasure_MP ));
    
    isshown := false;
    
    if( not isnull( uom )
        and not isnull( Dialog.Data().WrappedInstance() ) )
    {
      isshown :=  uom <> SelectionUnitOfMeasurement.Data();
    }
    
    ImageUnitOfMeasurement.Visible( isshown );
    
    // Handling checkbox for FrozenFutureDuration related
    cbHasUserFrozenFutureDurationText := Translations::MP_Designer_DialogUnit_OverrideParentFrozenDuration();
    if( not CheckBoxParent.Checked() )
    {
      cbHasUserFrozenFutureDurationText := Translations::MP_Designer_DialogUnit_HasUserFrozenDuration();
    }
    CheckBoxHasUserFrozenFutureDuration.Text( cbHasUserFrozenFutureDurationText );
  *]
}
