public static IsFirst ( TriColorValue value ) : bool | ||
value | TriColorValue | |
리턴 | bool |
protected override void OnKeyUp(KeyEventArgs e) { base.OnKeyUp(e); var newValue = value; if (!(e.Alt || e.Control || e.Shift)) { if (e.KeyCode == Keys.Up) { if (!TriColorValueHelper.IsFirst(newValue)) { newValue = TriColorValueHelper.PreviousValue(newValue); e.Handled = true; } } else if (e.KeyCode == Keys.Down) { if (!TriColorValueHelper.IsLast(newValue)) { newValue = TriColorValueHelper.NextValue(newValue); e.Handled = true; } } } Value = newValue; }
// Return the fragment for the previous value protected override IRawElementProviderFragment GetPreviousSibling() { if (!TriColorValueHelper.IsFirst(_value)) { return(new TriColorFragmentProvider( _control, fragmentRoot, TriColorValueHelper.PreviousValue(_value))); } return(null); }