Пример #1
0
        public async void Start()
        {
            var loginResult = await UserAuth.Instance.Login();

            if (loginResult.IsLoggedIn)
            {
                await ReservationDataFetcher.Instance.GetCategoriesAsync(false);
            }

            try
            {
                var wnsManager = new WnsManager();
                await wnsManager.Register();
            }
            catch (Exception e)
            {
            }

            var transferManager = new TransferManager();
            await transferManager.ResumeDownloadsAsync();

            await BackgroundExecutionManager.RequestAccessAsync();

            BackgroundTaskHelper.RegisterBackgroundTaskForWeather();

            // TODO: Module 12: Exercise 1: Task 2.3: Load the license data
            await LicenseManager.Instance.LoadLicenseData();

            FireFinishedEvent();
        }
        public async void Start()
        {
            var loginResult = await UserAuth.Instance.Login();

            if (loginResult.IsLoggedIn)
            {
                await ReservationDataFetcher.Instance.GetCategoriesAsync(false);
            }

            var wnsManager = new WnsManager();
            await wnsManager.Register();

            var handler = Finished;

            if (handler != null)
            {
                handler(this, EventArgs.Empty);
            }
        }
        public async void Start()
        {
            var loginResult = await UserAuth.Instance.Login();

            if (loginResult.IsLoggedIn)
            {
                await ReservationDataFetcher.Instance.GetCategoriesAsync(false);
            }

            var wnsManager = new WnsManager();
            await wnsManager.Register();

            var transferManager = new TransferManager();
            await transferManager.ResumeDownloads();

            BackgroundTaskHelper.RegisterBackgroundTaskForWeather();

            var handler = Finished;

            if (handler != null)
            {
                handler(this, EventArgs.Empty);
            }
        }