示例#1
0
        public bool Login()
        {
            if (this.username.Length == 0 | this.password.Length == 0)
            {
                throw new SmugMugException("There is no username or password.");
            }

            if (this.connected == false && this.credentials.UserID == 0)
            {
                try
                {
                    this.credentials = SmugMugProxy.LoginWithPassword(this.username, this.password);
                    this.connected   = true;
                }
                catch
                {
                    return(false);
                }
            }
            else
            {
                LoginWithHash();
            }

            return(true);
        }