本文整理汇总了C#中BaseLib.clsDBQueryManager.SelectMessageDataForRetweet方法的典型用法代码示例。如果您正苦于以下问题:C# clsDBQueryManager.SelectMessageDataForRetweet方法的具体用法?C# clsDBQueryManager.SelectMessageDataForRetweet怎么用?C# clsDBQueryManager.SelectMessageDataForRetweet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseLib.clsDBQueryManager
的用法示例。
在下文中一共展示了clsDBQueryManager.SelectMessageDataForRetweet方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ThreadpoolMethod_Retweet
//.........这里部分代码省略.........
startAgain:
TweetAccountManager.static_lst_Struct_TweetData = tweetScrapper.TweetExtractor_ByUserName_New_New(txtTweetKeyword.Text.Trim());
int count = TweetAccountContainer.dictionary_TweetAccount.Count();
foreach (TwitterDataScrapper.StructTweetIDs item in TweetAccountManager.static_lst_Struct_TweetData)
{
//for (int i = 1; i <= count * TweetAccountManager.static_lst_Struct_TweetData.Count(); i++)
{
TweetAccountManager.que_lst_Struct_TweetData.Enqueue(item);
tempQueue.Enqueue(item);
}
}
try
{
if (TweetAccountManager.que_lst_Struct_TweetData.Count > 0)
{
item1 = tempQueue.Dequeue();
}
}
catch (Exception ex)
{
ErrorLogger.AddToErrorLogText(ex.Message);
GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> ThreadpoolMethod_Retweet() --> " + ex.Message, Globals.Path_TweetingErroLog);
GlobusFileHelper.AppendStringToTextfileNewLine("Error --> ThreadpoolMethod_Retweet() --> " + ex.Message, Globals.Path_TwtErrorLogs);
}
try
{
clsDBQueryManager DbQueryManager = new clsDBQueryManager();
DataSet Ds = DbQueryManager.SelectMessageDataForRetweet(keyValue.Key, item1.ID_Tweet, "ReTweet");
int count_NO_RoWs = Ds.Tables[0].Rows.Count;
if (count_NO_RoWs == 0)
{
if (chkCheckDatabaseInEvery2Minutes.Checked)
{
tweetAccountManager.ReTweet("", retweetMinDealy, retweetMaxDealy);
}
if (chkAutoFavorite.Checked && tweetAccountManager.IsNotSuspended && tweetAccountManager.IsLoggedIn)
{
string TUri = item1.ID_Tweet.ToString();
AddToLog_Tweet("[ " + DateTime.Now + " ] => [ Added To Favorite : " + TUri + " from " + tweetAccountManager.Username + " ]");
FavoriteOfUrl(new object[] { TUri, keyValue, tweetAccountManager });
}
}
AddToLog_Tweet("[ " + DateTime.Now + " ] => [ Searching new tweets will start after 3 minutes from " + tweetAccountManager.Username + " ]");
Thread.Sleep(3 * 60 * 1000);
count_tweet1 = tweetScrapper.countNoOfTweet(txtTweetKeyword.Text.Trim());
if (Convert.ToInt32(count_tweet) == Convert.ToInt32(count_tweet1))
{
TwitterDataScrapper.noOfRecords = 1;
}
else if (Convert.ToInt32(count_tweet1) > Convert.ToInt32(count_tweet))
{
TwitterDataScrapper.noOfRecords = Convert.ToInt32(count_tweet1) - Convert.ToInt32(count_tweet);
}
else
{
TwitterDataScrapper.noOfRecords = 1;
}
TweetAccountManager.static_lst_Struct_TweetData.Clear();
TweetAccountManager.que_lst_Struct_TweetData.Clear();
示例2: ThreadPoolMethod_Reply
private void ThreadPoolMethod_Reply(object parameters)
{
try
{
Array paramsArray = new object[2];
paramsArray = (Array)parameters;
TweetAccountManager keyValue = (TweetAccountManager)paramsArray.GetValue(0);
TweetAccountManager tweetAccountManager = keyValue;//keyValue.Value;
//try
//{
// dictionary_Threads.Add(tweetAccountManager.Username, Thread.CurrentThread);
//}
//catch { };
//Add to Threads Dictionary
AddThreadToDictionary(strModule(Module.Reply), tweetAccountManager.Username);
tweetAccountManager.logEvents.addToLogger += new EventHandler(logEvents_Tweet_addToLogger);
//tweetAccountManager.logEvents.addToLogger += logEvents_Tweet_addToLogger;
tweetAccountManager.tweeter.logEvents.addToLogger += logEvents_Tweet_addToLogger;
if (GlobusRegex.ValidateNumber(txtMinDelay_Tweet.Text))
{
replyMinDealy = Convert.ToInt32(txtMinDelay_Tweet.Text);
}
if (GlobusRegex.ValidateNumber(txtMaxDelay_Tweet.Text))
{
replyMaxDealy = Convert.ToInt32(txtMaxDelay_Tweet.Text);
}
if (chkboxReplyPerDay.Checked)
{
TweetAccountManager.ReplyPerDay = true;
if (!string.IsNullOrEmpty(txtMaximumNoRetweet.Text) && NumberHelper.ValidateNumber(txtMaximumNoRetweet.Text))
{
TweetAccountManager.NoOFReplyPerDay = Convert.ToInt32(txtMaximumNoRetweet.Text);
}
else
{
TweetAccountManager.NoOFReplyPerDay = 10;
AddToTweetCreatorLogs("[ " + DateTime.Now + " ] => [ Adding Default Maximum No Of Retweet 10 ]");
}
clsDBQueryManager DbQueryManager = new clsDBQueryManager();
DataSet Ds = DbQueryManager.SelectMessageData(keyValue.Username, "Reply");
int TodayReply = Ds.Tables["tb_MessageRecord"].Rows.Count;
tweetAccountManager.AlreadyReply = TodayReply;
if (TodayReply >= TweetAccountManager.NoOFReplyPerDay)
{
AddToLog_Tweet("[ " + DateTime.Now + " ] => [ Already Replied " + TodayReply + " ]");
return;
}
}
if (chkCheckDatabaseInEvery2Minutes.Checked == true)
{
while (true)
{
TwitterDataScrapper tweetScrapper = new TwitterDataScrapper();
TwitterDataScrapper.StructTweetIDs item1 = new TwitterDataScrapper.StructTweetIDs();
TweetAccountManager.que_lst_Struct_TweetData.Clear();
Queue<TwitterDataScrapper.StructTweetIDs> tempQueue = new Queue<TwitterDataScrapper.StructTweetIDs>();
TwitterDataScrapper.noOfRecords = 1;
AddToLog_Tweet("[ " + DateTime.Now + " ] => [ Searching tweets for " + keyValue.Username + " ]");
TweetAccountManager.static_lst_Struct_TweetData = tweetScrapper.TweetExtractor_ByUserName_New_New(txtTweetKeyword.Text.Trim());
int count = TweetAccountContainer.dictionary_TweetAccount.Count();
foreach (TwitterDataScrapper.StructTweetIDs item in TweetAccountManager.static_lst_Struct_TweetData)
{
for (int i = 1; i <= count; i++)
{
TweetAccountManager.que_lst_Struct_TweetData.Enqueue(item);
tempQueue.Enqueue(item);
}
}
if (TweetAccountManager.que_lst_Struct_TweetData.Count > 0)
{
item1 = tempQueue.Dequeue();
}
clsDBQueryManager DbQueryManager = new clsDBQueryManager();
DataSet Ds = DbQueryManager.SelectMessageDataForRetweet(keyValue.Username, item1.ID_Tweet, "Reply");
int count_NO_RoWs = Ds.Tables[0].Rows.Count;
if (count_NO_RoWs == 0)
{
tweetAccountManager.Reply(listTweetMessages, replyMinDealy, replyMaxDealy);
}
AddToLog_Tweet("[ " + DateTime.Now + " ] => [ Search tweets after 3 minutes ");
Thread.Sleep(3 * 60 * 1000);
}
}
else
//.........这里部分代码省略.........