![]() |
Halyri - Mobiili
0.9
|
Connected view is when connection to emergency exchange have been establish and processed by emergency exchange handler. If NoSound is enabled by user, this view opens up with chat. Emergency exchange can open map for user to pinpoint his location on map and send the location to emergency exchange. Handler can also open video recording. By taping cant talk enables chat also. More...
Public Member Functions | |
Connected () | |
Constructor that takes connection from that last view saved to phoneapplicationservice with key "connection". Then just adds all eventhandlers for it. Also starts xnadispatchtimer and ready up media transfering. More... | |
void | InitializeComponent () |
InitializeComponent More... | |
void | InitializeComponent () |
InitializeComponent More... | |
void | InitializeComponent () |
InitializeComponent More... | |
void | InitializeComponent () |
InitializeComponent More... | |
Protected Member Functions | |
override void | OnBackKeyPress (System.ComponentModel.CancelEventArgs e) |
Adds messagebox stating that user is leaving and is he sure. User can cancel backkeypressed here. More... | |
override void | OnNavigatingFrom (NavigatingCancelEventArgs e) |
Stops capturing and sending data. More... | |
override void | OnNavigatedTo (NavigationEventArgs e) |
Checks up if there is nosound set in previous view so UI can add chat for user. More... | |
Private Member Functions | |
void | connection_MeasurementStopRequestReceivedEvent (ServiceReference1.MeasurementInstrumentDto instrument) |
Handles incoming measurement stop request. Stops providing measurement data from the active MeasurementManager instance. Currently the provided instrument instance is not checked, as only one concurrent measurement can be on progress. More... | |
void | connection_MeasurementStartRequestReceivedEvent (ServiceReference1.MeasurementInstrumentDto instrument) |
Handles incoming measurement start request. Starts provividing measurment data from the only data provider currently available. More... | |
void | measurementManager_MeasurementDataAvailableEvent (MeasurementInstrumentDto instrument, byte[] data) |
Handles incoming measurement data provided by the active MeasurementManager instance. Publishes the data to the server through the Connection. More... | |
void | connection_MeasurementInstrumentListRequestReceivedEvent () |
Handles incoming request for a new list of avalable measurement instrument. Uploads the list provided by the MeasurementInstrumentManager. More... | |
void | connection_UdpMediaDataReceivedEvent (Object sender, MediaPacket media) |
Moves media to mediaReveiverManager. More... | |
void | connection_InProcessEvent () |
Invokes ui thread that connection is now in process. More... | |
void | InProcessingUiThread () |
Adds infotext and phone icon to screen. More... | |
void | MediaConfigurationUpdated (object sender, EventArgs e, MediaConfigurationDto config) |
Handles media configuration updated events generated by the active AudioVideoTransmitManager. If audio or video is enabled in the configuration and it is not currently enabled by the UI, relevant devices are enabled through ActivateCamera and ActivateAudio methods. If camera is enabled, but its state is disabled in the configuration, it is disabled by DisableCamera method. More... | |
async void | ActivateCamera () |
Initializes a AudioVideoCaptureDevice using the rear camera for video only capture. Fills the Rectangle VideoRectangle defined on the MainPage.xaml with a video brush using the initialized AudioVideoCaptureDevice as it's source. Creates a new PreviewImageCapturer that uses the AudioVideoCaptureDevice to capture raw images from the preview buffer. Registers an event listener listening for new compressed JPGs from the PreviewImageCapturer. More... | |
void | DisableCamera () |
Disables camera More... | |
void | DisableAudio () |
Disables audio More... | |
void | ActivateAudio () |
Gets the default XNA microphone in the system. More... | |
void | enableXnaDispatchTimer () |
Starts a DisptchTimer to create FrameworkDispatcher.Update calls required by the XNA framework. More... | |
void | disableXnaDispatchTimer () |
Stops the DispatchTimer FrameworkDispatcher.Update calls required by the XNA framework. More... | |
void | connection_TextMessageReceivedEvent (string message) |
Invokes UI thread to update new message. More... | |
void | TextMessageReceived (Connected connected, string message) |
Handles text message adding to messagebox when one is received from emergency exchange. Message contains who it is from and timestamp. More... | |
void | connection_CloseMapRequestEvent () |
Invokes UI thread to close map. More... | |
void | CloseMapRequest () |
Switchs mapgrid off. More... | |
void | connection_OpenMapRequestEvent () |
Invokes UI thread to open map. More... | |
void | OpenMapRequest () |
Turns mapgrid on. More... | |
void | connection_ProcessedEvent () |
Invokes UI thread that connection is processed. More... | |
void | ConnectionProcessedUiThread () |
At the stat if user is not in connected.xaml, returns. Shows messagebox to inform that connection is closed and then navigates back to mainpage and removes backentry so it wont come back to this view from back button. More... | |
void | UpdateLocationThread () |
Updates location and starts tracking location so it will update movement. More... | |
void | SendTextMessageButton_Click (object sender, RoutedEventArgs e) |
Takes chatinput, makes textblock in chat, sends message to server and finaly clears inputbox. More... | |
void | NoSoundTextBox_Tap (object sender, System.Windows.Input.GestureEventArgs e) |
Switchs checkbox value. More... | |
void | NoSoundCheckBox_Checked (object sender, RoutedEventArgs e) |
Changes canMakeNoiseBool value and toggle it in server. Also adds textmessageReceived handler. So basicly mobile cannot receive messages if chat is not vissible. More... | |
void | NoSoundCheckBox_Unchecked (object sender, RoutedEventArgs e) |
Changes canMakeNoiseBool value and toggle it in server. Removes textmessage received. So basicly mobile cannot receive messages if chat is not vissible. More... | |
void | Map_Tap (object sender, System.Windows.Input.GestureEventArgs e) |
Gets tapped point as goordinates, adds pushpin to that location and sends the location to server. User is able to add only one pushpin, last one will be removed. More... | |
void | SendLocationButton_Click (object sender, RoutedEventArgs e) |
Sends location to server as user specified if location is set from map by user. More... | |
Private Attributes | |
Connection | connection |
bool | noSound = false |
GeoCoordinate | Coordinates |
AudioVideoCaptureDevice | audioVideoCaptureDevice |
Microphone | microphone |
DispatcherTimer | xnaLoopDispatchTimer |
AudioVideoTransmitManager | mediaTransmitManager |
AudioVideoPlaybackManager | mediaReceiveManager |
MeasurementInstrumentManager | measurementInstrumentManager |
MeasurementManager | measurementManager |
bool | videoDeviceEnabled |
bool | audioDeviceEnabled |
bool | videoDeviceBeingEnabled |
bool | audioDeviceBeingEnabled |
ManualResetEvent | CaptureDevicesInitializedEvent = new ManualResetEvent(false) |
Settings | settings = new Settings() |
bool | _contentLoaded |
Connected view is when connection to emergency exchange have been establish and processed by emergency exchange handler. If NoSound is enabled by user, this view opens up with chat. Emergency exchange can open map for user to pinpoint his location on map and send the location to emergency exchange. Handler can also open video recording. By taping cant talk enables chat also.
Halyri.Connected.Connected | ( | ) |
Constructor that takes connection from that last view saved to phoneapplicationservice with key "connection". Then just adds all eventhandlers for it. Also starts xnadispatchtimer and ready up media transfering.
|
private |
Gets the default XNA microphone in the system.
<author>Veli-Mikko Puupponen</author>
|
private |
Initializes a AudioVideoCaptureDevice using the rear camera for video only capture. Fills the Rectangle VideoRectangle defined on the MainPage.xaml with a video brush using the initialized AudioVideoCaptureDevice as it's source. Creates a new PreviewImageCapturer that uses the AudioVideoCaptureDevice to capture raw images from the preview buffer. Registers an event listener listening for new compressed JPGs from the PreviewImageCapturer.
<author>Veli-Mikko Puupponen</author>
|
private |
Switchs mapgrid off.
|
private |
Invokes UI thread to close map.
|
private |
Invokes ui thread that connection is now in process.
|
private |
Handles incoming request for a new list of avalable measurement instrument. Uploads the list provided by the MeasurementInstrumentManager.
<author>Veli-Mikko Puupponen</author>
|
private |
Handles incoming measurement start request. Starts provividing measurment data from the only data provider currently available.
<author>Veli-Mikko Puupponen</author>
instrument | Instrument |
|
private |
Handles incoming measurement stop request. Stops providing measurement data from the active MeasurementManager instance. Currently the provided instrument instance is not checked, as only one concurrent measurement can be on progress.
<author>Veli-Mikko Puupponen</author>
instrument | Inastrument to stop providing data from |
|
private |
Invokes UI thread to open map.
|
private |
Invokes UI thread that connection is processed.
|
private |
Invokes UI thread to update new message.
message | Received message |
|
private |
Moves media to mediaReveiverManager.
<author>Veli-Mikko Puupponen</author>
|
private |
At the stat if user is not in connected.xaml, returns. Shows messagebox to inform that connection is closed and then navigates back to mainpage and removes backentry so it wont come back to this view from back button.
|
private |
Disables audio
<author>Veli-Mikko Puupponen</author>
|
private |
Disables camera
<author>Veli-Mikko Puupponen</author>
|
private |
Stops the DispatchTimer FrameworkDispatcher.Update calls required by the XNA framework.
<author>Veli-Mikko Puupponen</author>
|
private |
Starts a DisptchTimer to create FrameworkDispatcher.Update calls required by the XNA framework.
<author>Veli-Mikko Puupponen</author>
void Halyri.Connected.InitializeComponent | ( | ) |
InitializeComponent
void Halyri.Connected.InitializeComponent | ( | ) |
InitializeComponent
void Halyri.Connected.InitializeComponent | ( | ) |
InitializeComponent
void Halyri.Connected.InitializeComponent | ( | ) |
InitializeComponent
|
private |
Adds infotext and phone icon to screen.
|
private |
Gets tapped point as goordinates, adds pushpin to that location and sends the location to server. User is able to add only one pushpin, last one will be removed.
|
private |
Handles incoming measurement data provided by the active MeasurementManager instance. Publishes the data to the server through the Connection.
<author>Veli-Mikko Puupponen</author>
instrument | Instrument providing the data |
data | Raw instrument measurement data |
|
private |
Handles media configuration updated events generated by the active AudioVideoTransmitManager. If audio or video is enabled in the configuration and it is not currently enabled by the UI, relevant devices are enabled through ActivateCamera and ActivateAudio methods. If camera is enabled, but its state is disabled in the configuration, it is disabled by DisableCamera method.
<author>Veli-Mikko Puupponen</author>
sender | Sending object |
e | EventArgs, not used |
config | Media configuration |
|
private |
Changes canMakeNoiseBool value and toggle it in server. Also adds textmessageReceived handler. So basicly mobile cannot receive messages if chat is not vissible.
|
private |
Changes canMakeNoiseBool value and toggle it in server. Removes textmessage received. So basicly mobile cannot receive messages if chat is not vissible.
|
private |
Switchs checkbox value.
|
protected |
Adds messagebox stating that user is leaving and is he sure. User can cancel backkeypressed here.
|
protected |
Checks up if there is nosound set in previous view so UI can add chat for user.
|
protected |
Stops capturing and sending data.
|
private |
Turns mapgrid on.
|
private |
Sends location to server as user specified if location is set from map by user.
|
private |
Takes chatinput, makes textblock in chat, sends message to server and finaly clears inputbox.
|
private |
Handles text message adding to messagebox when one is received from emergency exchange. Message contains who it is from and timestamp.
message | Received message |
|
private |
Updates location and starts tracking location so it will update movement.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |