Merge branch 'release/#169#150' into develmaster
This commit is contained in:
@@ -140,6 +140,15 @@ namespace CampusAppWP8
|
||||
/// </summary>
|
||||
private void LoadSettings()
|
||||
{
|
||||
if (Debugger.IsAttached)
|
||||
{
|
||||
Settings.AppSetting.DevMode = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Settings.AppSetting.DevMode = false;
|
||||
}
|
||||
|
||||
this.UserSettingsLoaded();
|
||||
if (Settings.AppSetting.GeoWatchEnable)
|
||||
{
|
||||
|
||||
@@ -34,6 +34,14 @@ namespace CampusAppWP8.Feed.Mensa
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>Gets or sets the title.</summary>
|
||||
/// <value>The title.</value>
|
||||
public string Title { get; protected set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Method
|
||||
|
||||
#region public
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CampusAppWP8.Feed.Mensa
|
||||
public MensaFeedCBMain()
|
||||
: base(Constants.FileMensa_Shedule_CBMain, Constants.UrlMensa_Week_CBMain)
|
||||
{
|
||||
this.Title = AppResources.Campus_CBMain;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CampusAppWP8.Feed.Mensa
|
||||
public MensaFeedCBNorth()
|
||||
: base(Constants.FileMensa_Shedule_CBNorth, Constants.UrlMensa_Week_CBNorth)
|
||||
{
|
||||
this.Title = AppResources.Campus_CBNorth;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CampusAppWP8.Feed.Mensa
|
||||
public MensaFeedCBSouth()
|
||||
: base(Constants.FileMensa_Shedule_CBSouth, Constants.UrlMensa_Week_CBSouth)
|
||||
{
|
||||
this.Title = AppResources.Campus_CBSouth;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CampusAppWP8.Feed.Mensa
|
||||
public MensaFeedSBFMain()
|
||||
: base(Constants.FileMensa_Shedule_SBFMain, Constants.UrlMensa_Week_SBFMain)
|
||||
{
|
||||
this.Title = AppResources.Campus_SFBMain;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,5 +46,20 @@ namespace CampusAppWP8.Model.Setting
|
||||
App.SaveToAppState<bool>(Constants.AppSetting_InitApp, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets a value indicating whether the development mode.</summary>
|
||||
/// <value>true if development mode, false if not.</value>
|
||||
public bool DevMode
|
||||
{
|
||||
get
|
||||
{
|
||||
return App.LoadFromAppState<bool>(Constants.AppSetting_DevMode);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
App.SaveToAppState<bool>(Constants.AppSetting_DevMode, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ namespace CampusAppWP8.Model.Utility
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DegreeListPickerItemListModel" /> class.
|
||||
/// Initializes a new instance of the <see cref="CampusListPickerItemListModel" /> class.
|
||||
/// </summary>
|
||||
public CampusListPickerItemListModel()
|
||||
: base()
|
||||
|
||||
@@ -59,8 +59,13 @@
|
||||
<!-- <Image Source="/Assets/AlignmentGrid.png" VerticalAlignment="Top" Height="800" Width="480" Margin="0,-32,0,0" Grid.Row="0" Grid.RowSpan="2" IsHitTestVisible="False" /> -->
|
||||
</Grid>
|
||||
<phone:PhoneApplicationPage.ApplicationBar>
|
||||
<shell:ApplicationBar IsVisible="True" IsMenuEnabled="False" Mode="Minimized" >
|
||||
<shell:ApplicationBar IsVisible="True" IsMenuEnabled="True" Mode="Minimized" >
|
||||
<lui:UpdateButtonAppBar Click="MensaForceUpdate_Click"/>
|
||||
<shell:ApplicationBar.MenuItems>
|
||||
<shell:ApplicationBarMenuItem Text="Campus1" Click="ApplicationBarMenuItem_Click"/>
|
||||
<shell:ApplicationBarMenuItem Text="Campus2" Click="ApplicationBarMenuItem2_Click"/>
|
||||
<shell:ApplicationBarMenuItem Text="Campus3" Click="ApplicationBarMenuItem3_Click"/>
|
||||
</shell:ApplicationBar.MenuItems>
|
||||
</shell:ApplicationBar>
|
||||
</phone:PhoneApplicationPage.ApplicationBar>
|
||||
</phone:PhoneApplicationPage>
|
||||
@@ -8,6 +8,7 @@
|
||||
namespace CampusAppWP8.Pages.Mensa
|
||||
{
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Windows;
|
||||
using System.Windows.Navigation;
|
||||
using CampusAppWP8.Feed.GeoApi;
|
||||
@@ -15,7 +16,7 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWP8.Utility.Lui.MessageBoxes;
|
||||
using Microsoft.Phone.Controls;
|
||||
using System.Threading;
|
||||
using Microsoft.Phone.Shell;
|
||||
|
||||
/// <summary>
|
||||
/// Class for the MensaPage
|
||||
@@ -64,6 +65,24 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
public MensaPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
ApplicationBarMenuItem menuItem1 = ApplicationBar.MenuItems[0] as ApplicationBarMenuItem;
|
||||
ApplicationBarMenuItem menuItem2 = ApplicationBar.MenuItems[1] as ApplicationBarMenuItem;
|
||||
ApplicationBarMenuItem menuItem3 = ApplicationBar.MenuItems[2] as ApplicationBarMenuItem;
|
||||
|
||||
if (menuItem1 != null)
|
||||
{
|
||||
menuItem1.Text = AppResources.Campus_CBMain;
|
||||
}
|
||||
|
||||
if (menuItem2 != null)
|
||||
{
|
||||
menuItem2.Text = AppResources.Campus_CBSouth;
|
||||
}
|
||||
|
||||
if (menuItem3 != null)
|
||||
{
|
||||
menuItem3.Text = AppResources.Campus_SFBMain;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -89,10 +108,14 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
/// <param name="e">Arguments of navigation</param>
|
||||
protected override void OnNavigatedFrom(NavigationEventArgs e)
|
||||
{
|
||||
this.feed.SaveData(this.refreshed);
|
||||
if (this.feed != null)
|
||||
{
|
||||
this.feed.SaveData(this.refreshed);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region private
|
||||
|
||||
/// <summary>
|
||||
@@ -115,8 +138,11 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
/// </summary>
|
||||
private void SpsApiIsFail()
|
||||
{
|
||||
MessageBoxResult result = MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorCampusLoc);
|
||||
this.InitializeFeed(Settings.UserProfil.DefaultCampus);
|
||||
if (this.Dispatcher != null)
|
||||
{
|
||||
this.Dispatcher.BeginInvoke(new Action(() => MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorCampusLoc)));
|
||||
this.Dispatcher.BeginInvoke(new Action(() => this.InitializeFeed(Settings.UserProfil.DefaultCampus)));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -161,7 +187,7 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
{
|
||||
if (Settings.AppSetting.GeoWatchEnable)
|
||||
{
|
||||
Thread thread = new Thread(new ThreadStart( this.DeterminCurrentCampusAndLoadFeed));
|
||||
Thread thread = new Thread(new ThreadStart(this.DeterminCurrentCampusAndLoadFeed));
|
||||
thread.Start();
|
||||
}
|
||||
else
|
||||
@@ -202,6 +228,7 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
/// </summary>
|
||||
private void SetupMensaPivot()
|
||||
{
|
||||
this.MensaPivot.Title = AppResources.MensaApp_Title + " (" + this.feed.Title + ")";
|
||||
this.MensaPivot.ItemsSource = this.feed.Model.Menus;
|
||||
this.MensaPivot.SelectedIndex = this.selectedIndex;
|
||||
}
|
||||
@@ -252,6 +279,36 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
this.refreshed = true;
|
||||
}
|
||||
|
||||
/// <summary>Event handler. Called by ApplicationBarMenuItem for click events.</summary>
|
||||
/// <remarks>Stubbfel, 26.08.2013.</remarks>
|
||||
/// <param name="sender">button object.</param>
|
||||
/// <param name="e"> Event information.</param>
|
||||
private void ApplicationBarMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.ProgressBar.Visibility = System.Windows.Visibility.Visible;
|
||||
this.InitializeFeed(CampusAppWP8.Model.Setting.UserProfilModel.Campus.CB_MAIN);
|
||||
}
|
||||
|
||||
/// <summary>Event handler. Called by ApplicationBarMenuItem2 for click events.</summary>
|
||||
/// <remarks>Stubbfel, 26.08.2013.</remarks>
|
||||
/// <param name="sender">button object.</param>
|
||||
/// <param name="e"> Event information.</param>
|
||||
private void ApplicationBarMenuItem2_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.ProgressBar.Visibility = System.Windows.Visibility.Visible;
|
||||
this.InitializeFeed(CampusAppWP8.Model.Setting.UserProfilModel.Campus.CB_SOUTH);
|
||||
}
|
||||
|
||||
/// <summary>Event handler. Called by ApplicationBarMenuItem3 for click events.</summary>
|
||||
/// <remarks>Stubbfel, 26.08.2013.</remarks>
|
||||
/// <param name="sender">button object.</param>
|
||||
/// <param name="e"> Event information.</param>
|
||||
private void ApplicationBarMenuItem3_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.ProgressBar.Visibility = System.Windows.Visibility.Visible;
|
||||
this.InitializeFeed(CampusAppWP8.Model.Setting.UserProfilModel.Campus.SFB_MAIN);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -44,14 +44,22 @@ namespace CampusAppWP8.Pages
|
||||
menuItem2.Text = AppResources.Setting_ApplAppBarTitle;
|
||||
}
|
||||
|
||||
if (menuItem3 != null)
|
||||
if (Settings.AppSetting.DevMode)
|
||||
{
|
||||
menuItem3.Text = "Nfc";
|
||||
}
|
||||
if (menuItem3 != null)
|
||||
{
|
||||
menuItem3.Text = "Nfc";
|
||||
}
|
||||
|
||||
if (menuItem4 != null)
|
||||
if (menuItem4 != null)
|
||||
{
|
||||
menuItem4.Text = "QR-Reader";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
menuItem4.Text = "QR-Reader";
|
||||
ApplicationBar.MenuItems.RemoveAt(ApplicationBar.MenuItems.Count - 1);
|
||||
ApplicationBar.MenuItems.RemoveAt(ApplicationBar.MenuItems.Count - 1);
|
||||
}
|
||||
|
||||
if (!Settings.AppSetting.InitApp)
|
||||
|
||||
@@ -60,6 +60,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die DevMode ähnelt.
|
||||
/// </summary>
|
||||
public static string AppSetting_DevMode {
|
||||
get {
|
||||
return ResourceManager.GetString("AppSetting_DevMode", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die AppSetting.GeoWatchEnable ähnelt.
|
||||
/// </summary>
|
||||
@@ -790,16 +799,7 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die http://www.tu-cottbus.de/campusapp-data/Studentenwerk/index.php?mensa=CottbusBTU&v=1 ähnelt.
|
||||
/// </summary>
|
||||
public static string UrlMensa_Week {
|
||||
get {
|
||||
return ResourceManager.GetString("UrlMensa_Week", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die http://www.tu-cottbus.de/campusapp-data/Studentenwerk/index.php?mensa=CottbusBTU&v=1 ähnelt.
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die http://www.studentenwerk-frankfurt.de/2011/ClassPackage/App_IKMZ_BTU/index.php?mensa=CottbusBTU&v=1 ähnelt.
|
||||
/// </summary>
|
||||
public static string UrlMensa_Week_CBMain {
|
||||
get {
|
||||
@@ -808,7 +808,7 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die http://www.tu-cottbus.de/campusapp-data/Studentenwerk/index.php?mensa=CottbusBTU&v=1 ähnelt.
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die http://www.studentenwerk-frankfurt.de/2011/ClassPackage/App_IKMZ_BTU/index.php?mensa=CottbusBTU&v=1 ähnelt.
|
||||
/// </summary>
|
||||
public static string UrlMensa_Week_CBNorth {
|
||||
get {
|
||||
@@ -817,7 +817,7 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die http://www.tu-cottbus.de/campusapp-data/Studentenwerk/index.php?mensa=CottbusHL&v=1 ähnelt.
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die http://www.studentenwerk-frankfurt.de/2011/ClassPackage/App_IKMZ_BTU/index.php?mensa=CottbusHL&v=1 ähnelt.
|
||||
/// </summary>
|
||||
public static string UrlMensa_Week_CBSouth {
|
||||
get {
|
||||
@@ -826,7 +826,7 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die http://www.tu-cottbus.de/campusapp-data/Studentenwerk/index.php?mensa=Senftenberg&v=1 ähnelt.
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die http://www.studentenwerk-frankfurt.de/2011/ClassPackage/App_IKMZ_BTU/index.php?mensa=Senftenberg&v=1 ähnelt.
|
||||
/// </summary>
|
||||
public static string UrlMensa_Week_SBFMain {
|
||||
get {
|
||||
|
||||
@@ -255,9 +255,6 @@
|
||||
<data name="FileEvents_Name" xml:space="preserve">
|
||||
<value>EventsFeed.xml</value>
|
||||
</data>
|
||||
<data name="UrlMensa_Week" xml:space="preserve">
|
||||
<value>http://www.tu-cottbus.de/campusapp-data/Studentenwerk/index.php?mensa=CottbusBTU&v=1</value>
|
||||
</data>
|
||||
<data name="FileOpeningHours_OpeningHours" xml:space="preserve">
|
||||
<value>OpeninghoursFeed.xml</value>
|
||||
</data>
|
||||
@@ -382,16 +379,16 @@
|
||||
<value>MensaFeed_SFBMain.xml</value>
|
||||
</data>
|
||||
<data name="UrlMensa_Week_CBMain" xml:space="preserve">
|
||||
<value>http://www.tu-cottbus.de/campusapp-data/Studentenwerk/index.php?mensa=CottbusBTU&v=1</value>
|
||||
<value>http://www.studentenwerk-frankfurt.de/2011/ClassPackage/App_IKMZ_BTU/index.php?mensa=CottbusBTU&v=1</value>
|
||||
</data>
|
||||
<data name="UrlMensa_Week_CBNorth" xml:space="preserve">
|
||||
<value>http://www.tu-cottbus.de/campusapp-data/Studentenwerk/index.php?mensa=CottbusBTU&v=1</value>
|
||||
<value>http://www.studentenwerk-frankfurt.de/2011/ClassPackage/App_IKMZ_BTU/index.php?mensa=CottbusBTU&v=1</value>
|
||||
</data>
|
||||
<data name="UrlMensa_Week_CBSouth" xml:space="preserve">
|
||||
<value>http://www.tu-cottbus.de/campusapp-data/Studentenwerk/index.php?mensa=CottbusHL&v=1</value>
|
||||
<value>http://www.studentenwerk-frankfurt.de/2011/ClassPackage/App_IKMZ_BTU/index.php?mensa=CottbusHL&v=1</value>
|
||||
</data>
|
||||
<data name="UrlMensa_Week_SBFMain" xml:space="preserve">
|
||||
<value>http://www.tu-cottbus.de/campusapp-data/Studentenwerk/index.php?mensa=Senftenberg&v=1</value>
|
||||
<value>http://www.studentenwerk-frankfurt.de/2011/ClassPackage/App_IKMZ_BTU/index.php?mensa=Senftenberg&v=1</value>
|
||||
</data>
|
||||
<data name="SpsApi_CampusDomain" xml:space="preserve">
|
||||
<value>3</value>
|
||||
@@ -417,4 +414,7 @@
|
||||
<data name="FileMap_CBMainMap" xml:space="preserve">
|
||||
<value>/Assets/campusmap.png</value>
|
||||
</data>
|
||||
<data name="AppSetting_DevMode" xml:space="preserve">
|
||||
<value>DevMode</value>
|
||||
</data>
|
||||
</root>
|
||||
Reference in New Issue
Block a user