Exemple #1
0
        private void ClearCacheExecute()
        {
            var reportsCache = RoamingHelper.GetRoamedPath("Cache", "Reports");

            if (Directory.Exists(reportsCache))
            {
                Directory.Delete(reportsCache, true);
            }

            Reports.Clear();
        }
Exemple #2
0
        protected override async void OnInitialize()
        {
            base.OnInitialize();
            var path = RoamingHelper.GetRoamedPath("Cache", "Reports");

            if (!Directory.Exists(path))
            {
                return;
            }

            var files = Directory.GetFiles(path);

            foreach (var file in files)
            {
                var url = $"https://www.warcraftlogs.com/reports/{Path.GetFileNameWithoutExtension(file)}";
                await CreateReportViewModelAsync(url);
            }
        }