Пример #1
0
        public override void SetDate(DateTime?dateTime, DateFormat dateFormat)
        {
            var valuePattern = (ValuePattern)AutomationElement.GetCurrentPattern(ValuePattern.Pattern);

            valuePattern.SetValue(dateTime != null ? dateTime.Value.ToShortDateString() : null);
        }
Пример #2
0
        public override void SetDate(DateTime?dateTime, DateFormat dateFormat)
        {
            var valuePattern = AutomationElement.Patterns.Value.Pattern;

            valuePattern.SetValue(dateTime != null ? dateTime.Value.ToShortDateString() : "");
        }
Пример #3
0
 public override void SetDate(DateTime?dateTime, DateFormat dateFormat)
 {
     GetPattern <ValuePattern>().SetValue(dateTime != null ? dateTime.Value.ToShortDateString() : string.Empty);
 }