private void BtnSettingsButton_Click(object sender, EventArgs e) { SettingsForm dlg = new SettingsForm(); if (dlg.ShowDialog(this) == System.Windows.Forms.DialogResult.OK) { redmine.InvalidateCache(); redmine.LogOut(); this.Cursor = Cursors.AppStarting; LoadConfig(); redmine.RedmineBaseUri = RedmineURL; redmine.CacheLifetime = new TimeSpan(0, 0, CacheLifetime, 0); if (RedmineAuthentication) { redmine.RedmineUser = RedmineUser; redmine.RedminePassword = RedminePassword; } else { redmine.RedmineUser = String.Empty; redmine.RedminePassword = String.Empty; } try { FillForm(PrepareFormData(0)); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Stop); } this.Cursor = Cursors.Default; } }