A
Andrew Robinson
Not sure what to call this, but I have a series of User Controls that
display the days of the week. Usually using a set of radio buttons. Works
very well.
I display the user controls in a form and typically allow the user to select
only a single day within a single week. There are at times, up to 8 weeks
displayed, but the user is allowed only one day to be selected across all
controls. As the use clicks on a radio button, all other buttons on all
other user controls are cleared. I am doing this by fireing an event from
the control to the windows form. Again, works very well.
I use the 'System.DayOfWeek' enumeration to get and set the value of the
control. I even use this enumeration in the even on the control that is
fired when the user changed the selection. Again works very well.
Now, I would like to add a state that has no selection on the control. I am
currently doing this with an additional Boolean flag, but is there any way
that I can in effect add another value to System.DayOfWeek. This would be
really helpful as I could continue to pass this value around my application
without worrying about conversion.
Or, is this a possible use for nullable types in 2.0?
-Andrew
display the days of the week. Usually using a set of radio buttons. Works
very well.
I display the user controls in a form and typically allow the user to select
only a single day within a single week. There are at times, up to 8 weeks
displayed, but the user is allowed only one day to be selected across all
controls. As the use clicks on a radio button, all other buttons on all
other user controls are cleared. I am doing this by fireing an event from
the control to the windows form. Again, works very well.
I use the 'System.DayOfWeek' enumeration to get and set the value of the
control. I even use this enumeration in the even on the control that is
fired when the user changed the selection. Again works very well.
Now, I would like to add a state that has no selection on the control. I am
currently doing this with an additional Boolean flag, but is there any way
that I can in effect add another value to System.DayOfWeek. This would be
really helpful as I could continue to pass this value around my application
without worrying about conversion.
Or, is this a possible use for nullable types in 2.0?
-Andrew