C# Class TrakHound_UI.Timeline.TimelineTray

Main container class for TimelineBands. It is inherited from Grid, so that timeline band can be places one under another and main band can be maximized.
Inheritance: System.Windows.Controls.Grid, ITimelineToolboxTarget, INotifyPropertyChanged
Afficher le fichier Open project: TrakHound/TrakHound-Community Class Usage Examples

Méthodes publiques

Свойство Type Description
CurrentDateTimeProperty System.Windows.DependencyProperty
ImmediateDisplayProperty System.Windows.DependencyProperty
MaxDateTimeProperty System.Windows.DependencyProperty
MinDateTimeProperty System.Windows.DependencyProperty
TeaserSizeProperty System.Windows.DependencyProperty

Private Properties

Свойство Type Description
AddCopyrightElement void
ClearSelection void
CompareEvents int
FireEventCreated void
FireEventDeleted void
FireOnEventVisible void
FireScrollViewChanged void
FireTimelineDoubleClick void
ITimelineToolboxTarget void
ITimelineToolboxTarget void
LoadEventDocument List
OnControlAndDataComlete void
OnControlLoaded void
OnCurrentDateChanged void
OnFullScreenChanged void
OnMouseWheel void
OnSelectionChanged void
OnSizeChanged void
Zoom void

Méthodes publiques

Méthode Description
AddTimelineBand ( int height, bool isMain, string srcType, int columnsCount ) : void

Add new timeline band

AddTimelineBand ( int height, bool isMain, string srcType, int columnsCount, int eventSize ) : void
AddTimelineToolbox ( ) : void
ClearEvents ( ) : void

Removes all events from all timeline bands

CreateEvent ( ) : TimelineEvent
OnCurrentDateTimeChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnMaxDateTimeChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnMinDateTimeChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
ReadEvent ( System.Xml.Linq.XElement row ) : TimelineEvent
RefreshEvents ( ) : void

Refresh (delete and recreate and redisplay) all events on all timeline bands.

RefreshEvents ( bool checkInit ) : void
Reload ( ) : void
ResetEvents ( List events, bool fixDates = true ) : void

Resets the timeline using a list of events to provide to the UI.

ResetEvents ( System.Xml.Linq.XDocument doc ) : void

Resets the UI with the XML provided in the XML document.

ResetEvents ( string xml ) : void

ResetEvents method adds events specified in xml to all timeline bands. If you need to refresh events call ClearEvents and then ResetEvents, this will removed all events from the screen and then draw up-to-date events.

Run ( ) : void

Loads data and displays them in the control

SetTeaserEventImageForSelectedEvents ( string imageUrl ) : void

This image that is displayed when an event is selected

TimelineTray ( ) : System
ToString ( ) : string

This method is used for debugging (from Utilities.Trace)

Zoom ( bool zoomIn ) : void

Zooms in/out all timeline bands by one column

Méthodes protégées

Méthode Description
GetAttribute ( System.Xml.Linq.XAttribute a ) : string

Attribute value reader helper.

GetContent ( System.Xml.Linq.XElement e ) : string

Returns content of element as xml

HookChildElements ( System.Windows.Controls.UIElementCollection col ) : void
Initialized ( ) : void

Private Methods

Méthode Description
AddCopyrightElement ( ) : void

Do not remove copyright notice.

ClearSelection ( ) : void
CompareEvents ( TimelineEvent a, TimelineEvent b ) : int

Sort function for events by startdate

FireEventCreated ( FrameworkElement element, TimelineDisplayEvent de ) : void
FireEventDeleted ( FrameworkElement element, TimelineDisplayEvent de ) : void
FireOnEventVisible ( FrameworkElement element, TimelineDisplayEvent de ) : void
FireScrollViewChanged ( double height ) : void
FireTimelineDoubleClick ( System.DateTime date, Point point ) : void
ITimelineToolboxTarget ( ) : void
ITimelineToolboxTarget ( System.DateTime date ) : void
LoadEventDocument ( System.Xml.Linq.XDocument doc ) : List

Adds events located in parsed document to list of all events

OnControlAndDataComlete ( object sender, EventArgs e ) : void

This happens when we have all data and all timeline band controls have completed resizing, so we ready to show content

OnControlLoaded ( object sender, RoutedEventArgs e ) : void
OnCurrentDateChanged ( object sender, RoutedEventArgs e ) : void

The user moved current datetime on one of the timeline bands, so we sync all other bands with it.

OnFullScreenChanged ( object sender, EventArgs e ) : void
OnMouseWheel ( object sender, System.Windows.Input.MouseWheelEventArgs e ) : void
OnSelectionChanged ( object sender, EventArgs e ) : void
OnSizeChanged ( object sender, System.Windows.SizeChangedEventArgs e ) : void
Zoom ( bool zoomIn, int zoomValue ) : void

Zoom in/out all timeline bands by the number of columns defined by zoomValue

Method Details

AddTimelineBand() public méthode

Add new timeline band
public AddTimelineBand ( int height, bool isMain, string srcType, int columnsCount ) : void
height int
isMain bool
srcType string
columnsCount int
Résultat void

AddTimelineBand() public méthode

public AddTimelineBand ( int height, bool isMain, string srcType, int columnsCount, int eventSize ) : void
height int
isMain bool
srcType string
columnsCount int
eventSize int
Résultat void

AddTimelineToolbox() public méthode

public AddTimelineToolbox ( ) : void
Résultat void

ClearEvents() public méthode

Removes all events from all timeline bands
public ClearEvents ( ) : void
Résultat void

CreateEvent() public méthode

public CreateEvent ( ) : TimelineEvent
Résultat TimelineEvent

GetAttribute() protected static méthode

Attribute value reader helper.
protected static GetAttribute ( System.Xml.Linq.XAttribute a ) : string
a System.Xml.Linq.XAttribute
Résultat string

GetContent() protected static méthode

Returns content of element as xml
protected static GetContent ( System.Xml.Linq.XElement e ) : string
e System.Xml.Linq.XElement
Résultat string

HookChildElements() protected méthode

protected HookChildElements ( System.Windows.Controls.UIElementCollection col ) : void
col System.Windows.Controls.UIElementCollection
Résultat void

Initialized() protected méthode

protected Initialized ( ) : void
Résultat void

OnCurrentDateTimeChanged() public static méthode

public static OnCurrentDateTimeChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
d System.Windows.DependencyObject
e System.Windows.DependencyPropertyChangedEventArgs
Résultat void

OnMaxDateTimeChanged() public static méthode

public static OnMaxDateTimeChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
d System.Windows.DependencyObject
e System.Windows.DependencyPropertyChangedEventArgs
Résultat void

OnMinDateTimeChanged() public static méthode

public static OnMinDateTimeChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
d System.Windows.DependencyObject
e System.Windows.DependencyPropertyChangedEventArgs
Résultat void

ReadEvent() public méthode

public ReadEvent ( System.Xml.Linq.XElement row ) : TimelineEvent
row System.Xml.Linq.XElement
Résultat TimelineEvent

RefreshEvents() public méthode

Refresh (delete and recreate and redisplay) all events on all timeline bands.
public RefreshEvents ( ) : void
Résultat void

RefreshEvents() public méthode

public RefreshEvents ( bool checkInit ) : void
checkInit bool
Résultat void

Reload() public méthode

public Reload ( ) : void
Résultat void

ResetEvents() public méthode

Resets the timeline using a list of events to provide to the UI.
public ResetEvents ( List events, bool fixDates = true ) : void
events List The events to reset the UI with.
fixDates bool
Résultat void

ResetEvents() public méthode

Resets the UI with the XML provided in the XML document.
public ResetEvents ( System.Xml.Linq.XDocument doc ) : void
doc System.Xml.Linq.XDocument The XML document that contains the data for the timeline events.
Résultat void

ResetEvents() public méthode

ResetEvents method adds events specified in xml to all timeline bands. If you need to refresh events call ClearEvents and then ResetEvents, this will removed all events from the screen and then draw up-to-date events.
public ResetEvents ( string xml ) : void
xml string The XML data that contains the data for the timeline events.
Résultat void

Run() public méthode

Loads data and displays them in the control
public Run ( ) : void
Résultat void

SetTeaserEventImageForSelectedEvents() public méthode

This image that is displayed when an event is selected
public SetTeaserEventImageForSelectedEvents ( string imageUrl ) : void
imageUrl string
Résultat void

TimelineTray() public méthode

public TimelineTray ( ) : System
Résultat System

ToString() public méthode

This method is used for debugging (from Utilities.Trace)
public ToString ( ) : string
Résultat string

Zoom() public méthode

Zooms in/out all timeline bands by one column
public Zoom ( bool zoomIn ) : void
zoomIn bool
Résultat void

Property Details

CurrentDateTimeProperty public_oe static_oe property

Gets or sets current date of all timeline bands. Current date is in the middle of each timeline band. This property can be changed from code behind to programmatically move timelines back and forth
public static DependencyProperty,System.Windows CurrentDateTimeProperty
Résultat System.Windows.DependencyProperty

ImmediateDisplayProperty public_oe static_oe property

public static DependencyProperty,System.Windows ImmediateDisplayProperty
Résultat System.Windows.DependencyProperty

MaxDateTimeProperty public_oe static_oe property

public static DependencyProperty,System.Windows MaxDateTimeProperty
Résultat System.Windows.DependencyProperty

MinDateTimeProperty public_oe static_oe property

public static DependencyProperty,System.Windows MinDateTimeProperty
Résultat System.Windows.DependencyProperty

TeaserSizeProperty public_oe static_oe property

public static DependencyProperty,System.Windows TeaserSizeProperty
Résultat System.Windows.DependencyProperty