public FLOAT32RuntimeField(FieldModel fieldModel) : base(fieldModel) { _editor = new RuntimeFieldEditor<DoubleUpDown>( fieldModel.Name, new DoubleUpDown() { Minimum = Single.MinValue, Maximum = Single.MaxValue, VerticalAlignment = VerticalAlignment.Stretch, HorizontalAlignment = HorizontalAlignment.Stretch, Margin = new Thickness(0), BorderThickness = new Thickness(0) }); }
public INT32RuntimeField(FieldModel fieldModel) : base(fieldModel) { _editor = new RuntimeFieldEditor<LongUpDown>( fieldModel.Name, new LongUpDown() { Minimum = Int32.MinValue, Maximum = Int32.MaxValue, VerticalAlignment = VerticalAlignment.Stretch, HorizontalAlignment = HorizontalAlignment.Stretch, Margin = new Thickness(0), BorderThickness = new Thickness(0), ClipValueToMinMax = true }); }
public FIXED16RuntimeField(FieldModel fieldModel) : base(fieldModel) { _options = new FixedPointOptionWrapper(fieldModel.Options); _editor = new RuntimeFieldEditor<DoubleUpDown>( fieldModel.Name, new DoubleUpDown() { VerticalAlignment = VerticalAlignment.Stretch, HorizontalAlignment = HorizontalAlignment.Stretch, Margin = new Thickness(0), BorderThickness = new Thickness(0), ClipValueToMinMax = true, Minimum = Int16.MinValue / _options.Scale, Maximum = Int16.MaxValue / _options.Scale }); }
protected BITRuntimeFieldBase(FieldModel fieldModel, int numberOfBits) : base(fieldModel) { var optionWrapper = new BITOptionWrapper(fieldModel.Options, numberOfBits); string[] names = optionWrapper.GetNames(); //Create tuples that contain the display name var tuples = names .Select(n => new Tuple<string, RuntimeFieldEditor<CheckBox>>( n, new RuntimeFieldEditor<CheckBox>(fieldModel.Name + " - " + n, new CheckBox()))) .ToArray(); _allFieldEditors = tuples .Select(t => t.Item2) .ToArray(); _displayedFieldEditors = tuples .Where(t => !string.IsNullOrWhiteSpace(t.Item1)) .Select(t => t.Item2) .ToArray(); }