add errormessgesboxes
This commit is contained in:
@@ -241,6 +241,7 @@
|
||||
<Compile Include="Utility\Lui\Button\NavigateButton.cs" />
|
||||
<Compile Include="Utility\Lui\Button\PhoneButton.cs" />
|
||||
<Compile Include="Utility\Lui\Button\LinkButton.cs" />
|
||||
<Compile Include="Utility\Lui\MessageBoxes\MessageBoxes.cs" />
|
||||
<Compile Include="Utility\StringManager.cs" />
|
||||
<Compile Include="Utility\Utilities.cs">
|
||||
<SubType>Code</SubType>
|
||||
|
||||
@@ -13,6 +13,8 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
using CampusAppWP8.Feed.Mensa;
|
||||
using Microsoft.Phone.Controls;
|
||||
using System.Windows;
|
||||
using CampusAppWP8.Utility.Lui.MessageBoxes;
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary>
|
||||
/// Class for the MensaPage
|
||||
@@ -94,6 +96,7 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
|
||||
/// <summary>
|
||||
/// Method will be execute if the SPSAPI is ready
|
||||
///
|
||||
/// </summary>
|
||||
private void SpsApiIsReady()
|
||||
{
|
||||
@@ -105,7 +108,7 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
/// </summary>
|
||||
private void SpsApiIsFail()
|
||||
{
|
||||
MessageBoxResult result = MessageBox.Show("LoadModel Failed", "Fehler", MessageBoxButton.OK);
|
||||
MessageBoxResult result = MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorCampusLoc);
|
||||
this.InitializeFeed(Settings.UserProfil.DefaultCampus);
|
||||
}
|
||||
|
||||
@@ -179,7 +182,7 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
/// </summary>
|
||||
private void FeedIsFail()
|
||||
{
|
||||
MessageBoxResult result = MessageBox.Show("LoadModel Failed", "Fehler", MessageBoxButton.OK);
|
||||
MessageBoxResult result = MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoad);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace CampusAppWP8.Pages
|
||||
using Microsoft.Phone.Controls;
|
||||
using Microsoft.Phone.Shell;
|
||||
using System.Threading;
|
||||
using CampusAppWP8.Utility.Lui.MessageBoxes;
|
||||
|
||||
/// <summary>
|
||||
/// Class for the StartPage
|
||||
@@ -155,7 +156,7 @@ namespace CampusAppWP8.Pages
|
||||
/// </summary>
|
||||
private void GeoWatchOptIN()
|
||||
{
|
||||
MessageBoxResult result = MessageBox.Show(AppResources.GeoWatch_OptInText, AppResources.GeoWatch_OptInHeader, MessageBoxButton.OKCancel);
|
||||
MessageBoxResult result = MessageBoxes.ShowGoeWatchOptInBox();
|
||||
|
||||
if (result == MessageBoxResult.OK)
|
||||
{
|
||||
|
||||
@@ -240,24 +240,6 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Ortung ähnelt.
|
||||
/// </summary>
|
||||
public static string GeoWatch_OptInHeader {
|
||||
get {
|
||||
return ResourceManager.GetString("GeoWatch_OptInHeader", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Dürfen Positionsdaten enhoben und verwendet werden? ähnelt.
|
||||
/// </summary>
|
||||
public static string GeoWatch_OptInText {
|
||||
get {
|
||||
return ResourceManager.GetString("GeoWatch_OptInText", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Hinweis ähnelt.
|
||||
/// </summary>
|
||||
@@ -582,6 +564,51 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Der aktuelle Campus konnte nicht ermittelt werden ähnelt.
|
||||
/// </summary>
|
||||
public static string MsgBox_ErrorCampusLoc {
|
||||
get {
|
||||
return ResourceManager.GetString("MsgBox_ErrorCampusLoc", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Fehler ähnelt.
|
||||
/// </summary>
|
||||
public static string MsgBox_ErrorHeader {
|
||||
get {
|
||||
return ResourceManager.GetString("MsgBox_ErrorHeader", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Beim Laden des Inhaltes ist ein Fehler aufgetreten ähnelt.
|
||||
/// </summary>
|
||||
public static string MsgBox_ErrorMainModelLoad {
|
||||
get {
|
||||
return ResourceManager.GetString("MsgBox_ErrorMainModelLoad", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Ortung ähnelt.
|
||||
/// </summary>
|
||||
public static string MsgBox_GeoWatchOptInHeader {
|
||||
get {
|
||||
return ResourceManager.GetString("MsgBox_GeoWatchOptInHeader", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Dürfen Positionsdaten enhoben und verwendet werden? ähnelt.
|
||||
/// </summary>
|
||||
public static string MsgBox_GeoWatchOptInText {
|
||||
get {
|
||||
return ResourceManager.GetString("MsgBox_GeoWatchOptInText", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die News ähnelt.
|
||||
/// </summary>
|
||||
|
||||
@@ -359,10 +359,10 @@
|
||||
<data name="MensaApp_Soup" xml:space="preserve">
|
||||
<value>Suppe</value>
|
||||
</data>
|
||||
<data name="GeoWatch_OptInHeader" xml:space="preserve">
|
||||
<data name="MsgBox_GeoWatchOptInHeader" xml:space="preserve">
|
||||
<value>Ortung</value>
|
||||
</data>
|
||||
<data name="GeoWatch_OptInText" xml:space="preserve">
|
||||
<data name="MsgBox_GeoWatchOptInText" xml:space="preserve">
|
||||
<value>Dürfen Positionsdaten enhoben und verwendet werden?</value>
|
||||
</data>
|
||||
<data name="Campus_CBMain" xml:space="preserve">
|
||||
@@ -392,4 +392,13 @@
|
||||
<data name="Setting_ApplAppBarTitle" xml:space="preserve">
|
||||
<value>Appeinstellungen</value>
|
||||
</data>
|
||||
<data name="MsgBox_ErrorCampusLoc" xml:space="preserve">
|
||||
<value>Der aktuelle Campus konnte nicht ermittelt werden</value>
|
||||
</data>
|
||||
<data name="MsgBox_ErrorHeader" xml:space="preserve">
|
||||
<value>Fehler</value>
|
||||
</data>
|
||||
<data name="MsgBox_ErrorMainModelLoad" xml:space="preserve">
|
||||
<value>Beim Laden des Inhaltes ist ein Fehler aufgetreten </value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,37 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="MessageBoxes.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>15.08.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Utility.Lui.MessageBoxes
|
||||
{
|
||||
using System.Windows;
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary>
|
||||
/// Class creates some MessageBoxes
|
||||
/// </summary>
|
||||
public class MessageBoxes
|
||||
{
|
||||
/// <summary>
|
||||
/// Method show the MessageBox for the GeoWatch-OptIn
|
||||
/// </summary>
|
||||
/// <returns>result of the UserInteraction</returns>
|
||||
public static MessageBoxResult ShowGoeWatchOptInBox()
|
||||
{
|
||||
return MessageBox.Show(AppResources.MsgBox_GeoWatchOptInText, AppResources.MsgBox_GeoWatchOptInHeader, MessageBoxButton.OKCancel);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method show the MessageBox for the ErrorMessageBox
|
||||
/// </summary>
|
||||
/// <param name="text">custom text for the box</param>
|
||||
/// <returns>result of the UserInteraction</returns>
|
||||
public static MessageBoxResult ShowMainModelErrorMessageBox(string text)
|
||||
{
|
||||
return MessageBox.Show(text, AppResources.MsgBox_ErrorHeader, MessageBoxButton.OK);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user