Example #1
0
 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;
     }
 }
Example #2
0
 void mp_OnError(Mensaplan obj)
 {
     Dispatcher.BeginInvoke(() =>
         {
             this.showMessage("Es gab ein Problem. Versuch es später nochmal!");
             throw new ExitAppException();
         });
 }
Example #3
0
        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;
        }