Changeset 2313


Ignore:
Timestamp:
10/20/2011 4:52:01 AM (3 years ago)
Author:
lowjoel
Message:

The event handler for the checked changed event for each of the recurring schedule types may be called from outside the three buttons. For such instances, do not change the checked state (since sender is none of the three, all will be reset to blank)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/eraser/Eraser/TaskPropertiesForm.cs

    r2312 r2313  
    2727using System.Text; 
    2828using System.Windows.Forms; 
     29using System.Linq; 
    2930 
    3031using System.Globalization; 
     
    405406        private void scheduleSpan_CheckedChanged(object sender, EventArgs e) 
    406407        { 
    407             if (((RadioButton)sender).Checked) 
    408             { 
    409                 RadioButton[] group = new RadioButton[] { 
    410                     scheduleDaily, scheduleWeekly, scheduleMonthly 
    411                 }; 
     408            RadioButton[] group = new RadioButton[] { 
     409                scheduleDaily, scheduleWeekly, scheduleMonthly 
     410            }; 
     411            if (group.Contains(sender) && ((RadioButton)sender).Checked) 
     412            { 
    412413                foreach (RadioButton button in group) 
    413414                    if (button != sender) 
Note: See TracChangeset for help on using the changeset viewer.