当前位置: 首页>>代码示例>>C#>>正文


C# clsDBQueryManager.UpdateSuspendedAcc方法代码示例

本文整理汇总了C#中BaseLib.clsDBQueryManager.UpdateSuspendedAcc方法的典型用法代码示例。如果您正苦于以下问题:C# clsDBQueryManager.UpdateSuspendedAcc方法的具体用法?C# clsDBQueryManager.UpdateSuspendedAcc怎么用?C# clsDBQueryManager.UpdateSuspendedAcc使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BaseLib.clsDBQueryManager的用法示例。


在下文中一共展示了clsDBQueryManager.UpdateSuspendedAcc方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Start_GetMentionsMultithreaded

        private void Start_GetMentionsMultithreaded(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(Randomiser_AddToLogger);

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

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

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

                tweetAccountManager.GetMentions();

                tweetAccountManager.logEvents.addToLogger -= Randomiser_AddToLogger;
            }
            catch
            {
            }
        }
开发者ID:ahmetDostr,项目名称:twtboard,代码行数:39,代码来源:frmRandomiser.cs

示例2: Start_ReplyMultithreaded

        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
                {
                }
            }
        }
开发者ID:prog-moh,项目名称:twtboard,代码行数:68,代码来源:frmMentionReplyInterface.cs

示例3: Start_RandomiserMultithreaded


//.........这里部分代码省略.........

                    }
                    else
                    {
                        obj_Randomiser.ReTweetsPosting = 5;
                    }

                    if (!string.IsNullOrEmpty(txtFakeReplies.Text))
                    {
                        try
                        {
                            obj_Randomiser.FakeRepliesPosting = numberOfPostingFakeReplies;
                        }
                        catch
                        {

                        }

                    }
                    else
                    {
                        obj_Randomiser.FakeRepliesPosting = 5;
                    }

                    if (!string.IsNullOrEmpty(txtAfterNoOfPosting.Text))
                    {
                        try
                        {
                            obj_Randomiser.AfterNoOfPosting = afternumberOfPosting;
                        }
                        catch
                        {

                        }

                    }
                    else
                    {
                        obj_Randomiser.AfterNoOfPosting = 5;
                    }

                    if (!string.IsNullOrEmpty(txtMinDelay.Text))
                    {
                        try
                        {
                            obj_Randomiser.MinTimeDelay = minDelay;
                        }
                        catch
                        {

                        }

                    }
                    else
                    {
                        obj_Randomiser.MinTimeDelay = 5 * 60 * 1000;
                    }

                    if (!string.IsNullOrEmpty(txtMaxDelay.Text))
                    {
                        try
                        {
                            obj_Randomiser.MaxTimeDelay = maxDelay;
                        }
                        catch
                        {

                        }
                    }
                    else
                    {
                        obj_Randomiser.MaxTimeDelay = 10 * 60 * 1000;
                    }

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

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

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

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

                    tweetAccountManager.LoginRandomiser(ref obj_Randomiser);

                    tweetAccountManager.logEvents.addToLogger -= Randomiser_AddToLogger;
                }
            }
            catch
            {
            }
        }
开发者ID:ahmetDostr,项目名称:twtboard,代码行数:101,代码来源:frmRandomiser.cs

示例4: ReTweetDivideRetweet


//.........这里部分代码省略.........
                            //foreach (TwitterDataScrapper.StructTweetIDs item in static_lst_Struct_TweetData)
                            //{
                            if (!RetweetPerDay)
                            {
                                if (counter_Retweet >= noOfRetweets)
                                {
                                    Log("[ " + DateTime.Now + " ] => [ " + counter_Retweet + " ReTweets Done For " + Username + " ]");
                                    break;
                                }
                            }
                            else if (RetweetPerDay)
                            {
                                if (AlreadyRetweeted >= NoOFRetweetPerDay)
                                {
                                    Log("[ " + DateTime.Now + " ] => [ Already Tweeted " + AlreadyRetweeted + " ]");
                                    break;
                                }
                            }

                            lock (locker_qque_lst_Struct_TweetData)
                            {
                                //if (que_lst_Struct_TweetData.Count > 0)
                                //{
                                //    item = que_lst_Struct_TweetData.Dequeue();
                                //}
                                //else
                                //{

                                //}

                            }

                            string tweetStatus;

                            int delay = 10 * 1000;

                            try
                            {
                                //delay = RandomNumberGenerator.GenerateRandom(minDelay, maxDelay);
                                if (Globals.IsGlobalDelay && Globals.IsCheckValueOfDelay)
                                {
                                    delay = RandomNumberGenerator.GenerateRandom(Globals.MinGlobalDelay, Globals.MaxGlobalDelay);
                                }
                                else
                                {
                                    delay = RandomNumberGenerator.GenerateRandom(minDelay, maxDelay);
                                }
                            }
                            catch (Exception ex)
                            {
                                delay = 10;
                                GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> TweetAccountManager --  ReTweet()  -- " + Username + " --> " + ex.Message, Globals.Path_TweetAccountManager);
                            }

                            tweeter.ReTweet(ref globusHttpHelper, pgSrc_Profile, postAuthenticityToken, item.ID_Tweet, "", out tweetStatus);

                            if (tweetStatus == "posted")
                            {
                                counter_Retweet++;
                                AlreadyRetweeted++;
                                clsDBQueryManager DataBase = new clsDBQueryManager();
                                string dbTweetMessage = StringEncoderDecoder.Encode(item.wholeTweetMessage);
                                DataBase.InsertMessageData(Username, "ReTweet", item.ID_Tweet, dbTweetMessage);
                                Log("[ " + DateTime.Now + " ] => [ Retweeted " + counter_Retweet + ": >> " + item.username__Tweet_User + " by " + Username + " ]");
                                GlobusFileHelper.AppendStringToTextfileNewLine(item.username__Tweet_User + " by " + Username, Globals.path_RetweetInformation);
                            }
                            else
                            {
                                Log("[ " + DateTime.Now + " ] => [ >>Couldn't Retweet >> " + item.ID_Tweet_User + " by " + Username + " ]");
                                //GlobusFileHelper.AppendStringToTextfileNewLine("Retweeted " + counter_Retweet + ": >> " + item.username__Tweet_User + " by " + Username, Globals.path_RetweetInformation);
                            }

                            Log("[ " + DateTime.Now + " ] => [ Retweet Delayed for " + delay + " Seconds ]");
                            Thread.Sleep(delay * 1000);
                        }

                        Log("[ " + DateTime.Now + " ] => [ Finished Retweeting with : " + Username + " ]");
                        Log("------------------------------------------------------------------------------------------------------------------------------------------");
                    }
                    else
                    {
                        Log("[ " + DateTime.Now + " ] => [ Couldn't log in with " + Username + " ]");
                        GlobusFileHelper.AppendStringToTextfileNewLine(Username + ":" + Password + ":" + proxyAddress + ":" + proxyPort + ":" + proxyUsername + ":" + proxyPassword, Globals.path_FailedLoginAccounts);
                    }
                }
                else
                {
                    clsDBQueryManager database = new clsDBQueryManager();
                    database.UpdateSuspendedAcc(Username);
                    Log("[ " + DateTime.Now + " ] => [ " + Username + ">>Account Suspended ]");

                    return;
                }
            }
            catch (Exception ex)
            {
                GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> TweetAccountManager() - retweet --> " + ex.Message, Globals.Path_TweetingErroLog);
                GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> TweetAccountManager --  ReTweet()  -- " + Username + " --> " + ex.Message, Globals.Path_TweetAccountManager);
            }
        }
开发者ID:ahmetDostr,项目名称:twtboard,代码行数:101,代码来源:TweetAccountManager.cs

示例5: Tweet


//.........这里部分代码省略.........
                                            {
                                                delay = RandomNumberGenerator.GenerateRandom(minDelay, maxDelay);
                                                Log("[ " + DateTime.Now + " ] => [ Tweet Delayed for " + delay + " Seconds ]");
                                                Thread.Sleep(delay * 1000);
                                            }
                                        }
                                        else
                                        {
                                            delay = RandomNumberGenerator.GenerateRandom(minDelay, maxDelay);

                                            Log("[ " + DateTime.Now + " ] => [ Tweet Delayed for " + delay + " Seconds ]");
                                            Thread.Sleep(delay * 1000);
                                        }
                                    }
                                    catch { }

                                    counter_Tweet++;
                                    AlreadyTweeted++;
                                    Globals.totalcountTweet++;
                                }
                                catch (Exception ex)
                                {
                                    GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> StartTweetingMultithreaded() -- tweetStatus --> " + ex.Message, Globals.Path_TweetingErroLog);
                                    GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> TweetAccountManager --  Tweet()  -- " + Username + " --> " + ex.Message, Globals.Path_TweetAccountManager);
                                }

                                try
                                {
                                    RemoveFollwerFromTxtFile(FileTweetPath, tweetMessage);
                                }
                                catch { }
                            }
                            else
                            {
                                Log("[ " + DateTime.Now + " ] => [ >>Couldn't Post >> " + tweetMessage + " by " + Username + " ]");
                                GlobusFileHelper.AppendStringToTextfileNewLine(Username + ":" + Password + ":" + proxyAddress + ":" + proxyPort + ":" + proxyUsername + ":" + proxyPassword + ":" + tweetMessage, Globals.path_FailedToTweetAccounts);
                                //Thread.Sleep(delay * 1000);
                                //Log("[ " + DateTime.Now + " ] => [ Tweet Delayed for " + delay + " Seconds ]");

                                try
                                {
                                    if (Globals.IsGlobalDelay && Globals.IsCheckValueOfDelay)
                                    {
                                        if (Globals.FollowerRunningText == "FollowerModule" && Globals.TweetRunningText == "TweetModule")
                                        {
                                            delay = RandomNumberGenerator.GenerateRandom(minDelay, maxDelay);
                                            delay1 = RandomNumberGenerator.GenerateRandom(Globals.MinGlobalDelay, Globals.MaxGlobalDelay);

                                            Log("[ " + DateTime.Now + " ] => [ Tweet Delayed for " + delay + " Seconds ]");
                                            Thread.Sleep(delay * 1000);

                                            Log("[ " + DateTime.Now + " ] => [ Global Delay for Tweet: " + delay1 + " Seconds ]");
                                            Thread.Sleep(delay1 * 1000);
                                        }
                                        else
                                        {
                                            delay = RandomNumberGenerator.GenerateRandom(minDelay, maxDelay);
                                            Log("[ " + DateTime.Now + " ] => [ Tweet Delayed for " + delay + " Seconds ]");
                                            Thread.Sleep(delay * 1000);
                                        }
                                    }
                                    else
                                    {
                                        delay = RandomNumberGenerator.GenerateRandom(minDelay, maxDelay);

                                        Log("[ " + DateTime.Now + " ] => [ Tweet Delayed for " + delay + " Seconds ]");
                                        Thread.Sleep(delay * 1000);
                                    }
                                }
                                catch { }
                            }

                        }

                    }
                    #endregion
                    GlobusFileHelper.AppendStringToTextfileNewLine("Module Tweet count : " + counter_Tweet + " using UserName: " + Username, Globals.path_CountNoOfProcessDone);
                    Log("[ " + DateTime.Now + " ] => [ Finished Tweeting with : " + Username + " ]");
                    Log("------------------------------------------------------------------------------------------------------------------------------------------");
                }
                else
                {
                    Log("[ " + DateTime.Now + " ] => [ Couldn't log in with " + Username + " ]");
                    GlobusFileHelper.AppendStringToTextfileNewLine(Username + ":" + Password + ":" + proxyAddress + ":" + proxyPort + ":" + proxyUsername + ":" + proxyPassword, Globals.path_FailedLoginAccounts);
                }
            }
            else if (Globals.proxyNotWorking)
            {
                Globals.proxyNotWorking = false;
                Log("[ " + DateTime.Now + " ] => [ " + Username + ">>Error in Login. ]");
                return;
            }
            else
            {
                clsDBQueryManager database = new clsDBQueryManager();
                database.UpdateSuspendedAcc(Username);
                Log("[ " + DateTime.Now + " ] => [ " + Username + ">>Account Suspended ]");
                return;
            }
        }
开发者ID:ahmetDostr,项目名称:twtboard,代码行数:101,代码来源:TweetAccountManager.cs

示例6: GetFollowercount


//.........这里部分代码省略.........
                if (PageSource.Contains("btn resend-confirmation-email-link"))
                {
                    Isnonemailverifiedaccounts = true;
                }

               if (!PageSource.Contains("Account suspended") && !PageSource.Contains("currently suspended") && !URL.Contains("https://twitter.com/account/suspended") && !PageSource.Contains("account-suspended"))
                {
                    //int indexStart = PageSource.IndexOf("data-nav=\"followers\"");
                    //string start = PageSource.Substring(indexStart).Replace("data-nav=\'followers\'", "");
                    //int indexEnd = start.IndexOf("</strong>");
                    //string end = start.Substring(0, indexEnd).Replace("<strong>", "").Replace(">", "").Replace("\n", "").Replace(" ", "");
                    if (PageSource.Contains("data-element-term=\"follower_stats"))
                    {
                        try
                        {
                            int indexStart = PageSource.IndexOf("data-element-term=\"follower_stats");
                            string start = PageSource.Substring(indexStart).Replace("data-element-term=\"follower_stats", "");
                            int indexEnd = start.IndexOf("</strong>");
                            string end = start.Substring(0, indexEnd).Replace("<strong>", "").Replace(">", "").Replace("\n", "").Replace(" ", "");
                            if (end.Contains("<strongtitle="))
                            {
                                try
                                {
                                    end = end.Split('\"')[6].Replace("strongtitle=", "");
                                }
                                catch { }
                            }

                            FollowerCount = rgx.StripTagsRegex(end).Replace("data-nav=\"followers\"", string.Empty).Replace("\n", string.Empty).Replace("\"", string.Empty).Trim();

                        }
                        catch { }

                        try
                        {
                            int indexStart1 = PageSource.IndexOf("data-element-term=\"following_stats");
                            string start1 = PageSource.Substring(indexStart1).Replace("data-element-term=\"following_stats", "");
                            int indexEnd1 = start1.IndexOf("</strong>");
                            string end1 = start1.Substring(0, indexEnd1).Replace("<strong>", "").Replace(">", "").Replace("\n", "").Replace(" ", "");
                            if (end1.Contains("<strongtitle="))
                            {
                                try
                                {
                                    end1 = end1.Split('\"')[6].Replace("strongtitle=", "");
                                }
                                catch { }
                            }
                            FollwingCount = rgx.StripTagsRegex(end1).Replace("data-nav=\"following\"", string.Empty).Replace("\n", string.Empty).Replace("\"", string.Empty).Trim();

                        }
                        catch { }
                    }
                    else
                    {
                        try
                        {
                            int indexStart = PageSource.IndexOf("ProfileNav-item ProfileNav-item--following");
                            string start = PageSource.Substring(indexStart).Replace("ProfileNav-item ProfileNav-item--following", "");
                            int indexEnd = start.IndexOf("data-nav=\"following");
                            string end = start.Substring(0, indexEnd).Replace("data-nav=\"following", "").Replace("<a class=\"ProfileNav-stat ProfileNav-stat--link u-borderUserColor u-textCenter js-tooltip js-nav u-textUserColor\" title=", "").Replace("Following", "").Replace(",", "").Replace("\n", "").Replace("\"", "").Replace(">", "").Trim();
                            FollwingCount = rgx.StripTagsRegex(end).Replace("data-nav=\"followers\"", string.Empty).Replace("\n", string.Empty).Replace("\"", string.Empty).Replace("following", string.Empty).Trim();
                        }
                        catch { }

                        try
                        {
                            int indexStart = PageSource.IndexOf("ProfileNav-item ProfileNav-item--follower");
                            string start = PageSource.Substring(indexStart).Replace("ProfileNav-item ProfileNav-item--follower", "");
                            int indexEnd = start.IndexOf("data-nav=\"followers");
                            string end = start.Substring(1, indexEnd).Replace("data-nav=\"followers", "").Replace("<a class=\"ProfileNav-stat ProfileNav-stat--link u-borderUserColor u-textCenter js-tooltip js-nav u-textUserColor\" title=", "").Replace("followers", "").Replace(",", "").Replace("\n", "").Replace("\"", "").Replace(">", "").Replace("Followers", "").Trim();

                            FollowerCount = rgx.StripTagsRegex(end).Replace("data-nav=\"followers\"", string.Empty).Replace("\n", string.Empty).Replace("\"", string.Empty).Replace("followers", string.Empty).Trim();
                            if(FollowerCount.Contains(" "))
                            {
                                FollowerCount = FollowerCount.Split(' ')[0].Trim();
                            }
                        }
                        catch { }
                    }

                    AccountStatus = "Active";
                    IsNotSuspended = true;
                }
                else if (PageSource.Contains("Account suspended") || URL.Contains("https://twitter.com/account/suspended") || PageSource.Contains("account-suspended"))
                {
                    Log("[ " + DateTime.Now + " ] => [ " + Username + " - Account Suspended ] ");
                    //reminveSuspendedAccounts(Username);
                    clsDBQueryManager database = new clsDBQueryManager();
                    database.UpdateSuspendedAcc(Username);
                    AccountStatus = "Account Suspended";
                    IsNotSuspended = false;
                    Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine(Username + ":" + Password + ":" + proxyAddress + ":" + proxyPort + ":" + proxyUsername + ":" + proxyPassword, Globals.path_SuspendedEmailAccounts);

                }
            }
            catch (Exception ex)
            {

            }
        }
开发者ID:ahmetDostr,项目名称:twtboard,代码行数:101,代码来源:TweetAccountManager.cs

示例7: StartCheckingAccount

        private void StartCheckingAccount(object parameters)
        {

            TweetAccountManager tweetAccountManager = new TweetAccountManager();

            lstThreadAppFollow.Add(Thread.CurrentThread);
            lstThreadAppFollow = lstThreadAppFollow.Distinct().ToList();
            Thread.CurrentThread.IsBackground = true;

            try
            {
                Array paramsArray = new object[3];

                paramsArray = (Array)parameters;

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


                AddToListBox("[ " + DateTime.Now + " ] => [ Starting Checking Account : " + keyValue.Key + " ]");

                tweetAccountManager = keyValue.Value;

                if (!tweetAccountManager.IsLoggedIn)
                {
                    tweetAccountManager.Login();
                }
                if (tweetAccountManager.IsLoggedIn)
                {
                    AddToListBox("[ " + DateTime.Now + " ] => [ SuccessFully Logged In with Account:  " + keyValue.Key + " ]");
                }
                if (tweetAccountManager.AccountStatus == "Account Suspended")
                {
                    AddToListBox("[ " + DateTime.Now + " ] => [ Suspended  Account:  " + keyValue.Key + " ]");
                    clsDBQueryManager database = new clsDBQueryManager();
                    database.UpdateSuspendedAcc(tweetAccountManager.Username);
                    return;
                }

                DataTable dt = objclsFBAccount.SelectAccoutsForGridView();

                if (!Globals.IsRefreshAccountExecute)
                {
                    btnRefresh.Invoke(new MethodInvoker(delegate
                    {
                        dgvAccounts.DataSource = dt;

                    }));
                }
            }
            catch (Exception ex)
            {
                GlobusFileHelper.AppendStringToTextfileNewLine("Error --> startCheckingAccount() -- Method --> " + ex.Message, Globals.Path_TwtErrorLogs);
            }
            finally
            {
                counter_Account--;
                
                if (counter_Account == 0)
                {
                    if (btnRefresh.InvokeRequired)
                    {
                        btnRefresh.Invoke(new MethodInvoker(delegate
                        {
                            AddToListBox("[ " + DateTime.Now + " ] => [ PROCESS COMPLETED ]");
                            AddToListBox("---------------------------------------------------------------------------------------------------------------------------");

                        }));
                    }
                }
            }
        }
开发者ID:prog-moh,项目名称:twtboard,代码行数:71,代码来源:frmAccounts.cs

示例8: Star_ScrapTweetAndReplyMultithreaded

        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("Account Suspended With User Name : " + tweetAccountManager.Username);
                    return;
                }

                tweetAccountManager.ScrapTweetAndReply();

                BindData();

                tweetAccountManager.logEvents.addToLogger -= ReplyInterface_AddToLogger;
            }
            catch
            {
            }
        } 
开发者ID:prog-moh,项目名称:twtboard,代码行数:42,代码来源:frmReplyInterface.cs

示例9: StartAddtoFollow

        public void StartAddtoFollow(object data)
        {
            try
            {
                try
                {
                    if (Is_Stop_ScrapeWhoToFollow)
                    {
                        return;
                    }
                    lstWhoToFollowScrapeThread.Add(Thread.CurrentThread);
                    lstWhoToFollowScrapeThread = lstWhoToFollowScrapeThread.Distinct().ToList();
                    Thread.CurrentThread.IsBackground = true;

                }
                catch
                { }

                Array paramsArray = new object[2];

                paramsArray = (Array)data;

                KeyValuePair<string, TweetAccountManager> keyValue = (KeyValuePair<string, TweetAccountManager>)paramsArray.GetValue(0);
                int NoOFPages = (int)paramsArray.GetValue(1);
                TweetAccountManager tweetAccountManager = keyValue.Value;

                AddThreadToDictionary(strModule(Module.WhoToScrap), tweetAccountManager.Username);

                AddToScrapeLogs("[ " + DateTime.Now + " ] => [ Logging In With " + keyValue.Key + " ]");
                if (!tweetAccountManager.IsLoggedIn)
                {
                    tweetAccountManager.Login();
                    if (!tweetAccountManager.IsLoggedIn)
                    {
                        AddToScrapeLogs("[ " + DateTime.Now + " ] => [ Not Logged In With " + keyValue.Key + " ]");
                        return;
                    }
                }
                AddToScrapeLogs("[ " + DateTime.Now + " ] => [ Logged In With " + keyValue.Key + " ]");

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

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

                foreach (string Keyword in lstscrapeWhoTofoollow)
                {
                    ScrapeWhotoFollow(tweetAccountManager, Keyword, NoOFPages);
                }
            }
            catch (Exception ex)
            {
                Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> StartAddtoFollow() --> " + ex.Message, Globals.Path_ScrapeUsersErroLog);
                Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine("Error --> StartAddtoFollow() --> " + ex.Message, Globals.Path_TwtErrorLogs);
            }
            finally
            {
                counterFoScrpeWhoToFollow++;
                if (counterFoScrpeWhoToFollow == TweetAccountContainer.dictionary_TweetAccount.Count)
                {
                    AddToScrapeLogs("[ " + DateTime.Now + " ] => [ PROCESS COMPLETED ]");
                    AddToScrapeLogs("------------------------------------------------------------------------------------------------------------------------------------------");
                }
            }
        }
开发者ID:ahmetDostr,项目名称:twtboard,代码行数:69,代码来源:frmMain_NewUI.cs

示例10: StartFollowingMultithreaded

        private void StartFollowingMultithreaded(object parameters)
        {
            TweetAccountManager tweetAccountManager = new TweetAccountManager();
            try
            {
                Array paramsArray = new object[3];

                paramsArray = (Array)parameters;

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

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

                bool OtherUser = (bool)paramsArray.GetValue(2);
                int strMinDelay = (int)paramsArray.GetValue(3);
                int strMaxDelay = (int)paramsArray.GetValue(4);

                int intMinDelay = strMinDelay;
                int intMaxDelay = strMaxDelay;

                List<string> lstFollowers = new List<string>();
                List<string> lstFollowings = new List<string>();

                AddToLog_Follower("[ " + DateTime.Now + " ] => [ Starting Follower For Account : " + keyValue.Key + " ]");

                tweetAccountManager = keyValue.Value;
                TweetAccountManager.FileFollowUrlPath = txtPathUserIDs.Text.ToString();

                if (chkboxUseGroups.Checked)
                {
                    if (tweetAccountManager.GroupName != txtUseGroup.Text)
                    {
                        AddToLog_Follower("[ " + DateTime.Now + " ] => [ " + keyValue.Key + " Group Name Does Not Match ]");
                        return;
                    }
                }

                //Add to Threads Dictionary
                AddThreadToDictionary(strModule(Module.Follow), tweetAccountManager.Username);
                tweetAccountManager.follower.logEvents.addToLogger += new EventHandler(logEvents_Follower_addToLogger);
                tweetAccountManager.logEvents.addToLogger += logEvents_Follower_addToLogger;

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

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

                try
                {
                    AddToLog_Follower("[ " + DateTime.Now + " ] => [ " + list_userIDsToFollow.Count() + " user id in List ]");
                }
                catch (Exception)
                {
                }

                if (list_userIDsToFollow.Count > 0)
                {

                    tweetAccountManager.FollowUsingURLs(list_userIDsToFollow, intMinDelay, intMaxDelay, OtherUser);
                }
                else
                {
                    AddToLog_Follower("[ " + DateTime.Now + " ] => [ No ID's To Follow ]");
                }

                // tweetAccountManager.follower.logEvents.addToLogger -= logEvents_Follower_addToLogger;
                //tweetAccountManager.logEvents.addToLogger -= logEvents_Follower_addToLogger;
            }
            catch (Exception ex)
            {
                ErrorLogger.AddToErrorLogText(ex.Message);
                GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> StartFollowingMultithreaded() --> " + ex.Message, Globals.Path_FollowerErroLog);
                GlobusFileHelper.AppendStringToTextfileNewLine("Error --> StartFollowingMultithreaded() --> " + ex.Message, Globals.Path_TwtErrorLogs);
            }

            finally
            {
                counter_AccountFollwer--;
                //TweetAccountManager tweetAccountManager = new TweetAccountManager();
                tweetAccountManager.follower.logEvents.addToLogger -= new EventHandler(logEvents_Follower_addToLogger);
                tweetAccountManager.logEvents.addToLogger -= logEvents_Follower_addToLogger;

                if (counter_AccountFollwer == 0)
                {
                    if (btnStartFollowing.InvokeRequired)
                    {
                        btnStartFollowing.Invoke(new MethodInvoker(delegate
                        {
                            Globals.FollowerRunningText = string.Empty;
                            GlobusFileHelper.AppendStringToTextfileNewLine("Module Follow count Total: " + Globals.totalcountFollower , Globals.path_CountNoOfProcessDone);
                            AddToLog_Follower("[ " + DateTime.Now + " ] => [ PROCESS COMPLETED ]");
                            AddToLog_Follower("---------------------------------------------------------------------------------------------------------------------------");

//.........这里部分代码省略.........
开发者ID:ahmetDostr,项目名称:twtboard,代码行数:101,代码来源:frmMain_NewUI.cs


注:本文中的BaseLib.clsDBQueryManager.UpdateSuspendedAcc方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。