Exemple #1
0
        public async Task LoadAsync()
        {
            // Delete any old temp data
            try
            {
                var tempResultsFolder = await ApplicationData.Current.TemporaryFolder.GetFolderAsync("Results");

                if (tempResultsFolder != null)
                {
                    await tempResultsFolder.DeleteAsync();
                }
            }
            catch { }

            await LoadFilesAsync("LinkedCards", Cards);
            await LoadFilesAsync("LinkedHostConfigs", HostConfigs);

            // Remove the WeatherLarge card since it contains a background image and often fails image comparisons
            var weatherLarge = Cards.FirstOrDefault(i => i.Name.EndsWith("WeatherLarge"));

            if (weatherLarge != null)
            {
                Cards.Remove(weatherLarge);
            }

            foreach (var c in Cards)
            {
                SelectedCards.Add(c);
            }

            foreach (var hc in HostConfigs)
            {
                SelectedHostConfigs.Add(hc);
            }
        }
        public async Task LoadAsync()
        {
            // Delete any old temp data
            try
            {
                var tempResultsFolder = await ApplicationData.Current.TemporaryFolder.GetFolderAsync("Results");

                if (tempResultsFolder != null)
                {
                    await tempResultsFolder.DeleteAsync();
                }
            }
            catch { }

            await UWPTestLibrary.FileLoadHelpers.LoadAsync(Cards, HostConfigs);

            foreach (var c in Cards)
            {
                SelectedCards.Add(c);
            }

            foreach (var hc in HostConfigs)
            {
                SelectedHostConfigs.Add(hc);
            }
        }