Halyri - Häke  0.9
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events
Hake_WPF.MapController Class Reference

Controls maps. User can add specific pushpin to maps or all pushpins again. Maps can be too added. User can also center maps. Also handles closing maps. More...

Public Member Functions

delegate void MapWindowClosing ()
 Invoked when MapWindow is closing. More...
 
 MapController ()
 Constructor. Does nothing. More...
 
void AddMap (Map map)
 Adds map given map. More...
 
void MapToOwnWindow (ObservableCollection< Assignment > assignments)
 Makes new mapwindow and adds that map. Then adds pushpins to maps and adds eventhandler for mapwindow closing. More...
 
void Close ()
 Closes mapwindow if it is open. More...
 
void AddAllPushpins (ObservableCollection< Assignment > assignments)
 Adds puhspin to all maps. More...
 
void CenterMaps (Assignment assignment)
 Centers all maps to assignmets location. More...
 
void AddPushPinToAssignment (Assignment assignment)
 Adds all puhspins from specific assingment. More...
 

Events

MapWindowClosing MapWindowClosingEvent
 

Private Member Functions

void AddPushPinsToMap (Map map, ObservableCollection< Assignment > collection)
 Removes all pushpins from given map and then adds pushins from given collection to the map. More...
 
void mapWindow_Closing (object sender, System.ComponentModel.CancelEventArgs e)
 Removes map and then removes event handler for mapwindowclosing. More...
 

Private Attributes

MapWindow mapWindow
 
ObservableCollection< Pushpin > pushpins = new ObservableCollection<Pushpin>()
 
ObservableCollection< Map > maps = new ObservableCollection<Map>()
 

Detailed Description

Controls maps. User can add specific pushpin to maps or all pushpins again. Maps can be too added. User can also center maps. Also handles closing maps.

<author>Atte Söderlund</author>

Constructor & Destructor Documentation

Hake_WPF.MapController.MapController ( )

Constructor. Does nothing.

Member Function Documentation

void Hake_WPF.MapController.AddAllPushpins ( ObservableCollection< Assignment assignments)

Adds puhspin to all maps.

Parameters
assignmentsList of assignmets that contains those pushpins
void Hake_WPF.MapController.AddMap ( Map  map)

Adds map given map.

Parameters
mapGiven map
void Hake_WPF.MapController.AddPushPinsToMap ( Map  map,
ObservableCollection< Assignment collection 
)
private

Removes all pushpins from given map and then adds pushins from given collection to the map.

Parameters
mapWhere you want the pushpins
collectionCollection that contains Assigments
void Hake_WPF.MapController.AddPushPinToAssignment ( Assignment  assignment)

Adds all puhspins from specific assingment.

Parameters
assignmentSpecific assingment that puhspins is added
void Hake_WPF.MapController.CenterMaps ( Assignment  assignment)

Centers all maps to assignmets location.

Parameters
assignmentAssignment that contains location
void Hake_WPF.MapController.Close ( )

Closes mapwindow if it is open.

void Hake_WPF.MapController.MapToOwnWindow ( ObservableCollection< Assignment assignments)

Makes new mapwindow and adds that map. Then adds pushpins to maps and adds eventhandler for mapwindow closing.

Parameters
assignmentsList of assignments so puhspins can be added
void Hake_WPF.MapController.mapWindow_Closing ( object  sender,
System.ComponentModel.CancelEventArgs  e 
)
private

Removes map and then removes event handler for mapwindowclosing.

delegate void Hake_WPF.MapController.MapWindowClosing ( )

Invoked when MapWindow is closing.

Member Data Documentation

ObservableCollection<Map> Hake_WPF.MapController.maps = new ObservableCollection<Map>()
private
MapWindow Hake_WPF.MapController.mapWindow
private
ObservableCollection<Pushpin> Hake_WPF.MapController.pushpins = new ObservableCollection<Pushpin>()
private

Event Documentation

MapWindowClosing Hake_WPF.MapController.MapWindowClosingEvent

The documentation for this class was generated from the following file: