예제 #1
0
        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);
        }
예제 #2
0
        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);
        }