예제 #1
0
 /// <summary>
 ///   Initializes a new instance of the DateTimeBehavior class by associating it with a TextBoxBase derived object. </summary>
 /// <param name="textBox">
 ///   The TextBoxBase object to associate with this behavior.  It must not be null. </param>
 /// <exception cref="ArgumentNullException">textBox is null. </exception>
 /// <remarks>
 ///   This constructor retrieves many of the properties from the user's system. </remarks>
 /// <seealso cref="System.Windows.Forms.TextBoxBase" />
 public DateTimeBehavior(TextBoxBase textBox)
     :
     base(textBox)
 {
     m_dateBehavior = new DateBehavior(textBox, false);  // does not add the event handlers
     m_flags       |= m_dateBehavior.Flags;
     m_hourStart    = 11;
 }
예제 #2
0
 /// <summary>
 ///   Initializes a new instance of the DateTimeBehavior class by copying it from
 ///   another DateTimeBehavior object. </summary>
 /// <param name="behavior">
 ///   The DateTimeBehavior 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 DateTimeBehavior(DateTimeBehavior behavior)
     :
     base(behavior)
 {
     m_dateBehavior = new DateBehavior(m_textBox, false);  // does not add the event handlers
 }
예제 #3
0
 public DateTextBox(DateBehavior behavior) :
     base(behavior)
 {
 }
예제 #4
0
 public DateTextBox()
 {
     m_behavior = new DateBehavior(this);
 }