Exemple #1
0
        private static async Task UpdateLabel(Label label, QuoteProvider quoteProvider, TimeSpan timeSpan, CancellationToken token)
        {
            while (true)
            {
                token.ThrowIfCancellationRequested();
                var text = quoteProvider.GetRandomQuote();

                label.ScreenManager.Invoke(() => label.Text = text + "...");

                await Task.Delay(timeSpan, token);
            }
        }
Exemple #2
0
        static LoadingScreen()
        {
            var settings = TypeContainer.Get <ISettings>();

            loadingQuoteProvider = new QuoteProvider(new FileInfo(Path.Combine(settings.Get <string>("LoadingScreenQuotesPath"))));
        }