Example #1
0
        public async void Reload()
        {
            await Task.Run(() =>
            {
                EnabledPacks.Clear();
                DisabledPacks.Clear();

                var(enabledPacks, disabledPacks) = _resourcePackService.LoadAll();
                EnabledPacks.AddRange(enabledPacks);
                DisabledPacks.AddRange(disabledPacks);
            });
        }
Example #2
0
        public async void Reload()
        {
            EnabledPacks.Clear();
            DisabledPacks.Clear();

            foreach (var pack in await _resourcePackService.LoadAllAsync())
            {
                if (pack.IsEnabled)
                {
                    EnabledPacks.Add(pack);
                }
                else
                {
                    DisabledPacks.Add(pack);
                }
            }
        }