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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Quintiq file version 2.0
#parent: #root
Method EnablePattern () id:Method_LibCal_dlgEvent_EnablePattern
{
  #keys: '[131094.0.1374217265]'
  Body:
  [*
    // Enable the controls of the recurrence pattern.
    
    // Toggle-buttons
    btnNoRecurrence.Enabled( true );
    btnWeekly      .Enabled( true );
    btnMonthly     .Enabled( true );
    btnYearly      .Enabled( true );
    
    // Separator
    lblRecurrencePattern.TextColor( Color::WindowText() );
    lblHorizontalLine2  .TextColor( Color::Gray() );
    
    // Daily
    if( btnDaily.Pressed() )
    {
      ckbEvery       .Enabled( true );
      ckbEveryWeekday.Enabled( true );
      
      edtEveryNrOfDays.Enabled( true );
      edtEveryNrOfDays.TextColor( Color::WindowText() );
      lblDays         .TextColor( Color::WindowText() );
    
      // Disable the EditBox again if necessary.
      // It needs to be enabled above first to have the tooltiptext reset.
      if( not ckbEvery.Checked() )
      {
        edtEveryNrOfDays.Enabled( false );
      }
    }
    
    // Weekly
    else if( btnWeekly.Pressed() )
    {
      lblRecurWeekly   .TextColor( Color::WindowText() );
      edtEveryNrOfWeeks.Enabled( true );
      edtEveryNrOfWeeks.TextColor( Color::WindowText() );
      lblWeeks         .TextColor( Color::WindowText() );
    
      lblOn       .TextColor( Color::WindowText() );
      btnMonday   .Enabled( true );
      btnTuesday  .Enabled( true );
      btnWednesday.Enabled( true );
      btnThursday .Enabled( true );
      btnFriday   .Enabled( true );
      btnSaturday .Enabled( true );
      btnSunday   .Enabled( true );
    }
    
    // Monthly
    else if( btnMonthly.Pressed() )
    {
      this.ShowRecurrencePattern( LibCal_RecurrencePattern::TYPE_MONTHLY() );
    }
    
    // Yearly
    else if( btnYearly.Pressed() )
    {
      lblRecurYearly   .TextColor( Color::WindowText() );
      edtEveryNrOfYears.Enabled( true );
      edtEveryNrOfYears.TextColor( Color::WindowText() );
      lblYears         .TextColor( Color::WindowText() );
    
      this.ShowRecurrencePattern( LibCal_RecurrencePattern::TYPE_YEARLY() );
    }
  *]
}