private static LogonResultInfo DoLogonScreen(string initialUser, string initialPassword, string initialServer) { var ret = new LogonResultInfo(); var f = new LoginForm {Password = initialPassword, Email = initialUser, Server = initialServer}; if (f.ShowDialog() == DialogResult.Cancel) ret.UserChoice = DialogResult.Cancel; else { ret.UserChoice = DialogResult.OK; ret.User = f.Email; ret.Password = f.Password; ret.Server = f.Server; } return ret; }
LoginResultInfo DoLoginScreen(string initialUser, string initialPassword, string initialServer) { Utils.Log.Debug("Login screen showing..."); LoginResultInfo ret = new LoginResultInfo(); LoginForm f = new LoginForm(); f.Password = initialPassword; f.UserName = initialUser; f.Server = initialServer; if (f.ShowDialog() == DialogResult.Cancel) ret.UserChoice = DialogResult.Cancel; else { ret.UserChoice = DialogResult.OK; ret.User = f.UserName; ret.Password = f.Password; ret.Server = f.Server; } Utils.Log.Debug("Logon screen done."); return ret; }