public bool ProcessKeyPress(Keys keyVal) { switch (keyVal) { case (Keys.Tab): case ((Keys.Left)): case ((Keys.Down)): case ((Keys.Up)): case ((Keys.Right)): case ((Keys.Control | Keys.Left)): case ((Keys.Control | Keys.Down)): case ((Keys.Control | Keys.Up)): case ((Keys.Control | Keys.Right)): { return(this.ProcessDialogKey(keyVal)); } } //we dont know how to handle the key press //so, lets see if our parent want to IKeyPressProcessor p = this.Parent as IKeyPressProcessor; if (p == null) { return(false); } return(p.ProcessKeyPress(keyVal)); }
public bool ProcessKeyPress(Keys keyVal) { switch (keyVal) { case (Keys.Up): case (Keys.Down): case (Keys.Left): case (Keys.Right): case ((Keys.Control | Keys.Left)): case ((Keys.Control | Keys.Down)): case ((Keys.Control | Keys.Up)): case ((Keys.Control | Keys.Right)): { return(this.ProcessDialogKey(keyVal)); } default: { IKeyPressProcessor p = this.Parent as IKeyPressProcessor; if (p == null) { return(false); } return(p.ProcessKeyPress(keyVal)); } } }
public bool ProcessReturnKey() { IKeyPressProcessor p = this.Parent as IKeyPressProcessor; if (p == null) { return(false); } return(p.ProcessReturnKey()); }
public bool ProcessKeyPress(Keys keyVal) { IKeyPressProcessor kpp = GetFocusedControl() as IKeyPressProcessor; if (kpp != null) { return(kpp.ProcessKeyPress(keyVal)); } return(false); }
public bool ProcessReturnKey() { IKeyPressProcessor kpp = GetFocusedControl() as IKeyPressProcessor; if (kpp != null) { return(kpp.ProcessReturnKey()); } return(false); }
public virtual bool ProcessBackTabKey() { IKeyPressProcessor p = this.Parent as IKeyPressProcessor; if (p == null) { return(false); } return(p.ProcessBackTabKey()); }
public bool ProcessKeyPress(Keys keyVal) { IKeyPressProcessor p = this.Parent as IKeyPressProcessor; if (p == null) { return(false); } return(p.ProcessKeyPress(keyVal)); }
public bool ProcessDialogKey(Keys keyVal) { switch (keyVal) { case (Keys.Tab): { return(this.ProcessTabKey()); } case ((Keys.Left)): case ((Keys.Control | Keys.Left)): { return(this.MoveSeclection(Direction.Left)); } case ((Keys.Control | Keys.Down)): { //ClearInputMessageQueue(); return(this.MoveSeclection(Direction.Down)); } case ((Keys.Down)): { return(this.MoveSeclection(Direction.Down)); } case ((Keys.Control | Keys.Up)): { //ClearInputMessageQueue(); return(this.MoveSeclection(Direction.Up)); } case ((Keys.Up)): { return(this.MoveSeclection(Direction.Up)); } case ((Keys.Right)): case ((Keys.Control | Keys.Right)): { return(this.MoveSeclection(Direction.Right)); } } //we dont know how to handle the key press //so, lets see if our parent want to IKeyPressProcessor p = this.Parent as IKeyPressProcessor; if (p == null) { return(false); } return(p.ProcessDialogKey(keyVal)); }
public new bool ProcessDialogKey(Keys keyVal) #endif { IKeyPressProcessor p = this.Parent as IKeyPressProcessor; if (p == null) { return(false); } return(p.ProcessDialogKey(keyVal)); }
public new bool ProcessDialogKey(Keys keyVal) #endif { switch (keyVal) { case (Keys.Left): case (Keys.Right): case (Keys.Up): case (Keys.Down): default: { IKeyPressProcessor p = this.Parent as IKeyPressProcessor; if (p == null) { return(false); } return(p.ProcessDialogKey(keyVal)); } } }
public new bool ProcessDialogKey(Keys keyVal) #endif { switch (keyVal) { case (Keys.Up): case (Keys.Down): { return(false); //let the up down control handle the behavior } default: { IKeyPressProcessor p = this.Parent as IKeyPressProcessor; if (p == null) { return(false); } return(p.ProcessDialogKey(keyVal)); } } }
public virtual bool ProcessKeyPress(Keys keyVal) { switch (keyVal) { case (Keys.Up): case (Keys.Down): case (Keys.Left): case (Keys.Right): { return(this.ProcessDialogKey(keyVal)); } case (Keys.Enter): { if (DeviceInfo.DevicePlatform == PlatformType.WinCE) { this.DroppedDown = true; return(true); } else { return(false); } } default: { IKeyPressProcessor p = this.Parent as IKeyPressProcessor; if (p == null) { return(false); } return(p.ProcessKeyPress(keyVal)); } } }
private int _keyCounter = 0;//keeps track of the number of times the user hits enter on the control after it gains focus. // public virtual bool ProcessReturnKey() { if (this.DroppedDown == true) { _keyCounter++; EditableDataGrid dg = this.Parent as EditableDataGrid; if (DeviceInfo.DevicePlatform == PlatformType.WinCE && (dg != null && _keyCounter == 3)) { dg.MoveSeclection(Direction.Right); return(true); } else if (dg != null && _keyCounter == 2) { dg.MoveSeclection(Direction.Right); return(true); } else { return(false); } } else { _keyCounter = 0; IKeyPressProcessor p = this.Parent as IKeyPressProcessor; if (p == null) { return(false); } return(p.ProcessReturnKey()); } }
public new bool ProcessDialogKey(Keys keyVal) #endif { switch (keyVal) { case (Keys.Left): { if (this.SelectionStart == 0) { EditableDataGrid dg = this.Parent as EditableDataGrid; if (dg != null) { return(dg.MoveSeclection(Direction.Left)); } } break; } case (Keys.Right): { if (this.SelectionStart == this.Text.Length) { EditableDataGrid dg = this.Parent as EditableDataGrid; if (dg != null) { return(dg.MoveSeclection(Direction.Right)); } } break; } case (Keys.Up): { if (this.DroppedDown == false) { EditableDataGrid dg = this.Parent as EditableDataGrid; if (dg != null) { return(dg.MoveSeclection(Direction.Up)); } } break; } case (Keys.Down): { if (this.DroppedDown == false) { EditableDataGrid dg = this.Parent as EditableDataGrid; if (dg != null) { return(dg.MoveSeclection(Direction.Down)); } } break; } default: { IKeyPressProcessor p = this.Parent as IKeyPressProcessor; if (p == null) { return(false); } return(p.ProcessDialogKey(keyVal)); } } return(false); }