Exemplo n.º 1
0
        public override bool OnStartJob(JobParameters @params)
        {
            if (TBL.IsSyncBlocked)
            {
                JobFinished(@params, false); return(false);
            }

            Task.Run(async delegate
            {
                //Statische Klassen erstellen
                TBL.Init(this);
                TBL.DB_Object.LoadDatabase();

                //Feed aktualiseren
                var result = await TBL.SP_Object.UpdateNewsFeed(true, true);
                if (result == SharepointAPIState.WRONG_LOGIN)
                {
                    TBL.Notify_Object.CreateLoginNag();
                }

                //Job schließen
                JobFinished(@params, false);
            });

            return(true);
        }
Exemplo n.º 2
0
        public static void InitRoutine(Context context)
        {
            //Statischen App-Speicher vorbereiten
            TBL.BlockSyncService();         //BackgroundSync sperren

            TBL.Init(context);              //AppTable initialisieren (AppTable = TaBLe)
            TBL.DB_Object.LoadDatabase();   //Feed aus der lokalen Datenbank laden

            TBL.UnBlockSyncService();       //BackgroundSync entsperren
        }