Beispiel #1
0
        private async void LoadData()
        {
            var primeData = await PrimeData.GetInstance();

            foreach (var primeItem in primeData.Primes)
            {
                PrimeItems.Add(new DisplayPrime()
                {
                    Data = primeData.GetDataForItem(primeItem), Prime = primeItem
                });
            }
        }
        private async void LoadSavedPrimeData()
        {
            PrimeData primeData = await PrimeData.GetInstance().ConfigureAwait(false);

            foreach (var primeItem in primeData.Primes)
            {
                AllPrimePartsList.Add(new DisplayPrime()
                {
                    Data = primeData.GetDataForItem(primeItem), Prime = primeItem
                });
            }
        }
Beispiel #3
0
        public async void Close()
        {
            if (RenderOverlay && backgroundWorker.IsBusy)
            {
                backgroundWorker.CancelAsync();
            }

            var _wpfoverlay = (WPFOverlay)_overlay;

            if (_wpfoverlay != null)
            {
                _wpfoverlay.Dispose();
            }
            (await PrimeData.GetInstance()).SaveToFile();
        }
        public async void Close()
        {
            if (RenderOverlay && backgroundWorker.IsBusy)
            {
                backgroundWorker.CancelAsync();
            }

            WPFOverlay wpfoverlay = (WPFOverlay)overlay;

            if (wpfoverlay != null)
            {
                wpfoverlay.Dispose();
            }
            (await PrimeData.GetInstance().ConfigureAwait(false)).SaveToFile();
        }
Beispiel #5
0
 public async void Close()
 {
     (await PrimeData.GetInstance()).SaveToFile();
 }