renhao
2023-09-21 1aa9f2bb83dd9e4b7517f1cbf06b0db53979bb31
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
Quintiq file version 2.0
#parent: ToolbarMain/ValueHolderIsImportSucceed
Response OnValueChanged () id:Response_ToolbarMain_ValueHolderIsImportSucceed_OnValueChanged
{
  #keys: '[124808.0.1190030302]'
  Body:
  [*
    // Change the icon of the import button on the toolbar
    ButtonToolbarImportAll.SetProperty( 'Tooltip', '' );
    tooltip := Translations::MP_Designer_ImportAll_Tooltip();
    
    value := ValueHolderIsImportSucceed.Data();
    
    if( value )
    {
      ButtonToolbarImportAll.SetProperty( 'Image', 'IMPORT1' );
      ButtonToolbarImportAll.SetProperty( 'Tooltip', tooltip );
    }
    else if ( not isnull( MacroPlan ) )
    {
      ButtonToolbarImportAll.SetProperty( 'Image', 'DATA_ERROR');
    
      importmessages := '<HTML><p>' + MacroPlan.ImportMessage().ReplaceAll( ";","<BR>");
      failedimportmessage := tooltip + '<BR>' + '<BR>' 
                             + Translations::MP_Designer_ApplicationMacroPlanner_ValueHolderIsImportSucceed();
      failedimportmessage := failedimportmessage + "<BR>" + importmessages + '</p></html>';
    
    
      ButtonToolbarImportAll.SetProperty( 'Tooltip', failedimportmessage );
    }
  *]
  CanBindMultiple: false
  DefinitionID: 'Responsedef_ValueHolder_OnValueChanged'
  Precondition:
  [*
    return MacroPlan::HasMacroPlan( MacroPlan, feedback );
  *]
}