![]() |
Halyri - Häke
0.9
|
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...
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 |
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>
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
time | Assigment connection time |
priority | Assigments priority from Assigment.Priorities |
state | Assigments state from Assigment.States |
location | Assigments location |
Hake_WPF.Assignment.Assignment | ( | String | guid, |
DateTime | time, | ||
priorities | priority, | ||
States | state | ||
) |
Constructor without location.
time | Assigment connection time |
priority | Assigments priority from Assigment.Priorities |
state | Assigments state from Assigment.States |
|
private |
Callback function for Webclient Download completed event. This function sets Streetname according to location.
<author>Niko Mononen</author>
sender | Callback sender |
e | Download completed event arguments |
|
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>
|
private |
Notify that property is changed. This will update bindings.
info | Info string |
|
private |
Depending on state and priority, sets backgroundcolor for listboxitem and for pushpin.
|
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.
|
private |
|
private |
|
private |
|
static |
DependencyProperty for ishandler.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
getset |
Sets and gets DeviceInfo.
|
getset |
Sets and getsEmergency type can be any string that is short description about emergency.
|
getset |
Sets and gets guid.
|
getset |
Sets and gets IsHandler
|
getset |
Sets and gets location as LocationInformationDto that contains location, accuracy in meters and time. When this is setted, sets content also.
|
getset |
Sets and gets locationAccuracyMeters
|
getset |
Sets and gets LocationAcquisitionTime.
|
getset |
Gets and sets NoSound.
|
getset |
Sets and gets personal information as PersonalInformationDto that includes name, address and list of phonenumbers and all as strings.
|
getset |
Sets and gets priority of this assignment. When value is set, also sets background and content.
|
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.
|
getset |
Sets value and also takes care of background color and listboxitem content. Also if state is finalized removes pushpins.
|
getset |
Sets and gets streetname. When setted, also sets content and invokes NotifyPropertyChanged.
|
getset |
Textmessages in observablecollection.
|
getset |
Sets and gets time. This time is when assignment is taken in. When setted, also sets background color and content.
PropertyChangedEventHandler Hake_WPF.Assignment.PropertyChanged |