admin
2025-01-22 7e31442f0e9b07764e9c6a9680d3d4aeba5fe1de
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
Quintiq file version 2.0
#parent: #root
Method ConfirmWhenDifferent () id:Method_LibCal_dlgCalendarSettings_ConfirmWhenDifferent
{
  #keys: '[146730.0.1423911473]'
  Body:
  [*
    // Explicit confirmation is only required when there are calendars with divergent settings,
    // i.e. with settings that are different from the settings of the 'leading' calendar.
    divergentCalendars := this.GetDivergentCalendars( dhCalendar.Data(), dhCalendars.Data() );
    
    if( divergentCalendars.Size() > 0 )
    {
      // Let the user indicate what to do. The result is registered lblConfirmation, 
      // which triggers the update of the settings of the applicable calendars.
      dlg := construct( LibCal_dlgCalendarSettingsConfirmation );
      dlg.Open( this, dhCalendar.Data(), divergentCalendars );
    }
    else
    {
      // Trigger the update of all calendars.
      lblConfirmation.Text( "all" );
    }
  *]
}