yanweiyuan3
2023-08-09 588bc7829387dfc761cc25f06f77d4c81818bd10
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
39
40
41
42
43
44
45
46
Quintiq file version 2.0
#parent: #root
Response OnCreated () id:Response_LibCal_dlgEvent_OnCreated
{
  #keys: '[131094.0.1174419404]'
  Body:
  [*
    // Generic initialization
    calendar := this.Data().Calendar();
    this.Title( "Event for calendar '" + calendar.CalendarID() + "'" );
    
    // Only show the checkbox for common events.
    if( not calendar.istype( LibCal_CommonCalendar ) )
    { 
      lblApplyToNewResources.SetProperty( "NumberLines", 0 );  // Looks better this way.
      ckbIsDefault.Visible( false );
    }
    
    this.InitializeCapacity();
    this.InitializeCategories();
    this.InitializeSubscribers();
    
    this.InitializeWeekdayButtons();
    
    // Explicitly call UpdateDuration because it will not always be triggered automatically
    // when the dialog is opened (not if both StartTimeOfDay and EndTimeOfDay are 0:00).
    this.UpdateDuration();
    
    // If applicable, i.e. when UserData has been set to 1 in InitializeCapacity(),
    // inform the user that the EventType and Capacity of the event was changed because
    // partial capacity is not allowed anymore (edge-case).
    // Showing this message in InitializeCapacity results in a 'broken' dialog. Therefore the message is shown here.
    if( this.UserData() = 1 )
    {
      this.WarnAboutChangedEventType();
    }
    
    // Enable days only mode when applicable.
    if( LibCal_Event::USE_ONLY_DAYS() )
    {
      this.EnableDaysOnlyMode();
    }
  *]
  CanBindMultiple: false
  DefinitionID: 'Responsedef_GUIComponent_OnCreated'
}