public void Login(Profile profile) {
if (profile == null) {
throw new ArgumentException("profile argument cannot be null");
}
LoginData credentials = GetCredentials(profile);
if (credentials != null) {
if (ConfigurationManager.GetConfiguration(profile.GameModel).IsLastSessionAvailable && !string.IsNullOrEmpty(credentials.LastSessionArgs)) {
ShowLastSessionDialog(profile);
return;
}
if (PerformLogin(credentials)) {
return;
}
}
ShowLoginDialog(LanguageManager.Model.LoginLogIn, string.Empty, credentials.User);
}