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
ファイルを表示 Open project: TrakHound/TrakHound-Community Class Usage Examples

Public Properties

Property Type Description
CurrentDateTimeProperty System.Windows.DependencyProperty
ImmediateDisplayProperty System.Windows.DependencyProperty
MaxDateTimeProperty System.Windows.DependencyProperty
MinDateTimeProperty System.Windows.DependencyProperty
TeaserSizeProperty System.Windows.DependencyProperty

Private Properties

Property 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

Public Methods

Method 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

Protected Methods

Method 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

Method 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 method

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

AddTimelineBand() public method

public AddTimelineBand ( int height, bool isMain, string srcType, int columnsCount, int eventSize ) : void
height int
isMain bool
srcType string
columnsCount int
eventSize int
return void

AddTimelineToolbox() public method

public AddTimelineToolbox ( ) : void
return void

ClearEvents() public method

Removes all events from all timeline bands
public ClearEvents ( ) : void
return void

CreateEvent() public method

public CreateEvent ( ) : TimelineEvent
return TimelineEvent

GetAttribute() protected static method

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

GetContent() protected static method

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

HookChildElements() protected method

protected HookChildElements ( System.Windows.Controls.UIElementCollection col ) : void
col System.Windows.Controls.UIElementCollection
return void

Initialized() protected method

protected Initialized ( ) : void
return void

OnCurrentDateTimeChanged() public static method

public static OnCurrentDateTimeChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
d System.Windows.DependencyObject
e System.Windows.DependencyPropertyChangedEventArgs
return void

OnMaxDateTimeChanged() public static method

public static OnMaxDateTimeChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
d System.Windows.DependencyObject
e System.Windows.DependencyPropertyChangedEventArgs
return void

OnMinDateTimeChanged() public static method

public static OnMinDateTimeChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
d System.Windows.DependencyObject
e System.Windows.DependencyPropertyChangedEventArgs
return void

ReadEvent() public method

public ReadEvent ( System.Xml.Linq.XElement row ) : TimelineEvent
row System.Xml.Linq.XElement
return TimelineEvent

RefreshEvents() public method

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

RefreshEvents() public method

public RefreshEvents ( bool checkInit ) : void
checkInit bool
return void

Reload() public method

public Reload ( ) : void
return void

ResetEvents() public method

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
return void

ResetEvents() public method

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.
return void

ResetEvents() public method

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.
return void

Run() public method

Loads data and displays them in the control
public Run ( ) : void
return void

SetTeaserEventImageForSelectedEvents() public method

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

TimelineTray() public method

public TimelineTray ( ) : System
return System

ToString() public method

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

Zoom() public method

Zooms in/out all timeline bands by one column
public Zoom ( bool zoomIn ) : void
zoomIn bool
return 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
return System.Windows.DependencyProperty

ImmediateDisplayProperty public_oe static_oe property

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

MaxDateTimeProperty public_oe static_oe property

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

MinDateTimeProperty public_oe static_oe property

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

TeaserSizeProperty public_oe static_oe property

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