public void login() { try { connection = new GoogleConnection(GoogleService.Picasa); //ServicePointManager.CertificatePolicy = new NoCheckCertificatePolicy(); connection.Authenticate(this.username, this.password); web = new PicasaWeb(connection); this.loggedIn = true; } catch (Exception) { this.loggedIn = false; } }
public PicasaWeb Connect() { System.Console.WriteLine("GoogleAccount.Connect()"); GoogleConnection conn = new GoogleConnection(GoogleService.Picasa); ServicePointManager.CertificatePolicy = new NoCheckCertificatePolicy(); if (unlock_captcha == null || token == null) { conn.Authenticate(username, password); } else { conn.Authenticate(username, password, token, unlock_captcha); token = null; unlock_captcha = null; } connection = conn; PicasaWeb picasa = new PicasaWeb(conn); this.picasa = picasa; return(picasa); }