Exemplo n.º 1
0
        private void VerifyCredentialsClick(object sender, EventArgs e)
        {
            SaveUserIAm();
            SaveSosOnlineSettings();
            if (string.IsNullOrEmpty(_settings.MyRawName))
            {
                SosMessageBox.Show("Who Am I?", "Please select which user you are from the 'I Am' textbox so we know which records to export", "Fine");
                return;
            }

            var sosOnlineService = new SosOnlineService();
            SaveSosOnlineSettings();
            _loading.Visible = true;
            sosOnlineService.VerifyCredentialsAsync(_settings, OnVerifyCredentialsSuccess, OnSosOnlineFailure);
            _sosOnlineStatus.Text = "Logging in ...";
        }
Exemplo n.º 2
0
        private void OnVerifyCredentialsSuccess()
        {
            _sosOnlineStatus.Text = "Login success, performing sync";

            var sosDb = new SosDb();
            var exportedBuilds = sosDb.ExportNewBuilds(_settings);
            if (exportedBuilds == null)
            {
                ManualSyncComplete("No new builds to export", authenticatedSuccessfully: true);
                return;
            }
            string exportedAchievements = _settings.ExportNewAchievements();
            var sosOnlineService = new SosOnlineService();
            sosOnlineService.Synchronize(_settings, exportedBuilds, exportedAchievements, OnAddBuildsSuccess, OnSosOnlineFailure);
        }