Пример #1
0
        /// <summary>
        /// Sets up stuff that needs storage/network permissions
        /// </summary>
        protected override async void OnStart()
        {
            string tempPicturesDir = App.Path + "/" + "Pictures";

            if (Directory.Exists(tempPicturesDir))
            {
                Directory.Delete(App.Path + "/" + "Pictures", true);
            }

            CredentialManager.Username = "******";
            Directory.CreateDirectory(App.Path + $"dflt");

            if (!App.Current.Properties.ContainsKey("Tutorial"))
            {
                App.Current.Properties.Add("Tutorial", "Yes");
                await this.SavePropertiesAsync();
            }

            BugReportHandler.Setup();
            await ThreadTimer.RunServerChecksAsync();

            if (Directory.GetDirectories(App.UserPath).Length < 5)
            {
                await DependencyService.Get <IGetStorage>().SetupDefaultQuizzesAsync(App.UserPath);
            }
            BugReportHandler.ProcessCrashLog();
        }