示例#1
0
		/// <summary>
		///   Initializes a new instance of the NumericBehavior class by copying it from 
		///   another NumericBehavior object. </summary>
		/// <param name="behavior">
		///   The NumericBehavior object to copied (and then disposed of).  It must not be null. </param>
		/// <exception cref="ArgumentNullException">behavior is null. </exception>
		/// <remarks>
		///   After the behavior.TextBox object is copied, Dispose is called on the behavior parameter. </remarks>
		public NumericBehavior(NumericBehavior behavior) :
			base(behavior)
		{
			m_maxWholeDigits = behavior.m_maxWholeDigits;
			m_maxDecimalPlaces = behavior.m_maxDecimalPlaces;				
			m_digitsInGroup = behavior.m_digitsInGroup;
			m_negativeSign = behavior.m_negativeSign;
			m_decimalPoint = behavior.m_decimalPoint;
			m_groupSeparator = behavior.m_groupSeparator;
			m_prefix = behavior.m_prefix;
			m_rangeMin = behavior.m_rangeMin;
			m_rangeMax = behavior.m_rangeMax;
		}
示例#2
0
		/// <summary>
		///   Initializes a new instance of the NumericTextBox class by assigning its Behavior field 
		///   to an instance of <see cref="NumericBehavior" /> and setting the maximum number of digits 
		///   allowed left and right of the decimal point. </summary>
		/// <param name="maxWholeDigits">
		///   The maximum number of digits allowed left of the decimal point.
		///   If it is less than 1, it is set to 1. </param>
		/// <param name="maxDecimalPlaces">
		///   The maximum number of digits allowed right of the decimal point.
		///   If it is less than 0, it is set to 0. </param>
		public NumericTextBox(int maxWholeDigits, int maxDecimalPlaces)
		{
			m_behavior = new NumericBehavior(this, maxWholeDigits, maxDecimalPlaces);
		}
示例#3
0
		/// <summary>
		///   Initializes a new instance of the NumericTextBox class by explicitly assigning its Behavior field. </summary>
		/// <param name="behavior">
		///   The <see cref="NumericBehavior" /> object to associate the textbox with. </param>
		public NumericTextBox(NumericBehavior behavior) :
			base(behavior)
		{
		}
示例#4
0
		/// <summary>
		///   Initializes a new instance of the NumericTextBox class by assigning its Behavior field
		///   to an instance of <see cref="NumericBehavior" />. </summary>
		public NumericTextBox()
		{
			m_behavior = new NumericBehavior(this);
		}