Пример #1
0
        private void btnSettings_Click(object sender, EventArgs e)
        {
            Forms.Settings mSettings = new Forms.Settings();
            mSettings.Owner = this;
            mSettings.ShowDialog();
            try
            {
                // update the config values
                clientId    = Properties.Settings.Default.ClientId;
                redirectUri = new Uri(Properties.Settings.Default.RedirectUri);

                config.clientId    = clientId;
                config.redirectUri = Properties.Settings.Default.RedirectUri;
            }
            catch (Exception ex)
            {
                // if we fail on a bad config setting, clear property
                applogger.Log("Settings failed to update: " + ex.Message);
                Properties.Settings.Default.ClientId    = "";
                Properties.Settings.Default.RedirectUri = "";
                Properties.Settings.Default.Save();
            }
        }
Пример #2
0
        private void btnSettings_Click(object sender, EventArgs e)
        {
            Forms.Settings mSettings = new Forms.Settings();
            mSettings.Owner = this;
            mSettings.ShowDialog();
            try
            {
                // update the config values
                clientId = Properties.Settings.Default.ClientId;
                redirectUri = new Uri(Properties.Settings.Default.RedirectUri);

                config.clientId = clientId;
                config.redirectUri = Properties.Settings.Default.RedirectUri;
            }
            catch (Exception ex)
            {
                // if we fail on a bad config setting, clear property
                applogger.Log("Settings failed to update: " + ex.Message);
                Properties.Settings.Default.ClientId = "";
                Properties.Settings.Default.RedirectUri = "";
                Properties.Settings.Default.Save();
            }
            
        }