Пример #1
0
 public virtual void SetDate(DateTime dateTime, DateFormat dateFormat)
 {
     keyboard.Send(dateFormat.DisplayValue(dateTime, 0).ToString(), actionListener);
     keyboard.PressSpecialKey(KeyboardInput.SpecialKeys.RIGHT, actionListener);
     keyboard.Send(dateFormat.DisplayValue(dateTime, 1).ToString(), actionListener);
     keyboard.PressSpecialKey(KeyboardInput.SpecialKeys.RIGHT, actionListener);
     keyboard.Send(dateFormat.DisplayValue(dateTime, 2).ToString(), actionListener);
     keyboard.PressSpecialKey(KeyboardInput.SpecialKeys.RIGHT, actionListener);
 }
Пример #2
0
 public virtual void SetDate(DateTime dateTime, DateFormat dateFormat)
 {
     keyboard.Send(dateFormat.DisplayValue(dateTime, 0).ToString(), actionListener);
     keyboard.PressSpecialKey(KeyboardInput.SpecialKeys.RIGHT, actionListener);
     keyboard.Send(dateFormat.DisplayValue(dateTime, 1).ToString(), actionListener);
     keyboard.PressSpecialKey(KeyboardInput.SpecialKeys.RIGHT, actionListener);
     keyboard.Send(dateFormat.DisplayValue(dateTime, 2).ToString(), actionListener);
     keyboard.PressSpecialKey(KeyboardInput.SpecialKeys.RIGHT, actionListener);
 }
Пример #3
0
        public virtual void SetDate(DateTime?dateTime, DateFormat dateFormat)
        {
            if (dateTime == null)
            {
                ClearDate();
                return;
            }

            keyboard.Send(dateFormat.DisplayValue(dateTime.Value, 0).ToString(), actionListener);
            keyboard.PressSpecialKey(KeyboardInput.SpecialKeys.RIGHT, actionListener);
            keyboard.Send(dateFormat.DisplayValue(dateTime.Value, 1).ToString(), actionListener);
            keyboard.PressSpecialKey(KeyboardInput.SpecialKeys.RIGHT, actionListener);
            keyboard.Send(dateFormat.DisplayValue(dateTime.Value, 2).ToString(), actionListener);
            keyboard.PressSpecialKey(KeyboardInput.SpecialKeys.RIGHT, actionListener);
        }
Пример #4
0
        public virtual void SetDate(DateTime? dateTime, DateFormat dateFormat)
        {
            if (dateTime == null)
            {
                ClearDate();
                return;
            }

            keyboard.Send(dateFormat.DisplayValue(dateTime.Value, 0).ToString(), actionListener);
            keyboard.PressSpecialKey(KeyboardInput.SpecialKeys.RIGHT, actionListener);
            keyboard.Send(dateFormat.DisplayValue(dateTime.Value, 1).ToString(), actionListener);
            keyboard.PressSpecialKey(KeyboardInput.SpecialKeys.RIGHT, actionListener);
            keyboard.Send(dateFormat.DisplayValue(dateTime.Value, 2).ToString(), actionListener);
            keyboard.PressSpecialKey(KeyboardInput.SpecialKeys.RIGHT, actionListener);
        }