private static void SetNumericProperties <T>(CommonNumericUpDown <T> control, T minValue, T maxValue, bool isReadOnly)
     where T : struct, IFormattable, IComparable <T>
 {
     SetControlStyle(control);
     control.Minimum    = minValue;
     control.Maximum    = maxValue;
     control.IsReadOnly = isReadOnly;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initialises static members of the <see cref="UIntegerUpDown"/> class.
 /// </summary>
 static UIntegerUpDown()
 {
     CommonNumericUpDown <uint> .UpdateMetadata(typeof(UIntegerUpDown), (uint)1, uint.MinValue, uint.MaxValue);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initialises static members of the <see cref="SByteUpDown"/> class.
 /// </summary>
 static SByteUpDown()
 {
     CommonNumericUpDown <sbyte> .UpdateMetadata(typeof(SByteUpDown), (sbyte)1, sbyte.MinValue, sbyte.MaxValue);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Initialises static members of the <see cref="UShortUpDown"/> class.
 /// </summary>
 static UShortUpDown()
 {
     CommonNumericUpDown <ushort> .UpdateMetadata(typeof(UShortUpDown), (ushort)1, ushort.MinValue, ushort.MaxValue);
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Initialises static members of the <see cref="ShortUpDown"/> class.
 /// </summary>
 static ShortUpDown()
 {
     CommonNumericUpDown <short> .UpdateMetadata(typeof(ShortUpDown), (short)1, short.MinValue, short.MaxValue);
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Initialises static members of the <see cref="DecimalUpDown"/> class.
 /// </summary>
 static DecimalUpDown()
 {
     CommonNumericUpDown <decimal> .UpdateMetadata(typeof(DecimalUpDown), 1m, decimal.MinValue, decimal.MaxValue);
 }