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