internal Option(MaskField owner, string name, ulong value) { Ensure.Argument.NotNull(owner, "owner"); Ensure.Argument.NotNullOrEmpty(name, "name"); Owner = owner; Name = name; Value = value; }
public EnumFlagsField(string label, TEnum value = default(TEnum)) { var type = typeof(TEnum); var names = Enum.GetNames(type); var values = (TEnum[])Enum.GetValues(type); var options = names.Select((n, i) => Tuple.Create(n, ToMask(values[i]))); field = new MaskField(label, ToMask(value), options); field.ValueChanged += OnMaskValueChanged; }