| Quintiq file version 2.0 | 
| #parent: CustomDrawComponentRoutingConfigurator | 
| Response OnClick ( | 
|   structured[Operation] selection | 
| ) id:Response_CustomDrawComponentRoutingConfigurator_MenuEnableDisableOperation_OnClick | 
| { | 
|   #keys: '[113694.1.1939224249]' | 
|   Body: | 
|   [* | 
|     // Toggle IsEnabled of operation | 
|     //Prompt user for action if action will disable operation(s) and remove period task | 
|     if( ApplicationLibMacroPlanner.GetPeriodTaskRemovalWarningDialog( selection,  | 
|                                                                    Operation::GetDisplayDefinitionName() ) ) | 
|     { | 
|       Process_MP::ToggleIsEnabled( selection ); | 
|     } | 
|   *] | 
|   CanBindMultiple: false | 
|   DefinitionID => /CustomDrawComponentRoutingConfigurator/Responsedef_CustomDrawComponentRoutingConfigurator_Menu_OnClick | 
|   Initiator: 'MenuEnableDisableOperation' | 
|   Precondition: | 
|   [* | 
|     if ( selection.Element( 0 ).IsEnabled() ) | 
|     { | 
|       MenuEnableDisableOperation.SetProperty( 'Image', 'EMPTYCHECKBOX' ); | 
|       MenuEnableDisableOperation.Text( Translations::MP_Designer_Disable() ); | 
|     } | 
|     else | 
|     { | 
|       MenuEnableDisableOperation.SetProperty( 'Image', 'CHECKEDCHECKBOX' ); | 
|       MenuEnableDisableOperation.Text( Translations::MP_Designer_Enable() ); | 
|     } | 
|     return true; | 
|   *] | 
| } |