예제 #1
0
        private void Star_ScrapTweetAndReplyMultithreaded(object parameters)
        {
            try
            {
                Array paramsArray = new object[2];

                paramsArray = (Array)parameters;

                KeyValuePair <string, TweetAccountManager> keyValue = (KeyValuePair <string, TweetAccountManager>)paramsArray.GetValue(0);


                List <string> list_userIDsToFollow = new List <string>();//(List<string>)paramsArray.GetValue(1);

                TweetAccountManager tweetAccountManager = keyValue.Value;

                //tweetAccountManager.unFollower.logEvents.addToLogger += new EventHandler(logEvents_UnFollower_addToLogger);
                tweetAccountManager.logEvents.addToLogger += new EventHandler(ReplyInterface_AddToLogger);

                if (!tweetAccountManager.IsLoggedIn)
                {
                    tweetAccountManager.Login();
                }

                if (tweetAccountManager.AccountStatus == "Account Suspended")
                {
                    clsDBQueryManager database = new clsDBQueryManager();
                    database.UpdateSuspendedAcc(tweetAccountManager.Username);

                    AddToReplyInterfaceLog("[ " + DateTime.Now + " ] => [ Account Suspended With User Name : " + tweetAccountManager.Username + " ]");
                    return;
                }

                tweetAccountManager.Mention_ScrapTweetAndReply();

                BindData();

                tweetAccountManager.logEvents.addToLogger -= ReplyInterface_AddToLogger;
            }
            catch
            {
            }
        }
예제 #2
0
        private void Start_ReplyMultithreaded(object parameters)
        {
            try
            {
                Array paramsArray = new object[2];

                paramsArray = (Array)parameters;

                KeyValuePair <string, TweetAccountManager> keyValue = (KeyValuePair <string, TweetAccountManager>)paramsArray.GetValue(0);


                List <string> list_userIDsToFollow = new List <string>();//(List<string>)paramsArray.GetValue(1);

                TweetAccountManager tweetAccountManager = keyValue.Value;

                if (tweetAccountManager.Username == userName)
                {
                    if (userDisplayName.Length + screenName.Length + message.Length < 140)
                    {
                        //tweetAccountManager.unFollower.logEvents.addToLogger += new EventHandler(logEvents_UnFollower_addToLogger);
                        tweetAccountManager.logEvents.addToLogger += new EventHandler(ReplyInterface_AddToLogger);

                        if (!tweetAccountManager.IsLoggedIn)
                        {
                            tweetAccountManager.Login();
                        }

                        if (tweetAccountManager.AccountStatus == "Account Suspended")
                        {
                            clsDBQueryManager database = new clsDBQueryManager();
                            database.UpdateSuspendedAcc(tweetAccountManager.Username);

                            AddToReplyInterfaceLog("[ " + DateTime.Now + " ] => [ Account Suspended With User Name : " + tweetAccountManager.Username + " ]");
                            return;
                        }

                        tweetAccountManager.Reply_MentionReplyInterface(PostAuthenticityToken, statusId, userDisplayName, screenName, message, userName);

                        tweetAccountManager.logEvents.addToLogger -= ReplyInterface_AddToLogger;

                        BindData();
                    }
                    else
                    {
                        MessageBox.Show("Please Edit  The Message Of Edit Message Box . Since The Message Length Is Greater Than 140 Characters !");
                        return;
                    }
                }
            }
            catch
            {
            }

            finally
            {
                try
                {
                    // BindData();
                }
                catch
                {
                }
            }
        }