private static Mensaplan loadCachedMensaplan() { try { var cacheStream = isf.OpenFile(cachedMensaplanFile, System.IO.FileMode.OpenOrCreate); var mp = new Mensaplan(cacheStream); cacheStream.Close(); return mp; } catch { return null; } }
void mp_OnError(Mensaplan obj) { Dispatcher.BeginInvoke(() => { this.showMessage("Es gab ein Problem. Versuch es später nochmal!"); throw new ExitAppException(); }); }
void mensaplan_Loaded(Mensaplan mp) { this.mensaplan = mp; this.DayPivot.ItemsSource = mp.Tage; if (mp.isLoaded == false) { this.popupTitle.Text = "Error... :("; this.popupTitle.Foreground = new SolidColorBrush(Colors.Red); } else { this.loadingPopup.IsOpen = false; this.optionsBtn.IsEnabled = true; trySelectCurrentDay(); } this.progress.IsIndeterminate = false; }