private void btnBrowseBoardName_AddNewPin_Click(object sender, RoutedEventArgs e) { try { //lstBoardNameNiche_AddNewPin ClGlobul.lstBoardNameNiche_AddNewPin.Clear(); txtNewPin.IsReadOnly = true; Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog(); dlg.DefaultExt = ".txt"; dlg.Filter = "Text documents (.txt)|*.txt"; Nullable <bool> result = dlg.ShowDialog(); if (result == true) { txtNewPin.Text = dlg.FileName.ToString(); } try { ClGlobul.lstBoardNameNiche_AddNewPin = GlobusFileHelper.ReadFile(txtNewPin.Text.Trim()); } catch (Exception ex) { GlobusLogHelper.log.Info(" Please Select File "); } GlobusLogHelper.log.Info(" => [ Total Uploaded BoardName Is " + ClGlobul.lstBoardNameNiche_AddNewPin.Count + " ]"); } catch (Exception ex) { GlobusLogHelper.log.Error(" Error :" + ex.StackTrace); } }
private void btnUsername_FollowByUsername_Browse_Click(object sender, RoutedEventArgs e) { try { ClGlobul.ListOfFollowUsersFollowers.Clear(); ClGlobul.FollowUsersFollowerQueue.Clear(); Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog(); dlg.DefaultExt = ".txt"; dlg.Filter = "Text documents (.txt)|*.txt"; Nullable <bool> result = dlg.ShowDialog(); if (result == true) { txtUsernameUpload.Text = dlg.FileName.ToString(); } try { ClGlobul.ListOfFollowUsersFollowers = GlobusFileHelper.ReadFile(txtUsernameUpload.Text.Trim()); } catch (Exception ex) { GlobusLogHelper.log.Info(" Please Select File "); } } catch (Exception ex) { GlobusLogHelper.log.Info("Error :" + ex.StackTrace); } }
private void chkExportScrapeData_Scraper_Checked(object sender, RoutedEventArgs e) { try { ClGlobul.lstTotalUserScraped = ClGlobul.lstTotalUserScraped.Distinct().ToList(); GlobusLogHelper.log.Info(" => [ Start User Export Process ]"); try { if (rdoFollowerScraper.IsChecked == true) { string item = "Followers"; // lstTotalUserScraped.Insert(0, item); GlobusFileHelper.WriteListtoTextfile(ClGlobul.lstTotalUserScraped, PDGlobals.UserScrapedFollower); GlobusLogHelper.log.Info(" => [ File Path " + PDGlobals.UserScrapedFollower + " ]"); } else { string item = "Followings"; // lstTotalUserScraped.Insert(0, item); GlobusFileHelper.WriteListtoTextfile(ClGlobul.lstTotalUserScraped, PDGlobals.UserScrapedFollowing); GlobusLogHelper.log.Info(" => [ File Path " + PDGlobals.UserScrapedFollowing + " ]"); } } catch { } GlobusLogHelper.log.Info(" => [ User Exported Successfully ]"); } catch (Exception ex) { GlobusLogHelper.log.Error(" Error :" + ex.StackTrace); } }
private void btnEmailsBrowse_AccountVerification_Click(object sender, EventArgs e) { try { using (OpenFileDialog ofd = new OpenFileDialog()) { ofd.Filter = "Text Files (*.txt)|*.txt"; ofd.InitialDirectory = Application.StartupPath; if (ofd.ShowDialog() == DialogResult.OK) { txtEmails_AccountVerification.Text = ofd.FileName; string FilePath = ofd.FileName; List <string> templist = GlobusFileHelper.ReadFile(ofd.FileName);// ReadFiletoStringList lstEmailVerification_AccountVerification.Clear(); foreach (string item in templist) { //lstRemoveDuplicate.Add(item); lstEmailVerification_AccountVerification.Add(item); } lstEmailVerification_AccountVerification = lstEmailVerification_AccountVerification.Distinct().ToList(); Console.WriteLine(lstEmailVerification_AccountVerification.Count + " Emails loaded"); AddAccountVerificationLogger("[ " + DateTime.Now + " ] => [ " + lstEmailVerification_AccountVerification.Count + " Emails loaded ]"); } } } catch { } }
private void btn_LISearch_Search_SearchByUrl_Click(object sender, RoutedEventArgs e) { Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog(); dlg.DefaultExt = ".txt"; dlg.Filter = "Text documents (.txt)|*.txt"; Nullable <bool> result = dlg.ShowDialog(); if (result == true) { List <string> templist = GlobusFileHelper.ReadFile(dlg.FileName); foreach (string item in templist) { try { objSimpleScraper.lstUrlsSimpleScraper.Add(item); } catch (Exception ex) { GlobusLogHelper.log.Error("Error : " + ex.StackTrace); } } } GlobusLogHelper.log.Info("Urls Loaded : " + objSimpleScraper.lstUrlsSimpleScraper.Count); }
public void StartActionMultithreadInvite(ref PinInterestUser objPinUser) { try { try { lstThreadsInvite.Add(Thread.CurrentThread); lstThreadsInvite.Distinct().ToList(); Thread.CurrentThread.IsBackground = true; } catch (Exception ex) { }; foreach (var item_lstEmailInvites in ClGlobul.lstEmailInvites) { try { Invite(item_lstEmailInvites, ref objPinUser); GlobusFileHelper.AppendStringToTextfileNewLine(item_lstEmailInvites, PDGlobals.InviteSentPath); Thread.Sleep(1000); } catch (Exception ex) { GlobusLogHelper.log.Info(" => [ Invite Failed For This Email " + item_lstEmailInvites + " ]"); } int DelayTime = RandomNumberGenerator.GenerateRandom(minDelayInvite, maxDelayInvite); GlobusLogHelper.log.Info(" => [ Delay For " + DelayTime + " Seconds ]"); Thread.Sleep(DelayTime); } } catch (Exception ex) { GlobusLogHelper.log.Error(" Error :" + ex.StackTrace); } }
private void btnPinUrls_Like_Browse_Click(object sender, RoutedEventArgs e) { try { txtLikePinUrl.IsReadOnly = true; ClGlobul.lstAddToBoardUserNames.Clear(); Microsoft.Win32.OpenFileDialog ofd = new Microsoft.Win32.OpenFileDialog(); ofd.DefaultExt = ".txt"; ofd.Filter = "Text documents (.txt)|*.txt"; Nullable <bool> result = ofd.ShowDialog(); if (result == true) { txtLikePinUrl.Text = ofd.FileName.ToString(); Thread ReadLargeFileThread = new Thread(ReadLargeLikePinUrlsFile); ReadLargeFileThread.Start(ofd.FileName); ClGlobul.lstAddToBoardUserNames = GlobusFileHelper.ReadFile(txtLikePinUrl.Text.Trim()); GlobusLogHelper.log.Info(" => [ " + ClGlobul.lstAddToBoardUserNames.Count + " Pin Urls Uploaded ]"); } } catch (Exception ex) { GlobusLogHelper.log.Info("Error :" + ex.StackTrace); } }
private void btnRemovePendingGroup_Click(object sender, EventArgs e) { CheckNetConn = System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable(); if (CheckNetConn) { try { lstGroupInvitation.Clear(); lstGroupInvitationThread.Clear(); if (IsStop) { IsStop = false; } if (LinkedInManager.linkedInDictionary.Count() == 0) { return; } else if (chkOwnGroup.CheckedItems.Count == 0) { AddLoggerGroupsInvitation("[ " + DateTime.Now + " ] => [ Please select Atleast One Group.. ]"); MessageBox.Show("Please select Atleast One Group.."); return; } else if (GroupStatus.lstEmailsGroupInvite.Count == 0) { AddLoggerGroupsInvitation("[ " + DateTime.Now + " ] => [ Please Add Emails to send Group Invitation ]"); MessageBox.Show("Please Add Emails to send Group Invitation.."); return; } counter_GroupSearch = 0; AddLoggerGroupsInvitation("[ " + DateTime.Now + " ] => [ Process Running Please wait for sometimes.. ]"); btnRemovePendingGroup.Cursor = Cursors.AppStarting; if (chkOwnGroup.CheckedItems.Count > 0) { new Thread(() => { LinkedInGroupsInvitation(); }).Start(); } else { } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Own Groups --> btnRemovePendingGroup_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Own Groups --> btnRemovePendingGroup_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPendingGroupErrorLogs); } } else { MessageBox.Show("Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection..."); AddLoggerGroupsInvitation("[ " + DateTime.Now + " ] => [ Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection... ]"); } }
private void LinkedInAddSearchCompany() { counter_AddFollowUrl = LinkedInManager.linkedInDictionary.Count; try { numberOfThreads = Convert.ToInt32(txtNoOfThread.Text.ToString()); if (LinkedInManager.linkedInDictionary.Count() > 0) { //ThreadPool.SetMaxThreads(numberOfThreads, numberOfThreads); foreach (KeyValuePair <string, LinkedInMaster> item in LinkedInManager.linkedInDictionary) { if (LinkedinCompanyFollow.lstLinkedinCompanyURL.Count() > 0) { ThreadPool.SetMaxThreads(numberOfThreads, numberOfThreads); ThreadPool.QueueUserWorkItem(new WaitCallback(PostAddcompanyUrl), new object[] { item }); Thread.Sleep(500); } } } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Follow Company --> LinkedInAddSearchCompany() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Follow Company --> LinkedInAddSearchCompany() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinAddSearchGroupErrorLogs); } }
private void BtnUploadGroupURL_Click(object sender, EventArgs e) { try { TxtGroupURL.Text = ""; using (OpenFileDialog ofd = new OpenFileDialog()) { ofd.Filter = "Text Files (*.txt)|*.txt"; ofd.InitialDirectory = Application.StartupPath; if (ofd.ShowDialog() == DialogResult.OK) { TxtGroupURL.Text = ofd.FileName; List <string> templist = GlobusFileHelper.ReadFile(ofd.FileName); Groups.JoinSearchGroup.lstLinkedinGroupURL.Clear(); lstJoinGroupUrl.Clear(); foreach (string item in templist) { Groups.JoinSearchGroup.lstLinkedinGroupURL.Add(item); lstJoinGroupUrl.Add(item); } Groups.JoinSearchGroup.lstLinkedinGroupURL = Groups.JoinSearchGroup.lstLinkedinGroupURL.Distinct().ToList(); AddLoggerJoinGroupUrl("[ " + DateTime.Now + " ] => [ " + Groups.JoinSearchGroup.lstLinkedinGroupURL.Count + " Group URLs Loaded ! ]"); } } } catch { } }
private void btnEmails_Click(object sender, EventArgs e) { try { txtEmails.Text = ""; using (OpenFileDialog ofd = new OpenFileDialog()) { ofd.Filter = "Text Files (*.txt)|*.txt"; ofd.InitialDirectory = Application.StartupPath; if (ofd.ShowDialog() == DialogResult.OK) { txtEmails.Text = ofd.FileName; List <string> templist = GlobusFileHelper.ReadFile(ofd.FileName); //JoinSearchGroup.JoinSearchGroup.lstLinkedinGroupURL.Clear(); lstEmails.Clear(); foreach (string item in templist) { //JoinSearchGroup.JoinSearchGroup.lstLinkedinGroupURL.Add(item); GroupStatus.lstEmailsGroupInvite.Add(item); lstEmails.Add(item); } //JoinSearchGroup.JoinSearchGroup.lstLinkedinGroupURL = JoinSearchGroup.JoinSearchGroup.lstLinkedinGroupURL.Distinct().ToList(); AddLoggerGroupsInvitation("[ " + DateTime.Now + " ] => [ " + lstEmails.Count + " Emails Added ]"); } } } catch { } }
private void chkGroupUpdate_CheckedChanged(object sender, EventArgs e) { try { if (chkGroupUpdate.Checked == true) { for (int i = 0; i < chkUpdateCollection.Items.Count; i++) { string aaa = Convert.ToString(chkUpdateCollection.Items[i]); chkUpdateCollection.SetItemChecked(i, true); } } else { for (int i = 0; i < chkUpdateCollection.Items.Count; i++) { string aaa = Convert.ToString(chkUpdateCollection.Items[i]); chkUpdateCollection.SetItemChecked(i, false); } } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Group Update --> chkGroupUpdate_CheckedChanged() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Group Update --> chkGroupUpdate_CheckedChanged() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinGetGroupMemberErrorLogs); } }
public void getHashTags() { classes.Cls_FollowStart ObjFollowProcess = new MixedCampaignManager.classes.Cls_FollowStart(); //ObjFollowProcess.CampaignFollowLogEvents.addToLogger += new EventHandler(logEvents_addToLogger); Globals.HashTags.Clear(); string returnStatus = string.Empty; Globals.HashTags = GetHashTags_New(out returnStatus); if (Globals.HashTags.Count > 0) { Log("[ " + DateTime.Now + " ] => [ " + Globals.HashTags.Count + " Trending Hash Tags ]"); Log("[ " + DateTime.Now + " ] => [ " + Globals.HashTags.Count + " Hash Tags In List ]"); foreach (string data in Globals.HashTags) { GlobusFileHelper.AppendStringToTextfileNewLine(data, Globals.Path_HashtagsStore); } Log("[ " + DateTime.Now + " ] => [ Hash tag Finished ]"); Log("-----------------------------------------------------------------------------------------------------------------------"); } else { Log("[ " + DateTime.Now + " ] => [ Rate Limit Exceeded.Please Try After Some Time ]"); } }
private void btntitle_Click(object sender, EventArgs e) { try { using (OpenFileDialog ofd = new OpenFileDialog()) { ofd.Filter = "Text Files (*.txt)|*.txt"; ofd.InitialDirectory = Application.StartupPath; if (ofd.ShowDialog() == DialogResult.OK) { txtTitleName.Text = ofd.FileName; lsttitlename.Clear(); List <string> templist = GlobusFileHelper.ReadFile(ofd.FileName); foreach (string item in templist) { string newItem = item.Replace("\t", ""); if (!lsttitlename.Contains(item) && !string.IsNullOrEmpty(newItem)) { lsttitlename.Add(item); } } AddExperienceLogger("[ " + DateTime.Now + " ] => [ " + lsttitlename.Count + " Title Loaded ]"); } } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Account Creator --> btnfname_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Account Creator --> btnfname_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinAccountCraetionErrorLogs); } }
private void btnstart_Click(object sender, EventArgs e) { if (validate_data()) { return; } //keyword = readfiles.ReadSearchfile("sumit"); //spamlist = readfiles.ReadSpamfile("sumit"); keyword = GlobusFileHelper.ReadFiletoStringList(Application.StartupPath + "\\search.txt"); spamlist = GlobusFileHelper.ReadFiletoStringList(Application.StartupPath + "\\spamurls.txt"); if (!File.Exists(Application.CommonAppDataPath + "\\yahoo_Details.txt")) { string strUserDetails = txtyahooid.Text + ":" + txtyahoopassword.Text; GlobusFileHelper.WriteStringToTextfile(strUserDetails, Application.CommonAppDataPath + "\\yahoo_Details.txt"); } foreach (string link in keyword) { List <string> templist = new List <string>(); List <string> tempspamlist = new List <string>(); crawlyahoolink.loginyahoo(txtyahooid.Text, txtyahoopassword.Text); templist = crawlyahoolink.FetchLinksToSearch(link); tempspamlist = crawlyahoolink.checkpagforspam(spamlist, templist); } }
private void BtnUploadCompanyURL_Click(object sender, EventArgs e) { try { txtCompanyURL.Text = ""; using (OpenFileDialog ofd = new OpenFileDialog()) { ofd.Filter = "Text Files (*.txt)|*.txt"; ofd.InitialDirectory = Application.StartupPath; if (ofd.ShowDialog() == DialogResult.OK) { txtCompanyURL.Text = ofd.FileName; List <string> templist = GlobusFileHelper.ReadFile(ofd.FileName); LinkedinCompanyFollow.lstLinkedinCompanyURL.Clear(); foreach (string item in templist) { LinkedinCompanyFollow.lstLinkedinCompanyURL.Add(item); } LinkedinCompanyFollow.lstLinkedinCompanyURL = LinkedinCompanyFollow.lstLinkedinCompanyURL.Distinct().ToList(); AddLoggerFollowCompanyUrl("[ " + DateTime.Now + " ] => [ " + LinkedinCompanyFollow.lstLinkedinCompanyURL.Count + " Company URLs Loaded ! ]"); } } } catch { } }
private void StartScarpperLoginUsingThreadPool() { foreach (KeyValuePair <string, LinkedInMaster> item in LinkedInManager.linkedInDictionaryExcelInput) { try { try { if (NumberHelper.ValidateNumber(txtThreadSecondModescrapper.Text.Trim())) { int numberofThreds = int.Parse(txtThreadSecondModescrapper.Text.Trim()); ThreadPool.SetMaxThreads(numberofThreds, 5); ThreadPool.QueueUserWorkItem(new WaitCallback(StartScarppLoginUsingInputData), new object[] { item }); Thread.Sleep(1000); // StartScarppLoginUsingInputData(new object[] { item }); } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Status Update --> LinkdinStatusUpdate() ---1--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Status Update --> LinkdinStatusUpdate() ---1--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinStatusUpdateErrorLogs); } } catch { } } }
public void LoadAccoundChecker() { try { Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog(); dlg.DefaultExt = ".txt"; dlg.Filter = "Text documents (.txt)|*.txt"; //txtLoadAcc_AccountChecker Nullable <bool> result = dlg.ShowDialog(); if (result == true) { txtLoadAcc_AccountChecker.Text = dlg.FileName.ToString(); ClGlobul.lstAccountForAccountChecker = GlobusFileHelper.ReadFile(txtLoadAcc_AccountChecker.Text.Trim()); } GlobusLogHelper.log.Info("=> [ Total Uploaded Account Is " + ClGlobul.lstAccountForAccountChecker.Count + " ]"); //string Path = dlg.ToString().Replace("Microsoft.Win32.OpenFileDialog: Title: , FileName", ""); //this.Dispatcher.Invoke(new Action(delegate // { // lblNoOfAccount_AccChecker.Content = ClGlobul.lstAccountForAccountChecker.Count; // })); // ClGlobul.lstAccountForAccountChecker = GlobusFileHelper.ReadFile(dlg.FileName); } catch (Exception ex) { GlobusLogHelper.log.Error(" Error :" + ex.StackTrace); } }
private void btnCompanyEmployeeScraperURLBrowse_Click(object sender, EventArgs e) { try { txtCompanyEmployeeScraperURL.Text = ""; using (OpenFileDialog ofd = new OpenFileDialog()) { ofd.Filter = "Text Files (*.txt)|*.txt"; ofd.InitialDirectory = Application.StartupPath; if (ofd.ShowDialog() == DialogResult.OK) { txtCompanyEmployeeScraperURL.Text = ofd.FileName; List <string> templist = GlobusFileHelper.ReadFile(ofd.FileName); //lstEventURLsFile = new List<string>(); LinkedinSearch.listCompanyURL.Clear(); foreach (string item in templist) { LinkedinSearch.listCompanyURL.Add(item); } LinkedinSearch.listCompanyURL = LinkedinSearch.listCompanyURL.Distinct().ToList(); AddLoggerCompanyEmployeeSearch("[ " + DateTime.Now + " ] => [ " + LinkedinSearch.listCompanyURL.Count + " Company URLs Loaded ! ]"); //AddToListWallPost(lstWallMessage.Count + " Wall post message "); } } } catch { } }
public void ProfileIDWithName() { using (OpenFileDialog ofd = new OpenFileDialog()) { ofd.Filter = "Text Files (*.txt)|*.txt"; ofd.InitialDirectory = Application.StartupPath; if (ofd.ShowDialog() == DialogResult.OK) { this.Invoke(new MethodInvoker(delegate { txtBlackListIDPath.Text = ofd.FileName; })); listProfileIDWithName.Clear(); List <string> templist = GlobusFileHelper.ReadFile(ofd.FileName); foreach (string item in templist) { string newItem = item.Replace(" ", "").Replace("\t", ""); if (!listProfileIDWithName.Contains(newItem) && !string.IsNullOrEmpty(newItem)) { listProfileIDWithName.Add(newItem); } } listProfileIDWithName = listProfileIDWithName.Distinct().ToList(); } } }
//*********Manage Connetion with search keword*****************// #region btnKeywordLoadFile_Click private void btnKeywordLoadFile_Click(object sender, EventArgs e) { try { using (OpenFileDialog ofd = new OpenFileDialog()) { ofd.Filter = "Text Files (*.txt)|*.txt"; ofd.InitialDirectory = Application.StartupPath; if (ofd.ShowDialog() == DialogResult.OK) { txtKeywordLoad.Text = ofd.FileName; CampainGroupCreate.Campaign_lstConnectionSearchKeyword.Clear(); List <string> templist = GlobusFileHelper.ReadFiletoStringList(ofd.FileName); foreach (string item in templist) { if (!CampainGroupCreate.Campaign_lstConnectionSearchKeyword.Contains(item)) { if (!string.IsNullOrEmpty(item.Replace(" ", "").Replace("\t", ""))) { CampainGroupCreate.Campaign_lstConnectionSearchKeyword.Add(item); //SearchCriteria.Que_Keyword.Enqueue(item); } } } } AddLoggerLinkedInProfileManager("[ " + DateTime.Now + " ] => [ " + CampainGroupCreate.Campaign_lstConnectionSearchKeyword.Count + " Keywords Loaded ]"); } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Connection --> btnKeywordLoadFile_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Connection --> btnKeywordLoadFile_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinAddConnectionErrorLogs); } }
public void LoadKeywords() { try { Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog(); dlg.DefaultExt = ".txt"; dlg.Filter = "Text documents (.txt)|*.txt"; Nullable <bool> result = dlg.ShowDialog(); //txt_AddConn_Keyword.Text = dlg.FileName; GlobalsAddConn.lst_keyWords_for_AddConnection.Clear(); List <string> templist = GlobusFileHelper.ReadFiletoStringList(dlg.FileName); foreach (string item in templist) { if (!GlobalsAddConn.lst_keyWords_for_AddConnection.Contains(item)) { if (!string.IsNullOrEmpty(item.Replace(" ", "").Replace("\t", ""))) { GlobalsAddConn.lst_keyWords_for_AddConnection.Add(item); } } } Application.Current.Dispatcher.Invoke(new Action(() => { txt_AddConn_Keyword.Text = dlg.FileName; })); } catch (Exception ex) { } }
private void btnUnFollowlstBrowse_UnFollow_Click(object sender, RoutedEventArgs e) { try { ClGlobul.lstUploadUnFollowList.Clear(); Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog(); dlg.DefaultExt = ".txt"; dlg.Filter = "Text documents (.txt)|*.txt"; Nullable <bool> result = dlg.ShowDialog(); try { if (result == true) { txtUnFollowList_UnFollow.Text = dlg.FileName.ToString(); } ClGlobul.lstUploadUnFollowList = GlobusFileHelper.ReadFile(txtUnFollowList_UnFollow.Text.Trim()); GlobusLogHelper.log.Info(" => [ " + ClGlobul.lstUploadUnFollowList.Count + " UnFollow List Uploaded ]"); } catch (Exception ex) { GlobusLogHelper.log.Info(" Please Select File "); } } catch (Exception ex) { GlobusLogHelper.log.Error(" Error :" + ex.StackTrace); } }
public void ExportScraper() { try { ClGlobul.lstTotalUserScraped = ClGlobul.lstTotalUserScraped.Distinct().ToList(); GlobusLogHelper.log.Info(" => [ Start User Export Process ]"); try { if (UserScraperType == "followers") { GlobusFileHelper.WriteListtoTextfile(ClGlobul.lstTotalUserScraped, PDGlobals.UserScrapedFollower); GlobusLogHelper.log.Info(" => File Path " + PDGlobals.UserScrapedFollower + " ]"); } else { GlobusFileHelper.WriteListtoTextfile(ClGlobul.lstTotalUserScraped, PDGlobals.UserScrapedFollowing); GlobusLogHelper.log.Info(" => File Path " + PDGlobals.UserScrapedFollowing + " ]"); } } catch (Exception ex) { GlobusLogHelper.log.Error(" Error : " + ex.StackTrace); } } catch (Exception ex) { GlobusLogHelper.log.Error(" Error :" + ex.StackTrace); } }
public void LoadStatusHeader() { try { Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog(); dlg.DefaultExt = ".txt"; dlg.Filter = "Text documents (.txt)|*.txt"; Nullable <bool> result = dlg.ShowDialog(); GlobalsGroups.lstStatusHeader = GlobusFileHelper.ReadFiletoStringList(dlg.FileName); Application.Current.Dispatcher.Invoke(new Action(() => { txt_GroupStatusUpdate_StatusHeader.Text = dlg.FileName; })); GlobusLogHelper.log.Info("Headers uploaded : " + GlobalsGroups.lstStatusHeader.Count); foreach (var item in GlobalsGroups.lstStatusHeader) { if (item.Length < 200) { GlobalsGroups.ListGrpDiscussion.Add(item); } else { GlobusLogHelper.log.Info("Item length exceeded 200"); } } } catch (Exception ex) { } }
private void LinkedInMembersGroupSearch() { int numberofThreads = 5; string SelectedEmail = string.Empty; this.Invoke(new MethodInvoker(delegate { SelectedEmail = cmbUser.SelectedItem.ToString(); })); try { if (LinkedInManager.linkedInDictionary.Count > 0) { ThreadPool.SetMaxThreads(numberofThreads, 5); foreach (KeyValuePair <string, LinkedInMaster> item in LinkedInManager.linkedInDictionary) { if (SelectedEmail.Contains(item.Key)) { ThreadPool.SetMaxThreads(numberofThreads, 5); ThreadPool.QueueUserWorkItem(new WaitCallback(StartDMMultiThreadedMembersGroupScrpAdd), new object[] { item }); Thread.Sleep(1000); } } } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Friends Group Scraper --> LinkedInMembersGroupSearch() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Friends Group Scraper --> LinkedInMembersGroupSearch() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinAddFriendsGroupScraperErrorLogs); } }
private void btnKeyword_LikeByKeyword_Browse_Click(object sender, RoutedEventArgs e) { try { ClGlobul.lstLikeByKeyword.Clear(); txt_KeywordLike.IsReadOnly = true; Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog(); dlg.DefaultExt = ".txt"; dlg.Filter = "Text documents (.txt)|*.txt"; Nullable <bool> result = dlg.ShowDialog(); if (result == true) { txt_KeywordLike.Text = dlg.FileName.ToString(); } try { ClGlobul.lstLikeByKeyword = GlobusFileHelper.ReadFile(txt_KeywordLike.Text.Trim()); } catch (Exception ex) { GlobusLogHelper.log.Info(" Please Select File "); } } catch (Exception ex) { GlobusLogHelper.log.Info("Error :" + ex.StackTrace); } }
private void btnSet_Click(object sender, EventArgs e) { try { Globals.DesktopFolder = txtExportLocation.Text; string path = string.Empty; path = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\InBoardPro\\LDDefaultFolderPath.txt"; using (StreamWriter sw = new StreamWriter(path)) { sw.Write(""); } GlobusFileHelper.AppendStringToTextfileNewLine(txtExportLocation.Text, Globals.Path_LinkedinDefaultSave); List <string> defaultpath = new List <string>(); if (MessageBox.Show("Export Location Is >>>" + Globals.DesktopFolder, "Notification", MessageBoxButtons.OK) == DialogResult.OK) { defaultpath = GlobusFileHelper.ReadFiletoStringList(Globals.Path_LinkedinDefaultSave); txtExportLocation.Text = defaultpath[0]; this.Close(); } } catch { } }
private void LinkedInPendingGroupSearch() { int numberofThreads = 5; try { counter_GroupPendingSearch = LinkedInManager.linkedInDictionary.Count; if (LinkedInManager.linkedInDictionary.Count > 0) { ThreadPool.SetMaxThreads(numberofThreads, 5); foreach (KeyValuePair <string, LinkedInMaster> item in LinkedInManager.linkedInDictionary) { ThreadPool.SetMaxThreads(numberofThreads, 5); ThreadPool.QueueUserWorkItem(new WaitCallback(StartMultiThreadedPendingGroupAdd), new object[] { item }); Thread.Sleep(1000); } } else { MessageBox.Show("Please Load LinkedIn Accounts From MyAccounts Menu"); AddLoggerPendingGroups("[ " + DateTime.Now + " ] => [ Please Load LinkedIn Accounts From MyAccounts Menu ]"); } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Pending Groups --> LinkedInGroupMemberSearch() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Pending Groups --> LinkedInGroupMemberSearch() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPendingGroupErrorLogs); } }
private void btnStartCampagin_Click(object sender, EventArgs e) { try { if (dgvCampaigndata.RowCount > 0) { string[] Array = new string[4]; Globals.Array[0] = dgvCampaigndata.SelectedRows[0].Cells[1].Value.ToString(); Globals.Array[1] = dgvCampaigndata.SelectedRows[0].Cells[2].Value.ToString(); Globals.Array[2] = dgvCampaigndata.SelectedRows[0].Cells[3].Value.ToString(); Globals.Array[3] = dgvCampaigndata.SelectedRows[0].Cells[4].Value.ToString(); this.Close(); RaiseFlyCreationEvent(); } else { MessageBox.Show("No Campaign in DataBase"); } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> Campaign --> btnStartCampagin_Click() --> " + ex.Message, Globals.Path_CampaignManager); } }