Ewl » Canonical The canonical version of EWL Read More
Clone URL:  
RadioButtonSetup.cs
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
namespace EnterpriseWebLibrary.EnterpriseWebFramework { /// <summary> /// The configuration for a radio button. /// </summary> public class RadioButtonSetup { /// <summary> /// Creates a setup object for a standard radio button. /// </summary> /// <param name="displaySetup"></param> /// <param name="classes">The classes on the control.</param> /// <param name="action">The action that will occur when the user hits Enter on the control. Pass null to use the current default action.</param> /// <param name="pageModificationValue"></param> public static RadioButtonSetup Create( DisplaySetup displaySetup = null, ElementClassSet classes = null, FormAction action = null, PageModificationValue<bool> pageModificationValue = null ) { return new RadioButtonSetup( displaySetup, false, classes, action, pageModificationValue ); } /// <summary> /// Creates a setup object for a read-only radio button. /// </summary> /// <param name="displaySetup"></param> /// <param name="classes">The classes on the control.</param> public static RadioButtonSetup CreateReadOnly( DisplaySetup displaySetup = null, ElementClassSet classes = null ) { return new RadioButtonSetup( displaySetup, true, classes, null, null ); } internal readonly DisplaySetup DisplaySetup; internal readonly bool IsReadOnly; internal readonly ElementClassSet Classes; internal readonly FormAction Action; internal readonly PageModificationValue<bool> PageModificationValue; private RadioButtonSetup( DisplaySetup displaySetup, bool isReadOnly, ElementClassSet classes, FormAction action, PageModificationValue<bool> pageModificationValue ) { DisplaySetup = displaySetup; IsReadOnly = isReadOnly; Classes = classes; Action = action ?? FormState.Current.DefaultAction; PageModificationValue = pageModificationValue ?? new PageModificationValue<bool>(); } } }