C# Class Gymnastika.Controls.TimePicker

Inheritance: System.Windows.Controls.Control
Show file Open project: weiqiyiji/Gymnastika

Public Properties

Property Type Description
MaxTimeProperty System.Windows.DependencyProperty
MinTimeProperty System.Windows.DependencyProperty
SelectedHourProperty System.Windows.DependencyProperty
SelectedMinuteProperty System.Windows.DependencyProperty
SelectedSecondProperty System.Windows.DependencyProperty
SelectedTimeChangedEvent System.Windows.RoutedEvent
SelectedTimeProperty System.Windows.DependencyProperty

Public Methods

Method Description
IncrementDecrementNumber ( string num, int minValue, int maxVal, bool increment ) : int
OnApplyTemplate ( ) : void

override to hook to the Control template elements

TimePicker ( ) : System

Default constructor

ValidateNumber ( int newNum, int minValue, int maxValue ) : int
ValidateNumber ( string newNum, int minValue, int maxValue ) : int

Private Methods

Method Description
AdjustCarretIndexOrMoveToNeighbour ( TextBox current, TextBox neighbour ) : void
AdjustText ( TextBox textBox, string newText ) : string
BeginUpdateSelectedTime ( ) : void
DecrementTime ( object sender, RoutedEventArgs e ) : void
EndUpdateSelectedTime ( ) : void
ForceValidSelectedTime ( DependencyObject sender, object value ) : object
HoursKeyUp ( object sender, System.Windows.Input.KeyEventArgs e ) : void
HoursTextChanged ( object sender, System.Windows.Input.TextCompositionEventArgs e ) : void
IncreaseTime ( object sender, RoutedEventArgs e ) : void
IncrementDecrementTime ( Key selectedKey ) : bool
IncrementDecrementTime ( bool increment ) : void
MinutesKeyUp ( object sender, System.Windows.Input.KeyEventArgs e ) : void
MinutesTextChanged ( object sender, System.Windows.Input.TextCompositionEventArgs e ) : void
OnTimeSelectedChanged ( System.TimeSpan newTime, System.TimeSpan oldTime ) : void
SecondsKeyUp ( object sender, System.Windows.Input.KeyEventArgs e ) : void
SecondsTextChanged ( object sender, System.Windows.Input.TextCompositionEventArgs e ) : void
SelectedTimePropertyChanged ( DependencyObject sender, System.Windows.DependencyPropertyChangedEventArgs e ) : void
SetNewTime ( TimePicker timePicker ) : void
TextGotFocus ( object sender, RoutedEventArgs e ) : void
TrimSelectedText ( TextBox textBox ) : void
TryFocusNeighbourControl ( TextBox currentControl, TextBox leftControl, TextBox rightControl, Key keyPressed ) : void
ValidateAndSetHour ( string text ) : int
ValidateAndSetMinute ( string text ) : int
ValidateAndSetSeconds ( string text ) : int

Method Details

IncrementDecrementNumber() public method

public IncrementDecrementNumber ( string num, int minValue, int maxVal, bool increment ) : int
num string
minValue int
maxVal int
increment bool
return int

OnApplyTemplate() public method

override to hook to the Control template elements
public OnApplyTemplate ( ) : void
return void

TimePicker() public method

Default constructor
public TimePicker ( ) : System
return System

ValidateNumber() public static method

public static ValidateNumber ( int newNum, int minValue, int maxValue ) : int
newNum int
minValue int
maxValue int
return int

ValidateNumber() public method

public ValidateNumber ( string newNum, int minValue, int maxValue ) : int
newNum string
minValue int
maxValue int
return int

Property Details

MaxTimeProperty public static property

Gets or sets the maximum time that can be selected
public static DependencyProperty,System.Windows MaxTimeProperty
return System.Windows.DependencyProperty

MinTimeProperty public static property

Gets or sets the minimum time selected
public static DependencyProperty,System.Windows MinTimeProperty
return System.Windows.DependencyProperty

SelectedHourProperty public static property

public static DependencyProperty,System.Windows SelectedHourProperty
return System.Windows.DependencyProperty

SelectedMinuteProperty public static property

Backing store for the selected minsutes
public static DependencyProperty,System.Windows SelectedMinuteProperty
return System.Windows.DependencyProperty

SelectedSecondProperty public static property

Backing store for the selected second
public static DependencyProperty,System.Windows SelectedSecondProperty
return System.Windows.DependencyProperty

SelectedTimeChangedEvent public static property

public static RoutedEvent,System.Windows SelectedTimeChangedEvent
return System.Windows.RoutedEvent

SelectedTimeProperty public static property

Backing store for the selected timestamp
public static DependencyProperty,System.Windows SelectedTimeProperty
return System.Windows.DependencyProperty