add failonweb and onfile do mensapage
This commit is contained in:
@@ -131,7 +131,7 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
{
|
||||
this.feed = MensaFeed.CreateCampusMensaFeed(campus);
|
||||
this.feed.onLoaded += new MensaFeed.OnLoaded(this.FeedIsReady);
|
||||
this.feed.onFailed += new MensaFeed.OnFailed(this.FeedIsFail);
|
||||
this.feed.onFailedWeb += new MensaFeed.OnFailed(this.FeedIsFailWeb);
|
||||
this.CalcSelectedIndex();
|
||||
|
||||
if (this.forceLoad)
|
||||
@@ -179,9 +179,19 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
/// <summary>
|
||||
/// Method will be execute if the feed is failed
|
||||
/// </summary>
|
||||
private void FeedIsFail()
|
||||
private void FeedIsFailWeb()
|
||||
{
|
||||
MessageBoxResult result = MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoad);
|
||||
MessageBoxResult result = MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadWeb);
|
||||
this.feed.ForceReadFile();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method will be execute if the feed is failed
|
||||
/// </summary>
|
||||
private void FeedIsFailFile()
|
||||
{
|
||||
MessageBoxResult result = MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadFile);
|
||||
this.ProgressBar.Visibility = System.Windows.Visibility.Collapsed;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -591,6 +591,24 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Datei konnte nicht geladen werden ähnelt.
|
||||
/// </summary>
|
||||
public static string MsgBox_ErrorMainModelLoadFile {
|
||||
get {
|
||||
return ResourceManager.GetString("MsgBox_ErrorMainModelLoadFile", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Es konnte kein neuer Inhalt aus den Web geladen werden ähnelt.
|
||||
/// </summary>
|
||||
public static string MsgBox_ErrorMainModelLoadWeb {
|
||||
get {
|
||||
return ResourceManager.GetString("MsgBox_ErrorMainModelLoadWeb", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Ortung ähnelt.
|
||||
/// </summary>
|
||||
|
||||
@@ -401,4 +401,10 @@
|
||||
<data name="MsgBox_ErrorMainModelLoad" xml:space="preserve">
|
||||
<value>Beim Laden des Inhaltes ist ein Fehler aufgetreten </value>
|
||||
</data>
|
||||
<data name="MsgBox_ErrorMainModelLoadFile" xml:space="preserve">
|
||||
<value>Datei konnte nicht geladen werden</value>
|
||||
</data>
|
||||
<data name="MsgBox_ErrorMainModelLoadWeb" xml:space="preserve">
|
||||
<value>Es konnte kein neuer Inhalt aus den Web geladen werden</value>
|
||||
</data>
|
||||
</root>
|
||||
Reference in New Issue
Block a user