C# Class ZForge.Motion.Controls.TimeSlider

Inheritance: System.Windows.Forms.TrackBar
Afficher le fichier Open project: zhuangyy/Motion

Méthodes publiques

Méthode Description
ResumeLayout ( ) : void

Call this function if you called SuspendLayout during control value setting.

SuspendLayout ( ) : void

Call this function if you want to set several values within the slider, and you don't want consistancy checks until updates are comlete. When done, call ResumeLayout. SuspendLayout basically gives you free reign to set any values into the control you want. Note that it will blow up with bad values later, though!

TimeSlider ( ) : System

Constructor for class. Initializes all our internal variables.

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

OnPaint ( PaintEventArgs e ) : void

OnPaint event. We are kind of tricking the system, because I want to paint on top of the trackbar. The system either wants to draw it all and not send OnPaint events or let me do everything. So, we say I'll-do-it-no-you-do-it-okay-I'll-do-it.

OnResize ( EventArgs e ) : void

Resize event

OnScroll ( EventArgs e ) : void

When the slider value is changed, we need to update our current value to the correct date representing that position.

OnValueChanged ( EventArgs e ) : void

When the slider value is changed, we need to update our current value to the correct date representing that position.

Private Methods

Méthode Description
DateFormat ( System.DateTime dt ) : string

Turn our date into a string based on the Format value.

DateFormatAsDate ( System.DateTime dt ) : string

Turn our date into a string based on the Format value.

DateFormatAsDuration ( System.DateTime dt ) : string

Turn our date into a duration string, similar to what QuickTime shows.

DrawLabels ( ) : void

Draw the labels and segment panel for our control, and put them in the correct position based on current values.

InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

SetCurrentFromIndexChange ( ) : void

When the puck was changed through user interaction, update our current value and labels based on the new value.

SetIndexes ( ) : void

Set min, max and current values within the control. Also calls DrawLabels, so this function pretty much performs all layout within the control.

Method Details

Dispose() protected méthode

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
Résultat void

OnPaint() protected méthode

OnPaint event. We are kind of tricking the system, because I want to paint on top of the trackbar. The system either wants to draw it all and not send OnPaint events or let me do everything. So, we say I'll-do-it-no-you-do-it-okay-I'll-do-it.
protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs
Résultat void

OnResize() protected méthode

Resize event
protected OnResize ( EventArgs e ) : void
e EventArgs
Résultat void

OnScroll() protected méthode

When the slider value is changed, we need to update our current value to the correct date representing that position.
protected OnScroll ( EventArgs e ) : void
e EventArgs
Résultat void

OnValueChanged() protected méthode

When the slider value is changed, we need to update our current value to the correct date representing that position.
protected OnValueChanged ( EventArgs e ) : void
e EventArgs
Résultat void

ResumeLayout() public méthode

Call this function if you called SuspendLayout during control value setting.
public ResumeLayout ( ) : void
Résultat void

SuspendLayout() public méthode

Call this function if you want to set several values within the slider, and you don't want consistancy checks until updates are comlete. When done, call ResumeLayout. SuspendLayout basically gives you free reign to set any values into the control you want. Note that it will blow up with bad values later, though!
public SuspendLayout ( ) : void
Résultat void

TimeSlider() public méthode

Constructor for class. Initializes all our internal variables.
public TimeSlider ( ) : System
Résultat System