//--------------------------------------------------------Constructor:----------------------------------------------------------------\\
        #region --Constructors--


        #endregion
        //--------------------------------------------------------Set-, Get- Methods:---------------------------------------------------------\\
        #region --Set-, Get- Methods--


        #endregion
        //--------------------------------------------------------Misc Methods:---------------------------------------------------------------\\
        #region --Misc Methods (Public)--
        public async Task DeleteTumOnlineTokenAndIdAsync(ConfirmDialogContext ctx)
        {
            if (ctx.MODEL.Confirmed)
            {
                // Delete token:
                Storage.Classes.Settings.SetSetting(SettingsConsts.TUM_ID, "");
                Vault.DeleteAllVaults();

                // Delete DB:
                using (TumOnlineDbContext dbCtx = new TumOnlineDbContext())
                {
                    await dbCtx.Database.EnsureDeletedAsync();

                    await dbCtx.Database.EnsureCreatedAsync();
                }

                // Remove all the cached stuff:
                using (CacheDbContext dbCtx = new CacheDbContext())
                {
                    await dbCtx.Database.EnsureDeletedAsync();

                    await dbCtx.Database.EnsureCreatedAsync();
                }
            }
        }
Exemple #2
0
 public async Task ClearImageCacheAsync(ConfirmDialogContext viewModel)
 {
     if (viewModel.MODEL.Confirmed)
     {
         await ConnectionHandler.INSTANCE.IMAGE_DOWNLOAD_HANDLER.ClearCacheAsync();
     }
 }
Exemple #3
0
 public async Task DeleteLogsAsync(ConfirmDialogContext viewModel)
 {
     if (viewModel.MODEL.Confirmed)
     {
         await Logger.DeleteLogsAsync();
     }
 }
Exemple #4
0
 public async Task DeleteLogsAsync(ConfirmDialogContext viewModel)
 {
     await Logger.deleteLogsAsync();
 }