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

Assigment listboxitem that contains many properties like handlers, location, time, state, priority, pushpins, assigment info and street name. It sets content and background depending state and priority and if there is location available. More...

Inheritance diagram for Hake_WPF.Assignment:

Public Types

enum  priorities { priorities.NotUrgent = 0, priorities.Urgent = 1 }
 Not urgent and urgent enums. NotUrgent is 0 and Urgent is 1 as ints. More...
 
enum  States {
  States.New = 0, States.InProgress = 1, States.InTransfer = 2, States.Finalized = 3,
  States.Hold = 4
}
 Enum of states. New = 0,...,Hold=4. More...
 

Public Member Functions

 Assignment (String guid, DateTime time, priorities priority, States state, LocationInformationDto location)
 Initializes Assigment: sets state, priority, time, location, assimentinfo, sets backgroundcolor and content. These are essential for assignment More...
 
 Assignment (String guid, DateTime time, priorities priority, States state)
 Constructor without location. More...
 

Static Public Attributes

static readonly DependencyProperty IsHandlerProperty
 DependencyProperty for ishandler. More...
 

Properties

String EmergencyType [get, set]
 Sets and getsEmergency type can be any string that is short description about emergency. More...
 
ObservableCollection
< TextMessageDto
TextMessages [get, set]
 Textmessages in observablecollection. More...
 
PersonalInformationDto PersonalInfo [get, set]
 Sets and gets personal information as PersonalInformationDto that includes name, address and list of phonenumbers and all as strings. More...
 
priorities Priority [get, set]
 Sets and gets priority of this assignment. When value is set, also sets background and content. More...
 
String Guid [get, set]
 Sets and gets guid. More...
 
DateTime Time [get, set]
 Sets and gets time. This time is when assignment is taken in. When setted, also sets background color and content. More...
 
bool NoSound [get, set]
 Gets and sets NoSound. More...
 
States State [get, set]
 Sets value and also takes care of background color and listboxitem content. Also if state is finalized removes pushpins. More...
 
bool IsHandler [get, set]
 Sets and gets IsHandler More...
 
LocationInformationDto Location [get, set]
 Sets and gets location as LocationInformationDto that contains location, accuracy in meters and time. When this is setted, sets content also. More...
 
double LocationAccuracyMeters [get, set]
 Sets and gets locationAccuracyMeters More...
 
DateTimeOffset LocationAcquisitionTime [get, set]
 Sets and gets LocationAcquisitionTime. More...
 
ObservableCollection< Pushpin > Pushpins [get, set]
 Sets and gets Pushpins as ObservableCollention. If assignemnts state is finalized, it won't set pushpins. Also adds pushpins in index 1 background to light green. More...
 
String StreetName [get, set]
 Sets and gets streetname. When setted, also sets content and invokes NotifyPropertyChanged. More...
 
MobileDeviceInformationDto DeviceInfo [get, set]
 Sets and gets DeviceInfo. More...
 

Events

PropertyChangedEventHandler PropertyChanged
 

Private Member Functions

void NotifyPropertyChanged (String info)
 Notify that property is changed. This will update bindings. More...
 
void SetContent ()
 Sets different content for listboxitem depending on what information is already set. For location uses format 00.0000 that shows 4 decimals of latitude and longitude. Also converts other text to right form like state and priority. More...
 
void SetBackgroundColor ()
 Depending on state and priority, sets backgroundcolor for listboxitem and for pushpin. More...
 
void getStreetNameFromLocationAsync ()
 Updates street name according to location with Bing Maps API Function makes asynchronous call to Bing Maps APi rest service which returns information about given location More...
 
void DownloadStringCallback (Object sender, DownloadStringCompletedEventArgs e)
 Callback function for Webclient Download completed event. This function sets Streetname according to location. More...
 

Private Attributes

WebClient WebClientForLocationQuery
 
String emergencyType
 
ObservableCollection
< TextMessageDto
textMessages = new ObservableCollection<TextMessageDto>()
 
PersonalInformationDto personalInfo
 
priorities priority
 
String guid = ""
 
DateTime time
 
bool noSound
 
States state
 
List< Brush > stateBrushes
 
LocationInformationDto location
 
double locationAccuracyMeters
 
DateTimeOffset locationAcquisitionTime
 
ObservableCollection< Pushpin > pushpins = new ObservableCollection<Pushpin>()
 
String streetName
 
MobileDeviceInformationDto deviceInfo
 

Detailed Description

Assigment listboxitem that contains many properties like handlers, location, time, state, priority, pushpins, assigment info and street name. It sets content and background depending state and priority and if there is location available.

<author>Atte Söderlund</author>

Member Enumeration Documentation

Not urgent and urgent enums. NotUrgent is 0 and Urgent is 1 as ints.

Enumerator
NotUrgent 
Urgent 

Enum of states. New = 0,...,Hold=4.

Enumerator
New 
InProgress 
InTransfer 
Finalized 
Hold 

Constructor & Destructor Documentation

Hake_WPF.Assignment.Assignment ( String  guid,
DateTime  time,
priorities  priority,
States  state,
LocationInformationDto  location 
)

Initializes Assigment: sets state, priority, time, location, assimentinfo, sets backgroundcolor and content. These are essential for assignment

Parameters
timeAssigment connection time
priorityAssigments priority from Assigment.Priorities
stateAssigments state from Assigment.States
locationAssigments location
Hake_WPF.Assignment.Assignment ( String  guid,
DateTime  time,
priorities  priority,
States  state 
)

Constructor without location.

Parameters
timeAssigment connection time
priorityAssigments priority from Assigment.Priorities
stateAssigments state from Assigment.States

Member Function Documentation

void Hake_WPF.Assignment.DownloadStringCallback ( Object  sender,
DownloadStringCompletedEventArgs  e 
)
private

Callback function for Webclient Download completed event. This function sets Streetname according to location.

<author>Niko Mononen</author>

Parameters
senderCallback sender
eDownload completed event arguments
void Hake_WPF.Assignment.getStreetNameFromLocationAsync ( )
private

Updates street name according to location with Bing Maps API Function makes asynchronous call to Bing Maps APi rest service which returns information about given location

<author>Niko Mononen</author>

void Hake_WPF.Assignment.NotifyPropertyChanged ( String  info)
private

Notify that property is changed. This will update bindings.

Parameters
infoInfo string
void Hake_WPF.Assignment.SetBackgroundColor ( )
private

Depending on state and priority, sets backgroundcolor for listboxitem and for pushpin.

void Hake_WPF.Assignment.SetContent ( )
private

Sets different content for listboxitem depending on what information is already set. For location uses format 00.0000 that shows 4 decimals of latitude and longitude. Also converts other text to right form like state and priority.

Member Data Documentation

MobileDeviceInformationDto Hake_WPF.Assignment.deviceInfo
private
String Hake_WPF.Assignment.emergencyType
private
String Hake_WPF.Assignment.guid = ""
private
readonly DependencyProperty Hake_WPF.Assignment.IsHandlerProperty
static
Initial value:
=
DependencyProperty.Register("IsHandler", typeof(bool), typeof(MainWindow), new PropertyMetadata(false))

DependencyProperty for ishandler.

LocationInformationDto Hake_WPF.Assignment.location
private
double Hake_WPF.Assignment.locationAccuracyMeters
private
DateTimeOffset Hake_WPF.Assignment.locationAcquisitionTime
private
bool Hake_WPF.Assignment.noSound
private
PersonalInformationDto Hake_WPF.Assignment.personalInfo
private
priorities Hake_WPF.Assignment.priority
private
ObservableCollection<Pushpin> Hake_WPF.Assignment.pushpins = new ObservableCollection<Pushpin>()
private
States Hake_WPF.Assignment.state
private
List<Brush> Hake_WPF.Assignment.stateBrushes
private
Initial value:
= new List<Brush>
{
new SolidColorBrush(new Color() { B = 48, R = 230, G = 48, A = 255 }),
new SolidColorBrush(new Color() { B = 235, R = 89, G = 63, A = 255 }),
new SolidColorBrush(new Color() { B = 76, R = 252, G = 238, A = 255 }),
new SolidColorBrush(new Color() { B = 131, R = 133, G = 132, A = 255 }),
new SolidColorBrush(new Color() { B = 79, R = 247, G = 205, A = 255 })}
String Hake_WPF.Assignment.streetName
private
ObservableCollection<TextMessageDto> Hake_WPF.Assignment.textMessages = new ObservableCollection<TextMessageDto>()
private
DateTime Hake_WPF.Assignment.time
private
WebClient Hake_WPF.Assignment.WebClientForLocationQuery
private

Property Documentation

MobileDeviceInformationDto Hake_WPF.Assignment.DeviceInfo
getset

Sets and gets DeviceInfo.

String Hake_WPF.Assignment.EmergencyType
getset

Sets and getsEmergency type can be any string that is short description about emergency.

String Hake_WPF.Assignment.Guid
getset

Sets and gets guid.

bool Hake_WPF.Assignment.IsHandler
getset

Sets and gets IsHandler

LocationInformationDto Hake_WPF.Assignment.Location
getset

Sets and gets location as LocationInformationDto that contains location, accuracy in meters and time. When this is setted, sets content also.

double Hake_WPF.Assignment.LocationAccuracyMeters
getset

Sets and gets locationAccuracyMeters

DateTimeOffset Hake_WPF.Assignment.LocationAcquisitionTime
getset

Sets and gets LocationAcquisitionTime.

bool Hake_WPF.Assignment.NoSound
getset

Gets and sets NoSound.

PersonalInformationDto Hake_WPF.Assignment.PersonalInfo
getset

Sets and gets personal information as PersonalInformationDto that includes name, address and list of phonenumbers and all as strings.

priorities Hake_WPF.Assignment.Priority
getset

Sets and gets priority of this assignment. When value is set, also sets background and content.

ObservableCollection<Pushpin> Hake_WPF.Assignment.Pushpins
getset

Sets and gets Pushpins as ObservableCollention. If assignemnts state is finalized, it won't set pushpins. Also adds pushpins in index 1 background to light green.

States Hake_WPF.Assignment.State
getset

Sets value and also takes care of background color and listboxitem content. Also if state is finalized removes pushpins.

String Hake_WPF.Assignment.StreetName
getset

Sets and gets streetname. When setted, also sets content and invokes NotifyPropertyChanged.

ObservableCollection<TextMessageDto> Hake_WPF.Assignment.TextMessages
getset

Textmessages in observablecollection.

DateTime Hake_WPF.Assignment.Time
getset

Sets and gets time. This time is when assignment is taken in. When setted, also sets background color and content.

Event Documentation

PropertyChangedEventHandler Hake_WPF.Assignment.PropertyChanged

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