Beispiel #1
0
 /// <summary>
 /// Handles the ParseDateTimeValue event of the uxDateTimeMessageDate control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="args">The <see cref="Telerik.Windows.Controls.ParseDateTimeEventArgs"/> instance containing the event data.</param>
 private void uxDateTimeMessageDate_ParseDateTimeValue(object sender, ParseDateTimeEventArgs args)
 {
     //if (args.IsParsingSuccessful)
     //{
     //    uxDateTimeMessageDate.IsDropDownOpen = false;
     //}
     //else
     //{
     //    uxDateTimeMessageDate.DateTimeText = uxDateTimeMessageDate.SelectedValue.ToString();
     //}
 }
        public void OnParseDateTimeValue()
        {
            // arrange
            var vm = new DateTimeFieldViewModel();
            var evnt = new ParseDateTimeEventArgs(null, null, DateTime.Now, new DateTime(1752, 1, 1), true);

            // act
            vm.OnParseDateTimeValue(null, evnt);

            // assert
            Assert.IsFalse(evnt.IsParsingSuccessful);
        }
		private void dateTimePicker_ParseDateTimeValue(object sender, ParseDateTimeEventArgs args)
		{
			this.LogEvent("ParseDateTimeValue", args.IsParsingSuccessful ? "Successfull" : "Unsuccessfull");
		}