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
Quintiq file version 2.0
#parent: #root
Method EnableDaysOnlyMode () id:Method_LibCal_dlgEditTimeInterval_EnableDaysOnlyMode
{
  #keys: '[150080.0.515242648]'
  Body:
  [*
    // Hide start and end time, and checkbox 'All day'
    durStartTimeOfDay.Visible( false );
    durEndTimeOfDay  .Visible( false );
    ckbIsAllDay      .Visible( false );
    
    // Additionally: change label from 'Start time' to 'Start',
    //               hide end, and show + and - buttons.
    lblStartTime  .Text(  "Start" );
    lblEndTime    .Visible( false );
    datEndDate    .Visible( false );
    btnAddDay     .Visible( true  );
    btnSubtractDay.Visible( true  );
    lblOneDay     .Visible( true  );
    
    // Just to be sure: make sure the times are 0:00
    // (in case an occurrence is edited that was created when days only more was turned off).
    durStartTimeOfDay.Duration( Duration::Zero() );
    if( durEndTimeOfDay.Duration() > Duration::Zero() )
    {
      datEndDate.Date( datEndDate.Date() + 1 );
      durEndTimeOfDay.Duration( Duration::Zero() );
    }
  *]
}