Halyri - Mobiili  0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
Halyri.MainPage Class Reference

Applications main view. Here is information about application and user can navigate to other pages like settings and urgen and not urgent views. When this page is loaded it sets the language to default culture if not set in settings different. More...

Inheritance diagram for Halyri.MainPage:

Public Member Functions

 MainPage ()
 Sets language and builds localized application bar. More...
 
void InitializeComponent ()
 InitializeComponent More...
 
void InitializeComponent ()
 InitializeComponent More...
 
void InitializeComponent ()
 InitializeComponent More...
 
void InitializeComponent ()
 InitializeComponent More...
 

Protected Member Functions

override void OnNavigatedTo (NavigationEventArgs e)
 Loads data for the ViewModel Items More...
 
override void OnBackKeyPress (System.ComponentModel.CancelEventArgs e)
 Asks user if he is sure to leave the app. User can cancel backkeypressed. More...
 

Private Member Functions

void SetLanguage ()
 Sets apps language from settings if stored and if not takes phones language as long as it is finnish or english. Default language is english. More...
 
void BuildLocalizedApplicationBar ()
 Makes localized appbar that contains aplicationbariconbuttons and applicationbarmenuitems. Have to do dynamicaly because of localization. There is button with icon for settings and videos, but only text link for practice mode. More...
 
void Button_emergency_Click (object sender, RoutedEventArgs e)
 When user clicks Emergency button this locates user and then opens Urgent.xaml. More...
 
void Not_Urgent_Click (object sender, RoutedEventArgs e)
 Click navigates to NotUrgent.xaml. More...
 
void ApplicationBarIconButtons_Click (object sender, EventArgs e)
 Defines what button is tapped to navigate to right pivot. Uses ?tofirstaid parameter in navigation to get second pivot in settings pivot view. More...
 

Private Attributes

List< CultureInfo > CultureInfos
 
bool _contentLoaded
 

Detailed Description

Applications main view. Here is information about application and user can navigate to other pages like settings and urgen and not urgent views. When this page is loaded it sets the language to default culture if not set in settings different.

Constructor & Destructor Documentation

Halyri.MainPage.MainPage ( )

Sets language and builds localized application bar.

Member Function Documentation

void Halyri.MainPage.ApplicationBarIconButtons_Click ( object  sender,
EventArgs  e 
)
private

Defines what button is tapped to navigate to right pivot. Uses ?tofirstaid parameter in navigation to get second pivot in settings pivot view.

void Halyri.MainPage.BuildLocalizedApplicationBar ( )
private

Makes localized appbar that contains aplicationbariconbuttons and applicationbarmenuitems. Have to do dynamicaly because of localization. There is button with icon for settings and videos, but only text link for practice mode.

void Halyri.MainPage.Button_emergency_Click ( object  sender,
RoutedEventArgs  e 
)
private

When user clicks Emergency button this locates user and then opens Urgent.xaml.

void Halyri.MainPage.InitializeComponent ( )

InitializeComponent

void Halyri.MainPage.InitializeComponent ( )

InitializeComponent

void Halyri.MainPage.InitializeComponent ( )

InitializeComponent

void Halyri.MainPage.InitializeComponent ( )

InitializeComponent

void Halyri.MainPage.Not_Urgent_Click ( object  sender,
RoutedEventArgs  e 
)
private

Click navigates to NotUrgent.xaml.

override void Halyri.MainPage.OnBackKeyPress ( System.ComponentModel.CancelEventArgs  e)
protected

Asks user if he is sure to leave the app. User can cancel backkeypressed.

override void Halyri.MainPage.OnNavigatedTo ( NavigationEventArgs  e)
protected

Loads data for the ViewModel Items

void Halyri.MainPage.SetLanguage ( )
private

Sets apps language from settings if stored and if not takes phones language as long as it is finnish or english. Default language is english.

Member Data Documentation

bool Halyri.MainPage._contentLoaded
private
List<CultureInfo> Halyri.MainPage.CultureInfos
private
Initial value:
= new List<CultureInfo>
{
CultureInfo.InvariantCulture,
new CultureInfo("en-US"), new CultureInfo("fi-FI")
}

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