Exemplo n.º 1
0
        public void setLoggedInUser(string userName, string password)
        {
            if(UserHandler.user != null)
                throw new UserLoggedInException();

            UserHandler.user = new UserObject
            {
                UserName = userName,
                Password = password,
                settings = new Settings()
            };

            if(user.settings.settings.TwitterUserToken != null && user.settings.settings.TwitterUserSecretToken != null)
            {
                Twitter = new MainTwitter();
                if(Twitter.authenticateUser(user.settings.settings.TwitterUserToken, user.settings.settings.TwitterUserSecretToken))
                {
                   // return;
                }
            }

            if(user.settings.settings.MailUN != null && user.settings.settings.MailPW != null)
            {
                Mail = new mailSender(user.settings.settings.MailUN, user.settings.settings.MailPW);

            }

        }
Exemplo n.º 2
0
 public TwitterUser(IAuthenticatedUser authenticatedUser)
 {
     this.twitter = new MainTwitter();
     this.authenticatedUser = authenticatedUser;
 }