public static LoginData GetLoginData(this ILoginFormView loginForm) { loginForm.ShowAndBlock(); LoginData loginData = new LoginData(); if (loginForm.ClickedLogin) { loginData.Username = loginForm.Login; loginData.Password = loginForm.Password; } return(loginData.isValid() ? loginData : null); }
public static LoginData GetLoginData(this ILoginFormView loginForm, IReadOnlyList <IDownloadSource> downloadSources) { loginForm.SetDownloadSources(downloadSources); loginForm.ShowAndBlock(); var loginData = new LoginData(); if (loginForm.ClickedLogin) { loginData.Username = loginForm.Login; loginData.Password = loginForm.Password; loginData.SiteCookies = loginForm.OsuCookies; loginData.DownloadSource = loginForm.DownloadSource; } return(loginData); }