Пример #1
0
        public override async Task OnStartAsync(StartKind startKind, IActivatedEventArgs args)
        {
            // TODO: add your long-running task here
            SQLiteClient.Init();
            await ImageCache.Instance.InitializeAsync(ApplicationData.Current.LocalCacheFolder, "ImageCache");

            ImageCache.Instance.MaxMemoryCacheCount = Int32.MaxValue;
#if DEBUG
            var taskConfig = new InstantUploadRegistration();
            await taskConfig.EnableAsync();
#endif
            if (startKind == StartKind.Launch)
            {
                if (Configuration.IsFirstRun)
                {
                    Configuration.RemoveCredentials();
                    Configuration.IsBackgroundTaskEnabled = false;
                    NavigationService.Navigate(typeof(WelcomePage));
                }
                else
                {
                    NavigationService.Navigate(typeof(FilesPage));
                }
            }
        }