public void Initialize(
     StringCollection searches,
     SearchManager.SearchManagerOperationCompletedHandler completedHandler, 
     SearchManager.SearchManagerOperationErrorHandler errorHandler)
 {
     SearchManager manager;
     foreach (string search in searches)
     {
         manager = CreateSearch(search, completedHandler, errorHandler);
         manager.SearchAsync();
     }
 }
Esempio n. 2
0
        public TwitterApp(string username, string password, ExtendedUser loggedInUser)
        {
            _twitterApiClient = new TwitterClient(username, password);
            _loggedInUser     = loggedInUser;

            // init tiny url client
            _tinyUrlClient = new TinyUrlClient();

            // init twitpic client
            _twitPicClient = new TwitPicClient(username, password);

            // init tweets manager
            _tweetsManager = new TweetsManager(username, password);
            TweetsManager.DefaultInstance = _tweetsManager;

            // init replies manager
            _repliesManager = new RepliesManager(username, password);
            RepliesManager.DefaultInstance = _repliesManager;

            // init direct message manager
            _directMessagesManager = new DirectMessagesManager(username, password);

            // init user profile manager
            _userProfileManager = new UserProfileManager(username, password);
            _userProfileManager.SelectedUser   = loggedInUser;
            UserProfileManager.DefaultInstance = _userProfileManager;

            // init friends manager
            _friendsManager = new FriendsManager(username, password);

            // init search manager
            _searchManager = new SearchManager(username, password);

            // init saved search manager
            _savedSearchesManager = new SavedSearchesManager(username, password);

            // init favourites manager
            _favouritesManager = new FavouritesManager(username, password);
        }
        public SearchManager CreateSearch(
            string keyword, 
            SearchManager.SearchManagerOperationCompletedHandler completedHandler, 
            SearchManager.SearchManagerOperationErrorHandler errorHandler)
        {
            // create an instance of search manager for this keyword
            SearchManager search = new SearchManager(_username, _password);
            search.Keyword = keyword;

            // attach event handlers
            if (null != completedHandler)
            {
                search.SearchManagerOperationCompleted += completedHandler;
            }
            if (null != errorHandler)
            {
                search.SearchManagerOperationError += errorHandler;
            }

            // keep a list of all keyword searches
            _searchManagers.Add(keyword, search);
            return search;
        }
Esempio n. 4
0
        public SearchManager CreateSearch(
            string keyword,
            SearchManager.SearchManagerOperationCompletedHandler completedHandler,
            SearchManager.SearchManagerOperationErrorHandler errorHandler)
        {
            // create an instance of search manager for this keyword
            SearchManager search = new SearchManager(_username, _password);

            search.Keyword = keyword;

            // attach event handlers
            if (null != completedHandler)
            {
                search.SearchManagerOperationCompleted += completedHandler;
            }
            if (null != errorHandler)
            {
                search.SearchManagerOperationError += errorHandler;
            }

            // keep a list of all keyword searches
            _searchManagers.Add(keyword, search);
            return(search);
        }