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); }
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); }
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); }
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); }