private async void btnCleanup_Click(object sender, RoutedEventArgs e) { await FileListHelper.Cleanup(); // Enumerate the files and folders in the local folder. await ListFilesInLocalFolderAsync(); }
// Code to execute when the application is closing (eg, user hit Back) // This code will not execute when the application is deactivated private async void Application_Closing(object sender, ClosingEventArgs e) { await FileListHelper.Cleanup(); }