Files
win8phoneApp/CampusAppWP8/CampusAppWP8/Pages/Setting/AppSettingPage.xaml.cs
2013-08-27 10:13:59 +02:00

41 lines
1.4 KiB
C#

//-----------------------------------------------------------------------
// <copyright file="AppSettingPage.xaml.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>12.08.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Pages.Setting
{
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
/// <summary>
/// Class for the AppSettingPage
/// </summary>
public partial class AppSettingPage : PhoneApplicationPage
{
/// <summary>
/// Initializes a new instance of the <see cref="AppSettingPage" /> class.
/// </summary>
public AppSettingPage()
{
this.InitializeComponent();
GeoWatchToggle.IsChecked = Settings.AppSetting.GeoWatchEnable;
OnlyWiFiToggle.IsChecked = Settings.AppSetting.OnlyWifi;
}
/// <summary>
/// Override the OnNavigatedFrom method
/// </summary>
/// <param name="e">Arguments of navigation</param>
protected override void OnNavigatedFrom(NavigationEventArgs e)
{
if (NavigationMode.Back == e.NavigationMode)
{
Settings.AppSetting.GeoWatchEnable = GeoWatchToggle.IsChecked.Value;
Settings.AppSetting.OnlyWifi = OnlyWiFiToggle.IsChecked.Value;
}
}
}
}