private void ShowImpersonateDialog() { ImpersonateDialog loginDialog = new ImpersonateDialog(); loginDialog.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; loginDialog.ShowDialog(); // This needs reworked userCredentials.Key = loginDialog.username == String.Empty ? null : loginDialog.username; userCredentials.Value = loginDialog.password == String.Empty ? null : loginDialog.password; toolStripSplitButton1.Text = loginDialog.username == String.Empty ? "Impersonate" : loginDialog.username; Refresh(); }