private void LoadPreLoadedAccount() { try { if (LinkedInManager.linkedInDictionary.Count() == 0) { MessageBox.Show("Please Load LinkedIn Accounts From MyAccounts Menu"); AddLoggerMsgGroupMemWithExcelInput("[ " + DateTime.Now + " ] => [ Please Load LinkedIn Accounts From MyAccounts Menu ]"); frmAccounts FrmAccount = new frmAccounts(); FrmAccount.Show(); return; } else { try { PopulateCmo(); } catch { } } } catch { } }
private void LoadPreScrapper() { try { if (LinkedInManager.linkedInDictionary.Count() == 0) { MessageBox.Show("Please Load LinkedIn Accounts From MyAccounts Menu"); AddLoggerCommentLiker("[ " + DateTime.Now + " ] => [ Please Load LinkedIn Accounts From MyAccounts Menu ]"); frmAccounts FrmAccount = new frmAccounts(); FrmAccount.Show(); return; } else { try { PopulateCmo(); } catch { } } } catch { } }
private void LoadPreScrapper() { try { if (LinkedInManager.linkedInDictionary.Count() == 0) { MessageBox.Show("Please Load LinkedIn Accounts From MyAccounts Menu"); AddLoggerCompanyEmployeeSearch("[ " + DateTime.Now + " ] => [ Please Load LinkedIn Accounts From MyAccounts Menu ]"); //lbGeneralLogs.Items.Clear(); frmAccounts FrmAccount = new frmAccounts(); FrmAccount.Show(); return; } else { try { //Thread obj_PopulateCmo = new Thread(PopulateCmo); //obj_PopulateCmo.Start(); PopulateCmo(); } catch { } } } catch { } }
private void btnGetUser_Click(object sender, EventArgs e) { CheckNetConn = System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable(); if (CheckNetConn) { try { if (LinkedInManager.linkedInDictionary.Count() == 0) { MessageBox.Show("Please Load LinkedIn Accounts From MyAccounts Menu"); AddLoggerCommentLiker("[ " + DateTime.Now + " ] => [ Please Load LinkedIn Accounts From MyAccounts Menu ]"); lstLoglinkdinScarper.Items.Clear(); frmAccounts FrmAccount = new frmAccounts(); FrmAccount.Show(); return; } GrpMess.Clear(); lstLoglinkdinScarper.Items.Clear(); chkUpdateCollection.Items.Clear(); cmbGroupUser.Items.Clear(); cmbGroupUser.Items.Add("Select All Account"); //pictureBox3Red.Visible = true; //pictureBox3Green.Visible = false; AddLoggerCommentLiker("[ " + DateTime.Now + " ] => [ Starting Process for Login... ]"); AddLoggerCommentLiker("[ " + DateTime.Now + " ] => [ Process is Running Now... ]"); btnGetUser.Cursor = Cursors.AppStarting; new Thread(() => { LinkdinGroupUpdate(); }).Start(); } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Group Update --> btnGetUser_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Group Update --> btnGetUser_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinGetGroupMemberErrorLogs); } } else { MessageBox.Show("Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection..."); AddLoggerCommentLiker("[ " + DateTime.Now + " ] => [ Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection... ]"); } }
private void btnAddStatusImage_Click(object sender, EventArgs e) { CheckNetConn = System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable(); if (CheckNetConn) { try { lstThreadForStatusImage.Clear(); if (IsStop) { IsStop = false; } if (LinkedInManager.linkedInDictionary.Count() == 0) { MessageBox.Show("Please Load LinkedIn Accounts From MyAccounts Menu"); AddToLogStatusImage("[ " + DateTime.Now + " ] => [ Please Load LinkedIn Accounts From MyAccounts Menu ]"); frmAccounts FrmAccount = new frmAccounts(); FrmAccount.Show(); return; } else if (ClsStatusImageShare.lstpicfile.Count == 0) { MessageBox.Show("Please Add Status Image for Post"); AddToLogStatusImage("[ " + DateTime.Now + " ] => [ Please Add Status Image for Post ]"); return; } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Status Update --> btnAddStatusImage_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Status Update --> btnAddStatusImage_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinStatusImageUpdateErrorLogs); } new Thread(() => { LinkdinStatusImageShare(); }).Start(); } else { MessageBox.Show("Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection..."); AddToLogStatusImage("[ " + DateTime.Now + " ] => [ Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection... ]"); } }
private void btnAddPendingGroups_Click(object sender, EventArgs e) { CheckNetConn = System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable(); if (CheckNetConn) { try { if (LinkedInManager.linkedInDictionary.Count() == 0) { MessageBox.Show("Please Load LinkedIn Accounts From MyAccounts Menu"); AddLoggerPendingGroups("[ " + DateTime.Now + " ] => [ Please Load LinkedIn Accounts From MyAccounts Menu ]"); frmAccounts FrmAccount = new frmAccounts(); FrmAccount.Show(); return; } lstLogPendingGroups.Items.Clear(); chkPendingGroup.Items.Clear(); cmbUserPendingGroup.Items.Clear(); LinkdInContacts.Clear(); AddLoggerPendingGroups("[ " + DateTime.Now + " ] => [ Starting Search for Pending Groups.. ]"); btnAddPendingGroups.Cursor = Cursors.AppStarting; new Thread(() => { LinkedInPendingGroupSearch(); }).Start(); } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Pending Groups --> btnAddPendingGroups_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Pending Groups --> btnAddPendingGroups_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..."); AddLoggerPendingGroups("[ " + DateTime.Now + " ] => [ Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection... ]"); } }
private void btnMsgFrom_Click(object sender, EventArgs e) { CheckNetConn = System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable(); if (CheckNetConn) { try { lstComposeMessageThread.Clear(); if (Globals.IsStop) { IsStop = false; } AddLoggerComposeMessage("[ " + DateTime.Now + " ] => [ Starting Compose Message ]"); try { if (LinkedInManager.linkedInDictionary.Count() == 0) { MessageBox.Show("Please Load LinkedIn Accounts From MyAccounts Menu"); AddLoggerComposeMessage("[ " + DateTime.Now + " ] => [ Please Load LinkedIn Accounts From MyAccounts Menu ]"); lbGeneralLogs.Items.Clear(); frmAccounts FrmAccount = new frmAccounts(); FrmAccount.Show(); return; } MessageContacts.Clear(); GrpMess.Clear(); LinkdInContacts.Clear(); LstComposeMsg.Items.Clear(); chkMessageTo.Items.Clear(); cmbMsgFrom.Items.Clear(); btnMsgFrom.Cursor = Cursors.AppStarting; new Thread(() => { LinkdinAddFromID(); }).Start(); } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnMsgFrom_Click() --> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnMsgFrom_Click() --> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinComposeMessageErrorLogs); } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnMsgFrom_Click() --> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnMsgFrom_Click() --> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinComposeMessageErrorLogs); } } else { MessageBox.Show("Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection..."); AddLoggerComposeMessage("[ " + DateTime.Now + " ] => [ Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection... ]"); } }
private void btnGetUser_Click(object sender, EventArgs e) { CheckNetConn = System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable(); if (CheckNetConn) { try { if (LinkedInManager.linkedInDictionary.Count() == 0) { MessageBox.Show("Please Load LinkedIn Accounts From MyAccounts Menu"); AddLoggerGroupStatus("[ " + DateTime.Now + " ] => [ Please Load LinkedIn Accounts From MyAccounts Menu ]"); lbGeneralLogs.Items.Clear(); frmAccounts FrmAccount = new frmAccounts(); FrmAccount.Show(); return; } GrpMess.Clear(); lstGroupUpdateThread.Clear(); if (IsStop) { IsStop = false; } lstGroupUpdate.Items.Clear(); chkGroupCollection.Items.Clear(); cmbGroupUser.Items.Clear(); cmbGroupUser.Items.Add("Select All Account"); AddLoggerGroupStatus("[ " + DateTime.Now + " ] => [ Process Start for Login...]"); btnGetUser.Cursor = Cursors.AppStarting; new Thread(() => { LinkdinGroupUpdate(); }).Start(); } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Group Update --> btnGetUser_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Group Update --> btnGetUser_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinGetGroupMemberErrorLogs); } } else { MessageBox.Show("Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection..."); AddLoggerGroupStatus("[ " + DateTime.Now + " ] => [ Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection... ]"); } }
private void btnJobScraperStart_Click(object sender, EventArgs e) { CheckNetConn = System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable(); if (CheckNetConn) { try { if (LinkedInManager.linkedInDictionary.Count() == 0) { try { MessageBox.Show("Please Load LinkedIn Accounts From MyAccounts Menu"); AddLoggerShare("[ " + DateTime.Now + " ] => [ Please Load LinkedIn Accounts From MyAccounts Menu ]"); lbGeneralLogs.Items.Clear(); frmAccounts FrmAccount = new frmAccounts(); FrmAccount.Show(); return; } catch (Exception ex) { } } if (lstLinkedinJobScraperInputUrl.Count() > 0) { } else { AddLoggerShare("[ " + DateTime.Now + " ] => [ Please Load LinkedIn Url for job scraper.]"); return; } btnSendEmailInvite.Cursor = Cursors.AppStarting; new Thread(() => StartJobScraper()).Start(); } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Connection --> btnSendEmailInvite_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Connection --> btnSendEmailInvite_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinAddConnectionErrorLogs); } } else { MessageBox.Show("Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection..."); AddLoggerManageConnection("[ " + DateTime.Now + " ] => [ Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection... ]"); } }
private void btnExistGroup_Click(object sender, EventArgs e) { CheckNetConn = System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable(); if (CheckNetConn) { try { if (LinkedInManager.linkedInDictionary.Count() == 0) { MessageBox.Show("Please Load LinkedIn Accounts From MyAccounts Menu"); AddLoggerGroupAdd("[ " + DateTime.Now + " ] => [ Please Load LinkedIn Accounts From MyAccounts Menu ]"); lbGeneralLogs.Items.Clear(); frmAccounts FrmAccount = new frmAccounts(); FrmAccount.Show(); return; } lstLogAddGroup.Items.Clear(); chkExistGroup.Items.Clear(); chkMembers.Items.Clear(); cmbUser.Items.Clear(); LinkdInContacts.Clear(); AddLoggerGroupAdd("[ " + DateTime.Now + " ] => [ Starting Search for Members.. ]"); btnExistGroup.Cursor = Cursors.AppStarting; new Thread(() => { LinkedInGroupMemberSearch(); }).Start(); } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Friends Groups --> btnExistGroup_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Friends Groups --> btnExistGroup_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinAddFriendsGroupErrorLogs); } } else { MessageBox.Show("Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection..."); AddLoggerGroupAdd("[ " + DateTime.Now + " ] => [ Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection... ]"); } }
private void btnSendEmailInvite_Click(object sender, EventArgs e) { CheckNetConn = System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable(); if (CheckNetConn) { try { lstSearchconnectionThread.Clear(); if (IsStop) { IsStop = false; } if (chkUniqueEmailConnection.Checked) { ManageConnections.ConnectUsing_Search.UseUniqueEmailConn = true; foreach (string itemKeyword in _lstInviteEmailConnection) { try { ManageConnections.ConnectUsing_Search.lstQueuEmail.Enqueue(itemKeyword); } catch { } } } if (LinkedInManager.linkedInDictionary.Count() == 0) { try { MessageBox.Show("Please Load LinkedIn Accounts From MyAccounts Menu"); AddLoggerStatusUpdate("[ " + DateTime.Now + " ] => [ Please Load LinkedIn Accounts From MyAccounts Menu ]"); lbGeneralLogs.Items.Clear(); frmAccounts FrmAccount = new frmAccounts(); FrmAccount.Show(); return; } catch (Exception ex) { } } else if (_lstInviteEmailConnection.Count == 0) { try { MessageBox.Show("Please Add InviteEmail!"); AddLoggerManageConnection("[ " + DateTime.Now + " ] => [ Please Add InviteEmail! ]"); return; } catch (Exception ex) { } } else if (!chkUniqueEmailConnection.Checked && !chkAddConnectionUseDivide.Checked) { if (string.IsNullOrEmpty(txtNumberOfRequestPerEmail.Text)) { try { MessageBox.Show("Please enter correct value in field number of request per email."); return; } catch (Exception ex) { } } else if (NumberHelper.ValidateNumber(txtNumberOfRequestPerEmail.Text.Trim())) { try { int NoofRequest = int.Parse(txtNumberOfRequestPerEmail.Text.Trim()); if (!chkAddConnectionUseDivide.Checked) { if (NoofRequest == 0) { MessageBox.Show("Number of request per email must be greater than zero."); //AddLoggerManageConnection("Number of request per email must be greater than zero."); return; } } } catch (Exception ex) { } } //} else { try { MessageBox.Show("Please Fill Integer value in TextBox(Number of request per email)."); AddLoggerManageConnection("[ " + DateTime.Now + " ] => [ Please Fill Integer value in TextBox(Number of request per email) ]"); return; } catch (Exception ex) { } } } btnSendEmailInvite.Cursor = Cursors.AppStarting; new Thread(() => InviteEmailConnectionThread()).Start(); } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Connection --> btnSendEmailInvite_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Connection --> btnSendEmailInvite_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinAddConnectionErrorLogs); } } else { MessageBox.Show("Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection..."); AddLoggerManageConnection("[ " + DateTime.Now + " ] => [ Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection... ]"); } }
private void btnCompanyEmployeeSearch_Click(object sender, EventArgs e) { CheckNetConn = System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable(); //LinkedinSearch obj_LinkedinSearch = new LinkedinSearch(); if (CheckNetConn) { #region country code foreach (KeyValuePair <string, string> item in CountryCode) { try { if (item.Value == CombScraperCountry.SelectedItem.ToString()) { SearchCriteria.Country = item.Key; break; } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> getting CountryCode ---1--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> getting CountryCode ---1--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs); } } #endregion #region MyRegion SearchCriteria.Keyword = txtKeyword.Text.ToString(); #endregion try { SearchCriteria.starter = true; if (comboBoxemail.Items.Count <= 0) { AddLoggerCompanyEmployeeSearch("[ " + DateTime.Now + " ] => [ Load The account From Menu and switch the tab and again come to InBoardProGetData Tab ]"); frmAccounts FrmAccount = new frmAccounts(); FrmAccount.Show(); return; } if (comboBoxemail.SelectedIndex < 0) { AddLoggerCompanyEmployeeSearch("[ " + DateTime.Now + " ] => [ Select The Email Id From The Dropdown and Fill All Mandatory (*) Fields ]"); } if (string.IsNullOrEmpty(txtCompanyEmployeeScraperURL.Text)) { AddLoggerCompanyEmployeeSearch("[ " + DateTime.Now + " ] => [ Please upload URL ]"); return; } AddLoggerCompanyEmployeeSearch("[ " + DateTime.Now + " ] => [ Starting Scraping ]"); IsStop_CompanyEmployeeScraperThread = false; lstCompanyEmployeeScraperThread.Clear(); Thread thread_CompanyEmployeeSearch = new Thread(StartCompanyEmployeeSearch); thread_CompanyEmployeeSearch.Start(); } catch { } } }
private void btn_SaveCampaignScraper_Click(object sender, EventArgs e) { string Location = string.Empty; string LocationArea = string.Empty; string Country = string.Empty; string PostalCode = string.Empty; string IndustryType = string.Empty; string CompanySize = string.Empty; string Group = string.Empty; string SeniorLevel = string.Empty; string Language = string.Empty; string Relationship = string.Empty; string Function = string.Empty; string IntrestedIn = string.Empty; string YearsOfExperience = string.Empty; string RecentlyJoined = string.Empty; string Fortune1000 = string.Empty; string within = string.Empty; string TitleValue = string.Empty; string CompanyValue = string.Empty; string FileName = string.Empty; string FirstName = string.Empty; string LastName = string.Empty; string Keyword = string.Empty; string Title = string.Empty; string Company = string.Empty; string CampaignName = string.Empty; CheckNetConn = System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable(); if (CheckNetConn) { try { try { SearchCriteria.starter = true; if (comboBoxemail.Items.Count <= 0) { AddLoggerScrapeUsers("[ " + DateTime.Now + " ] => [ Load The account From Menu and switch the tab and again come to InBoardProGetData Tab ]"); lbGeneralLogs.Items.Clear(); frmAccounts FrmAccount = new frmAccounts(); FrmAccount.Show(); return; } if (comboBoxemail.SelectedIndex < 0) { AddLoggerScrapeUsers("[ " + DateTime.Now + " ] => [ Select The Email Id From The Dropdown and Fill All Mandatory (*) Fields ]"); } if (string.IsNullOrEmpty(txtScraperExportFilename.Text)) { MessageBox.Show("Please Add any Name to Export File Name"); return; } AddLoggerScrapeUsers("[ " + DateTime.Now + " ] => [ Starting Scraping ]"); IsStop_InBoardProGetDataThread = false; lstInBoardProGetDataThraed.Clear(); if (string.IsNullOrEmpty(txtBoxCampaignScraperName.Text)) { MessageBox.Show("Please write the Campaign Name and then click on Save Campaign button."); return; } if (combScraperLocation.SelectedIndex == 0) { Location = "I"; lblScraperCountry.Visible = true; CombScraperCountry.Visible = true; } else if (combScraperLocation.SelectedIndex == 1) { Location = "Y"; lblScraperCountry.Visible = false; CombScraperCountry.Visible = false; } foreach (KeyValuePair<string, string> item in CountryCode) { try { if (item.Value == CombScraperCountry.SelectedItem.ToString()) { Country = item.Key; break; } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> getting CountryCode ---1--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> getting CountryCode ---1--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs); } } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---1--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---1--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs); } #region AreaWiseLocation foreach (var item in listAreaLocation) { string getAreWiseCode = HttpHelper.getHtmlfromUrl1(new Uri("http://www.linkedin.com/ta/region?query=" + item.ToString())); int startindex = getAreWiseCode.IndexOf("\"id\":"); int startindex1 = getAreWiseCode.IndexOf("displayName"); //{"resultList":[{"id":"in:6498","headLine":"<strong>Bhilai<\/strong> Area, India","displayName":"Bhilai Area, India","subLine":""}]} if (startindex > 0) { try { string start = getAreWiseCode.Substring(startindex).Replace("\"id\":", string.Empty); int endindex = start.IndexOf(","); string end = start.Substring(0, endindex).Replace(":", "%3A").Replace("\"", ""); //SearchCriteria.LocationAreaCode = end.Replace(":", "%").Replace("\"", ""); string start1 = getAreWiseCode.Substring(startindex1).Replace("displayName", string.Empty); int endindex1 = start1.IndexOf("\",\""); string end1 = start1.Substring(0, endindex1).Replace(":", "").Replace("\"", ""); if (string.IsNullOrEmpty(LocationArea)) { LocationArea = end; } else { LocationArea = LocationArea + "," + end; } string contrycd = end.Split('%')[0].Replace("3A", string.Empty); if (contrycd != Country) { AddLoggerScrapeUsers("[ " + DateTime.Now + " ] => [ Wrong Selection of Country or Your Area Location is not matched the country ]"); return; } else { AddLoggerScrapeUsers("[ " + DateTime.Now + " ] => [ Added Area Location: " + end1.ToString() + " ]"); } } catch { } } } #endregion #region Industry List string Industryvalue = string.Empty; string[] arrIndustry = Regex.Split(IndustryList, ","); foreach (string Industry in checkedListBoxIndustry.CheckedItems) { foreach (string itemIndustry in arrIndustry) { try { if (itemIndustry.Contains(Industry)) { string[] arryIndustry = Regex.Split(itemIndustry, ";"); if (arryIndustry.Length == 2) { if (!string.IsNullOrEmpty(arryIndustry[1])) { if (string.IsNullOrEmpty(Industryvalue)) { Industryvalue = arryIndustry[1]; } else { Industryvalue = Industryvalue + "," + arryIndustry[1]; } } } } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> arrIndustry 1 ---2--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> arrIndustry 1 ---2--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs); } } } //if (string.IsNullOrEmpty(Industryvalue)) //{ // Industryvalue = "select-all"; //} IndustryType = Industryvalue; #endregion #region Company size List string companysizevalue = string.Empty; string[] arraycompnaysize = Regex.Split(companysizelist, ","); foreach (string companysize in checkedListBoxCompanySize.CheckedItems) { foreach (string item in arraycompnaysize) { try { if (item.Split(':')[1] == companysize) { string[] ArrayCompnay = Regex.Split(item, ":"); if (!string.IsNullOrEmpty(ArrayCompnay[0])) { if (string.IsNullOrEmpty(companysizevalue)) { companysizevalue = ArrayCompnay[0]; } else { companysizevalue = companysizevalue + "," + ArrayCompnay[0]; } } //break; } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---3--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---3--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs); } } //break; } if (companysizevalue == "all") { CompanySize = string.Empty; } else { CompanySize = companysizevalue; } #endregion #region Group List string Groupsvalue = string.Empty; foreach (string Groups in checkedListGroups.CheckedItems) { //foreach (var item1 in GroupStatus.GroupMemUrl) //{ // string[] grp = item1.Split(':'); // if (SelUser[1] == grp[0]) // { // SpeGroupId = grp[2]; // break; // } //} foreach (var item in GroupStatus.GroupMemUrl) { try { string[] grp = item.Split(':'); if (grp[0].Equals(Groups)) { if (!string.IsNullOrEmpty(grp[2])) { if (string.IsNullOrEmpty(Groupsvalue)) { Groupsvalue = grp[2]; } else { Groupsvalue = Groupsvalue + "," + grp[2]; } } } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---4--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---4--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs); } } } Group = Groupsvalue; #endregion #region Senority List string Seniorlevelvalue = string.Empty; string[] senoirLevelList = Regex.Split(senioritylevel, ","); foreach (string Seniorlevel in checkedListBoxSeniorlevel.CheckedItems) { foreach (string itemSeniorLevel in senoirLevelList) { try { if (itemSeniorLevel.Contains(Seniorlevel)) { string[] arrysenoirLevel = Regex.Split(itemSeniorLevel, ":"); if (arrysenoirLevel.Length == 2) { if (!string.IsNullOrEmpty(arrysenoirLevel[0])) { if (string.IsNullOrEmpty(Seniorlevelvalue)) { Seniorlevelvalue = arrysenoirLevel[0]; } else { Seniorlevelvalue = Seniorlevelvalue + "," + arrysenoirLevel[0]; } } } } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> arrIndustry 1 ---2--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> arrIndustry 1 ---2--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs); } } } if (Seniorlevelvalue == "all") { SeniorLevel = string.Empty; } else { SeniorLevel = Seniorlevelvalue; } #endregion #region Language List string language = string.Empty; string[] arrLang = Regex.Split(Language, ","); foreach (string LanguageL in checkedListBoxLanguage.CheckedItems) { foreach (string item in arrLang) { try { if (item.Contains(LanguageL)) { string[] arryLang = Regex.Split(item, ";"); if (arryLang.Length == 2) { if (!string.IsNullOrEmpty(arryLang[1])) { if (string.IsNullOrEmpty(language)) { language = arryLang[1]; } else { language = language + "," + arryLang[1]; } } } } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---6--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---6--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs); } } } if (string.IsNullOrEmpty(language)) { //language = "select-all"; language = ""; } language = language; #endregion #region Relationship List string Relationships = string.Empty; string[] arrRelation = Regex.Split(RelationshipList, ","); foreach (string RelationL in checkedListRelationship.CheckedItems) { foreach (string item in arrRelation) { try { if (item.Contains(RelationL)) { string[] arryRelat = Regex.Split(item, ":"); if (arryRelat.Length == 2) { if (!string.IsNullOrEmpty(arryRelat[0])) { if (string.IsNullOrEmpty(Relationships)) { Relationships = arryRelat[0]; } else { Relationships = arryRelat[0] + "," + Relationships; } } } } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---7--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---7--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs); } } } if (Relationships == "N") { Relationship = string.Empty; } else { Relationship = Relationships; } #endregion #region Function List string Functions = string.Empty; string[] FunctionList = Regex.Split(Functionlist, ","); foreach (string FunctionL in checkedListFunction.CheckedItems) { foreach (string itemFunction in FunctionList) { try { if (itemFunction.Contains(FunctionL)) { string[] functionItem = Regex.Split(itemFunction, ":"); if (!string.IsNullOrEmpty(functionItem[0])) { if (string.IsNullOrEmpty(Functions)) { Functions = functionItem[0]; } else { Functions = Functions + "," + functionItem[0]; } } } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---8--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---8--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs); } } } if (Functions == "all") { Function = string.Empty; } else { Function = Functions; } #endregion #region IntrestedIn string Interested_In = string.Empty; string[] IntrestesList = Regex.Split(IntrestedinList, ","); foreach (string InterestedL in checkedListBoxInterestedIN.CheckedItems) { foreach (string Intresteditem in IntrestesList) { try { if (Intresteditem.Contains(InterestedL)) { string[] arrayIntrst = Regex.Split(Intresteditem, ":"); if (!string.IsNullOrEmpty(Intresteditem)) { if (string.IsNullOrEmpty(Interested_In)) { Interested_In = arrayIntrst[0]; } else { Interested_In = Interested_In + "," + arrayIntrst[0]; } } } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---9--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---9--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs); } } } if (Interested_In == "select-all") { IntrestedIn = string.Empty; } else { IntrestedIn = Interested_In; } #endregion #region Explerience list string TotalExperience = string.Empty; string[] arratExpericne = Regex.Split(expList, ","); foreach (string YearOfExperienceL in GetDataForPrimiumAccount.CheckedItems) { foreach (string itemExp in arratExpericne) { try { if (itemExp.Contains(YearOfExperienceL)) { string[] arrayitem = Regex.Split(itemExp, ":"); if (!string.IsNullOrEmpty(arrayitem[1])) { if (string.IsNullOrEmpty(TotalExperience)) { TotalExperience = arrayitem[0]; } else { TotalExperience = TotalExperience + "," + arrayitem[0]; } } } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---10--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---10--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs); } } } if (TotalExperience == "select-all") { YearsOfExperience = string.Empty; } else { YearsOfExperience = TotalExperience; } #endregion #region Recently Joined string Recently_Joined = string.Empty; string[] RecetlyJoinedArr = Regex.Split(RecentlyjoinedList, ","); foreach (string RecentlyJoinedL in checkedListBoxRecentlyJoined.CheckedItems) { foreach (string item in RecetlyJoinedArr) { try { string[] arrayitem = Regex.Split(item, ":"); if (item.Contains(RecentlyJoinedL)) { if (!string.IsNullOrEmpty(arrayitem[0])) { if (string.IsNullOrEmpty(Recently_Joined)) { Recently_Joined = arrayitem[0]; } else { Recently_Joined = Recently_Joined + "," + arrayitem[0]; } } } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---11--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---11--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs); } } } if (Recently_Joined == "select-all") { Recently_Joined = string.Empty; } else { RecentlyJoined = Recently_Joined.Trim(); } #endregion #region Fortune List string Fortune_1000 = string.Empty; string[] FortuneArr = Regex.Split(fortuneList, ","); foreach (string Fortune1000L in checkedListBoxFortune1000.CheckedItems) { foreach (string item in FortuneArr) { try { string[] arrayItem = Regex.Split(item, ":"); if (item.Contains(Fortune1000L)) { if (!string.IsNullOrEmpty(arrayItem[0])) { if (string.IsNullOrEmpty(Fortune_1000)) { Fortune_1000 = arrayItem[0]; } else { Fortune_1000 = Fortune_1000 + "," + arrayItem[0]; } } } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---12--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---12--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs); } } } if (RecentlyJoined == "select-all") { Fortune1000 = string.Empty; } else { Fortune1000 = Fortune_1000; } #endregion #region Within the PostalCode try { string[] arraywithinList = Regex.Split(WithingList, ","); foreach (string item in arraywithinList) { if (item.Contains(cmbboxWithin.SelectedItem.ToString())) { string[] arrayWithin = Regex.Split(item, ":"); within = arrayWithin[0]; } } } catch (Exception ex) { } #endregion #region within Title value try { string[] arrayTitleList = Regex.Split(TitleValue, ","); foreach (string item in arrayTitleList) { string[] arrayTitleValue = Regex.Split(item, ":"); if (arrayTitleValue[1] == cmbboxTitle.SelectedItem.ToString()) { TitleValue = arrayTitleValue[0]; } } } catch (Exception ex) { } #endregion #region within Companyvalue try { if (cmbboxCompanyValue.Enabled == true) { string[] arrayTitleList = Regex.Split(TitleValue, ","); foreach (string item in arrayTitleList) { string[] arrayTitleValue = Regex.Split(item, ":"); if (arrayTitleValue[1] == cmbboxCompanyValue.SelectedItem.ToString()) { CompanyValue = arrayTitleValue[0]; } } } } catch (Exception ex) { } #endregion FileName = (txtScraperExportFilename.Text).Replace("\"", string.Empty).Replace(",", string.Empty).ToString(); FirstName = txtScrperFirstname.Text; LastName = txtScrperlastname.Text; Keyword = txtKeyword.Text; Title = txtTitle.Text; if (Keyword.Contains("or") || (Keyword.Contains("and")) || (Keyword.Contains("not"))) { try { Keyword = Keyword.Replace(" or ", " OR "); Keyword = Keyword.Replace(" and ", " AND "); Keyword = Keyword.Replace(" not ", " NOT "); } catch { } } if (Title.Contains("or") || (Title.Contains("and")) || (Title.Contains("not"))) { try { Title = Title.Replace(" or ", " OR "); Title = Title.Replace(" and ", " AND "); Title = Title.Replace(" not ", " NOT "); } catch { } } if (!string.IsNullOrEmpty(txtPostalcode.Text)) { PostalCode = txtPostalcode.Text; } if (!string.IsNullOrEmpty(txtCompnayName.Text)) { Company = txtCompnayName.Text; } if (CombScraperCountry.SelectedItem.ToString() != null && CombScraperCountry.SelectedIndex > 0) { try { if (!string.IsNullOrEmpty(CombScraperCountry.SelectedItem.ToString())) { string countryValue = string.Empty; string temCOuntry = CombScraperCountry.SelectedItem.ToString(); GetCountryNameValue(ref temCOuntry, ref countryValue); Country = countryValue; } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---13--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---13--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs); } } CampaignName = txtBoxCampaignScraperName.Text; string Account = comboBoxemail.SelectedItem.ToString(); clsDBQueryManager obj_clsDBQueryManager = new clsDBQueryManager(); DataTable DT = new DataTable(); DataSet DS = new DataSet(); DS = obj_clsDBQueryManager.getDataFromAccountsTable(Account); DT = DS.Tables[0]; string Password = string.Empty; string ProxyAddress = string.Empty; string ProxyPort = string.Empty; string ProxyUserName = string.Empty; string ProxyPassword = string.Empty; foreach (DataRow itemAccount in DT.Rows) { try { Password = itemAccount["Password"].ToString(); ProxyAddress = itemAccount["ProxyAddress"].ToString(); ProxyPort = itemAccount["ProxyPort"].ToString(); ProxyUserName = itemAccount["ProxyUserName"].ToString(); ProxyPassword = itemAccount["ProxyPassword"].ToString(); } catch { } } //database query to insert data string query = "Insert into tb_CampaignScraper (CampaignName, Account, FirstName, LastName, Location, Country, AreaWiseLocation, PostalCode, Company, Keyword, Title, Industry, Relationship, Language, Groups, ExportedFileName, TitleValue, CompanyValue, within, YearsOfExperience, Function, SeniorLevel, IntrestedIn, CompanySize, Fortune1000, RecentlyJoined) Values ('" + CampaignName + "','" + Account + ":" + Password + ":" + ProxyAddress + ":" + ProxyPort + ":" + ":" + ProxyUserName + ":" + ProxyPassword + "','" + FirstName + "','" + LastName + "','" + Location + "','" + Country + "','" + LocationArea + "','" + PostalCode + "','" + Company + "','" + Keyword + "','" + Title + "','" + IndustryType + "','" + Relationship + "','" + language + "','" + Group + "','" + FileName + "','" + TitleValue + "','" + CompanyValue + "','" + within + "','" + YearsOfExperience + "','" + Function + "','" + SeniorLevel + "','" + IntrestedIn + "','" + CompanySize + "','" + Fortune1000 + "','" + RecentlyJoined + "');"; obj_clsDBQueryManager.InsertCampaignScraperData(query, "tb_CampaignScraper"); frmCampaignScraper obj_frmCampaignScraper = new frmCampaignScraper(); obj_frmCampaignScraper.Show(); AddLoggerScrapeUsers("[ " + DateTime.Now + " ] => [ Campaign Details saved with the campaign name :" + CampaignName + " ]"); } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---13--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---13--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs); } } else { MessageBox.Show("Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection..."); AddLoggerScrapeUsers("[ " + DateTime.Now + " ] => [ Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection... ]"); } }
private void btnSendEmailInvite_Click(object sender, EventArgs e) { CheckNetConn = System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable(); if (CheckNetConn) { try { lstSearchconnectionThread.Clear(); if (IsStop) { IsStop = false; } if (_lstConnectionSearchKeyword.Count == 0) { MessageBox.Show("Please Add Keywords!"); AddLoggerManageConnection("[ " + DateTime.Now + " ] => [ Please Add Keywords! ]"); return; } else if (txtInviteMsg.Text.Contains("|")) { if (!(chkUseSpintax_InviteMessage.Checked)) { AddLoggerManageConnection("[ " + DateTime.Now + " ] => [ Please Check SpinTax CheckBox.. ]"); MessageBox.Show("Please Check SpinTax CheckBox.."); return; } if (txtInviteMsg.Text.Contains("{") || txtInviteMsg.Text.Contains("}")) { AddLoggerManageConnection("[ " + DateTime.Now + " ] => [ Its a wrong SpinTax Format.. ]"); MessageBox.Show("Its a wrong SpinTax Format.."); return; } } if (chkUseSpintax_InviteMessage.Checked) { ConnectUsingSearchKeywod.isSpinTaxSearchWithInvite = true; ConnectUsingSearchKeywod.UpdatelistGreetMessatge = SpinnedListGenerator.GetSpinnedList(new List <string> { txtInviteMsg.Text }); } if (!string.IsNullOrEmpty(txt_campNoOfRetweetsParAc.Text) && NumberHelper.ValidateNumber(txt_campNoOfRetweetsParAc.Text)) { SearchCriteria.NumberOfRequestPerKeyword = Convert.ToInt32(txt_campNoOfRetweetsParAc.Text); } if ((LinkedInManager.linkedInDictionary.Count > 0 && !string.IsNullOrEmpty(txtInviteKeyword.Text.ToString()))) { counter_GroupMemberSearch = LinkedInManager.linkedInDictionary.Count; btnSearchKeyword.Cursor = Cursors.AppStarting; new Thread(() => SearchConnectionKeywordThread()).Start(); } else if (string.IsNullOrEmpty(txtInviteKeyword.Text.ToString())) { MessageBox.Show("Please Enter Keywords for search !"); AddLoggerManageConnection("[ " + DateTime.Now + " ] => [ Please Enter Keywords for search ! ]"); return; } else if ((LinkedInManager.linkedInDictionary.Count == 0)) { MessageBox.Show("Please Load LinkedIn Accounts From MyAccounts Menu"); AddLoggerManageConnection("[ " + DateTime.Now + " ] => [ Please Load LinkedIn Accounts From MyAccounts Menu ]"); frmAccounts FrmAccount = new frmAccounts(); FrmAccount.Show(); return; } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Connection --> btnSearchConnection_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Connection --> btnSearchConnection_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinAddConnectionErrorLogs); } } else { MessageBox.Show("Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection..."); AddLoggerManageConnection("[ " + DateTime.Now + " ] => [ Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection... ]"); } }
private void BtnSentInvitation_CreateGroup_Click(object sender, EventArgs e) { try { lstworkingThread.Clear(); if (IsStop) { IsStop = false; } if (LinkedInManager.linkedInDictionary.Count() > 0) { } if (LinkedInManager.linkedInDictionary.Count() == 0) { MessageBox.Show("Please Load LinkedIn Accounts From MyAccounts Menu"); AddLoggerCreateGroup("[ " + DateTime.Now + " ] => [ Please Load LinkedIn Accounts From MyAccounts Menu ]"); lbGeneralLogs.Items.Clear(); frmAccounts FrmAccount = new frmAccounts(); FrmAccount.Show(); return; } if (listGroupURLs_CreateGroup.Count > 0) { Groups.CreateGroup.LstGroupUrls = listGroupURLs_CreateGroup; } else { MessageBox.Show("Please Upload Group URLs !"); return; } Thread AddFriendsInYrGroup_Thread = new Thread(LinkdinAddFriendsInYrGroup_CreateGroup); AddFriendsInYrGroup_Thread.Start(); } catch (Exception ex) { Console.WriteLine("Error >>> " + ex.StackTrace); } }
private void btnStatusPost_Click(object sender, EventArgs e) { CheckNetConn = System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable(); if (CheckNetConn) { try { lstStatusUpdateThread.Clear(); if (IsStop) { IsStop = false; } if (txtStatusUpd.Text.Contains("|")) { if (!(chkStatusSpintax.Checked)) { AddLoggerStatusUpdate("[ " + DateTime.Now + " ] => [ Please Check SpinTax CheckBox.. ]"); MessageBox.Show("Please Check SpinTax CheckBox.."); return; } if (txtStatusUpd.Text.Contains("{") || txtStatusUpd.Text.Contains("}")) { AddLoggerStatusUpdate("[ " + DateTime.Now + " ] => [ Its a wrong SpinTax Format.. ]"); MessageBox.Show("Its a wrong SpinTax Format.."); return; } } if (chkStatusSpintax.Checked) { //listStatusMessages.Add("Status") msg_spintaxtForStatusUpdate = true; //UpdatelistStatusUpdate = SpinnedListGenerator.GetSpinnedList(new List<string> { txtStatusUpd.Text }); statusSpin = GlobusSpinHelper.spinLargeText(new Random(), txtStatusUpd.Text); } else { msg_spintaxtForStatusUpdate = false; } if (!chkStatusSpintax.Checked) { if (listStatusMessages.Count == 0) { MessageBox.Show("Please Add Status Message for Post"); AddLoggerStatusUpdate("[ " + DateTime.Now + " ] => [ Please Add Status Message for Post ]"); return; } } // else if (UpdatelistStatusUpdate.Count == 0) else if (string.IsNullOrEmpty(statusSpin)) { MessageBox.Show("Please Add Status Message for Post"); AddLoggerStatusUpdate("[ " + DateTime.Now + " ] => [ Please Add Status Message for Post ]"); return; } if (LinkedInManager.linkedInDictionary.Count() == 0) { MessageBox.Show("Please Load LinkedIn Accounts From MyAccounts Menu"); AddLoggerStatusUpdate("[ " + DateTime.Now + " ] => [ Please Load LinkedIn Accounts From MyAccounts Menu ]"); lbGeneralLogs.Items.Clear(); frmAccounts FrmAccount = new frmAccounts(); FrmAccount.Show(); return; } else if (!NumberHelper.ValidateNumber(txtStatusUpdateMinDelay.Text)) { AddLoggerSearchGroup("[ " + DateTime.Now + " ] => [ Please Enter Valid Value in Minimum Delay ]"); MessageBox.Show("Please Enter Valid Value in Minimum Delay"); txtStatusUpdateMinDelay.Focus(); return; } else if (!NumberHelper.ValidateNumber(txtStatusUpdateMaxDelay.Text)) { AddLoggerSearchGroup("[ " + DateTime.Now + " ] => [ Please Enter Valid Value in Maximum Delay ]"); MessageBox.Show("Please Enter Valid Value in Maximum Delay"); txtStatusUpdateMaxDelay.Focus(); return; } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Status Update --> btnStatusPost_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Status Update --> btnStatusPost_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinStatusUpdateErrorLogs); } if (listStatusMessages.Count >= 0) { if (!chkStatusSpintax.Checked) { try { clsSettingDB ObjclsSettingDB = new clsSettingDB(); ObjclsSettingDB.InsertOrUpdateSetting("StatusUpdate", "StatusMessage", StringEncoderDecoder.Encode(txtStatusUpd.Text)); } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Status Update --> Storing Default File() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Status Update --> Storing Default File() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinStatusUpdateErrorLogs); } } btnStatusPost.Cursor = Cursors.AppStarting; new Thread(() => { LinkdinStatusUpdate(); }).Start(); } else { MessageBox.Show("Please upload Status Messages File"); AddLoggerStatusUpdate("[ " + DateTime.Now + " ] => [ Please upload Status Messages File ]"); } } else { MessageBox.Show("Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection..."); AddLoggerStatusUpdate("[ " + DateTime.Now + " ] => [ Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection... ]"); } }
private void btnJoinSearchGroup_Click(object sender, EventArgs e) { CheckNetConn = System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable(); if (CheckNetConn) { try { lstLinkedinJoinGroupUrlThraed.Clear(); if (IsStop) { IsStop = false; } if (LinkedInManager.linkedInDictionary.Count() == 0) { frmAccounts FrmAccount = new frmAccounts(); FrmAccount.Show(); return; } else if (TxtGroupURL.Text == string.Empty) { AddLoggerJoinGroupUrl("[ " + DateTime.Now + " ] => [ Please Add Group Urls ]"); MessageBox.Show("Please Add Group Urls"); TxtGroupURL.Focus(); return; } else if (!NumberHelper.ValidateNumber(txtNumberOfGroupsPerAccount.Text)) { AddLoggerJoinGroupUrl("[ " + DateTime.Now + " ] => [ Please Enter Valid Number, in no of group per Account option ]"); MessageBox.Show("Please Enter Valid Number, in no of group per Account option"); txtNumberOfGroupsPerAccount.Focus(); return; } else if (!NumberHelper.ValidateNumber(txtSearchGroupMinDelay.Text)) { AddLoggerJoinGroupUrl("[ " + DateTime.Now + " ] => [ Please Enter Valid Value in Minimum Delay ]"); MessageBox.Show("Please Enter Valid Value in Minimum Delay"); txtSearchGroupMinDelay.Focus(); return; } else if (!NumberHelper.ValidateNumber(txtSearchGroupMaxDelay.Text)) { AddLoggerJoinGroupUrl("[ " + DateTime.Now + " ] => [ Please Enter Valid Value in Minimum Delay ]"); MessageBox.Show("Please Enter Valid Value in Minimum Delay"); txtSearchGroupMaxDelay.Focus(); return; } counter_JoinGroupUrlID = 0; btnJoinSearchGroup.Cursor = Cursors.AppStarting; AddLoggerJoinGroupUrl("[ " + DateTime.Now + " ] => [ PROCESS START ]"); if (Groups.JoinSearchGroup.lstLinkedinGroupURL.Count > 0) { new Thread(() => { LinkedInAddSearchGroups(); }).Start(); } else { } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Search Groups --> btnJoinSearchGroup_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Search Groups --> btnJoinSearchGroup_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinAddSearchGroupErrorLogs); } } else { MessageBox.Show("Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection..."); AddLoggerJoinGroupUrl("[ " + DateTime.Now + " ] => [ Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection... ]"); } }
private void btnSearchScraper_Click(object sender, EventArgs e) { CheckNetConn = System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable(); if (CheckNetConn) { try { SearchCriteria.starter = true; if (comboBoxemail.Items.Count <= 0) { AddLoggerScrapeUsers("[ " + DateTime.Now + " ] => [ Load The account From Menu and switch the tab and again come to InBoardProGetData Tab ]"); frmAccounts FrmAccount = new frmAccounts(); FrmAccount.Show(); return; } if (comboBoxemail.SelectedIndex < 0) { AddLoggerScrapeUsers("[ " + DateTime.Now + " ] => [ Select The Email Id From The Dropdown and Fill All Mandatory (*) Fields ]"); } AddLoggerScrapeUsers("[ " + DateTime.Now + " ] => [ Starting Scraping ]"); IsStop_InBoardProGetDataThread = false; lstInBoardProGetDataThraed.Clear(); LinkedinSearch._Keyword = txtKeyword.Text.ToString(); #region Country Location try { foreach (KeyValuePair<string, string> item in CountryCode) { try { if (item.Value == combScraperLocation.SelectedItem.ToString()) { SearchCriteria.Country = item.Key + "%3A0"; break; } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> getting CountryCode in Company filter search ---1--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> getting CountryCode in Company filter search ---1--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs); } } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() in Company filter search ---2--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() in Company filter search ---2--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs); } #endregion #region OtherLocation SearchCriteria.OtherLocation = txtOtherLocation.Text.ToString(); #endregion // #region Relationship List // if (chkAllLinkedinMem.Checked == false) // { // string Relationship = string.Empty; // string[] arrRelation = Regex.Split(RelationshipList, ","); // foreach (string RelationL in checkedListRelationship.CheckedItems) // { // foreach (string item in arrRelation) // { // try // { // if (item.Contains(RelationL)) // { // string[] arryRelat = Regex.Split(item, ":"); // if (arryRelat.Length == 2) // { // if (!string.IsNullOrEmpty(arryRelat[0])) // { // if (string.IsNullOrEmpty(Relationship)) // { // Relationship = arryRelat[0]; // } // else // { // Relationship = arryRelat[0] + "," + Relationship; // } // } // } // } // } // catch (Exception ex) // { // GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---7--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); // GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---7--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs); // } // } // } // if (string.IsNullOrEmpty(Relationship)) // { // Relationship = ""; // } // SearchCriteria.Relationship = Relationship; // } // #endregion #region Industry List if (chkAllIndustry.Checked == false) { string Industryvalue = string.Empty; string[] arrIndustry = Regex.Split(IndustryList, ","); foreach (string Industry in checkedListIndustry.CheckedItems) { foreach (string itemIndustry in arrIndustry) { try { string matchindstry = itemIndustry.Split(';')[0]; if (matchindstry == Industry) { string[] arryIndustry = Regex.Split(itemIndustry, ";"); if (arryIndustry.Length == 2) { if (!string.IsNullOrEmpty(arryIndustry[1])) { if (string.IsNullOrEmpty(Industryvalue)) { Industryvalue = arryIndustry[1]; } else { Industryvalue = Industryvalue + "," + arryIndustry[1]; } } } } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> arrIndustry 1 in Company filter search ---3--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> arrIndustry 1 in Company filter search ---3--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs); } } } SearchCriteria.IndustryType = Industryvalue; } #endregion #region Company size List if (chkAllCompanySize.Checked == false) { string companysizevalue = string.Empty; string[] arraycompnaysize = Regex.Split(companysizelist, ","); foreach (string companysize in checkedListCompanySize.CheckedItems) { foreach (string item in arraycompnaysize) { try { if (item.Contains(companysize)) { string[] ArrayCompnay = Regex.Split(item, ":"); if (!string.IsNullOrEmpty(ArrayCompnay[0])) { if (string.IsNullOrEmpty(companysizevalue)) { companysizevalue = ArrayCompnay[0]; } else { companysizevalue = companysizevalue + "," + ArrayCompnay[0]; } } } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() in Company filter search ---5--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() in Company filter search ---5--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs); } } } SearchCriteria.CompanySize = companysizevalue; } #endregion #region Follower List if (chkAllFolowers.Checked == false) { string Followervalue = string.Empty; string[] arrayFollowerList = Regex.Split(Followerlist, ","); foreach (string follower in checkedListFollowers.CheckedItems) { foreach (string item in arrayFollowerList) { try { string matchfollowitem = item.Split(':')[1]; if (matchfollowitem == follower) { string[] ArrayFollower = Regex.Split(item, ":"); if (!string.IsNullOrEmpty(ArrayFollower[0])) { if (string.IsNullOrEmpty(Followervalue)) { Followervalue = ArrayFollower[0]; } else { Followervalue = Followervalue + "," + ArrayFollower[0]; } } } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() in Company filter search ---4--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() in Company filter search ---4--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs); } } } SearchCriteria.Follower = Followervalue; } #endregion #region Fortune List if (chkAllFortune.Checked == false) { string Fortunevalue = string.Empty; string[] arrayFortuneList = Regex.Split(FortuneList, ","); foreach (string fortune in checkedListFortune.CheckedItems) { foreach (string item in arrayFortuneList) { try { if (item.Contains(fortune)) { string[] ArrayFortune = Regex.Split(item, ":"); if (!string.IsNullOrEmpty(ArrayFortune[0])) { if (string.IsNullOrEmpty(Fortunevalue)) { Fortunevalue = ArrayFortune[0]; } else { Fortunevalue = Fortunevalue + "," + ArrayFortune[0]; } } } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() in Company filter search ---5--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() in Company filter search ---5--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs); } } } SearchCriteria.Fortune1000 = Fortunevalue; } #endregion btnSearchScraper.Cursor = Cursors.AppStarting; new Thread(() => { StartLinkedInCompanySearch(); }).Start(); } catch { } } else { MessageBox.Show("Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection..."); AddLoggerScrapeUsers("[ " + DateTime.Now + " ] => [ Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection... ]"); } }
private void btnFollowCompany_Click(object sender, EventArgs e) { CheckNetConn = System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable(); if (CheckNetConn) { try { lstLinkedinFollowCompanyUrlThraed.Clear(); if (IsStop) { IsStop = false; } if (string.IsNullOrEmpty(txtNumberOfFollowPerAccount.Text)) { AddLoggerFollowCompanyUrl("[ " + DateTime.Now + " ] => [ Please enter No of Company Per Account ]"); txtNumberOfFollowPerAccount.Focus(); return; } if (!string.IsNullOrEmpty(txtNumberOfFollowPerAccount.Text)) { if (NumberHelper.ValidateNumber(txtNumberOfFollowPerAccount.Text)) { } else { AddLoggerFollowCompanyUrl("[ " + DateTime.Now + " ] => [ Invalid entry..please enter only numeric value ]"); return; } } if (LinkedInManager.linkedInDictionary.Count() == 0) { frmAccounts FrmAccount = new frmAccounts(); FrmAccount.Show(); return; } counter_AddFollowUrl = 0; AddLoggerFollowCompanyUrl("[ " + DateTime.Now + " ] => [ PROCESS START for Manage URL]"); if (LinkedinCompanyFollow.lstLinkedinCompanyURL.Count > 0) { new Thread(() => { LinkedInAddSearchCompany(); }).Start(); } else { } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Follow Company --> btnFollowCompany_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Follow Company --> btnFollowCompany_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinAddSearchGroupErrorLogs); } } else { MessageBox.Show("Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection..."); AddLoggerFollowCompanyUrl("[ " + DateTime.Now + " ] => [ Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection... ]"); } }
private void btnSearchConnection_Click(object sender, EventArgs e) { CheckNetConn = System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable(); if (CheckNetConn) { try { lstSearchconnectionThread.Clear(); if (IsStop) { IsStop = false; } if (chkUniqueConnectin.Checked) { txtNumberOfRequestPerKeyword.Enabled = false; ManageConnections.ConnectUsing_Search.UseuniqueConn = true; foreach (string itemKeyword in _lstConnectionSearchKeyword) { try { ManageConnections.ConnectUsing_Search.lstQueuKeywords.Enqueue(itemKeyword); } catch { } } } if ((LinkedInManager.linkedInDictionary.Count > 0 && _lstConnectionSearchKeyword.Count > 0 && (!string.IsNullOrEmpty(txtNumberOfRequestPerKeyword.Text)))) { counter_GroupMemberSearch = LinkedInManager.linkedInDictionary.Count; btnSearchConnection.Cursor = Cursors.AppStarting; new Thread(() => SearchConnectionKeywordThread()).Start(); } else if (_lstConnectionSearchKeyword.Count == 0) { MessageBox.Show("Please Add Keywords!"); AddLoggerManageConnection("[ " + DateTime.Now + " ] => [ Please Add Keywords! ]"); return; } else if ((string.IsNullOrEmpty(txtNumberOfRequestPerKeyword.Text))) { MessageBox.Show("Please Enter the Number Of ConnectionRequest!"); AddLoggerManageConnection("[ " + DateTime.Now + " ] => [ Please Enter the Number Of ConnectionRequest! ]"); return; } else if ((LinkedInManager.linkedInDictionary.Count == 0)) { MessageBox.Show("Please Load LinkedIn Accounts From MyAccounts Menu"); AddLoggerManageConnection("[ " + DateTime.Now + " ] => [ Please Load LinkedIn Accounts From MyAccounts Menu ]"); lbGeneralLogs.Items.Clear(); frmAccounts FrmAccount = new frmAccounts(); FrmAccount.Show(); return; } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Connection --> btnSearchConnection_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Connection --> btnSearchConnection_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinAddConnectionErrorLogs); } } else { MessageBox.Show("Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection..."); AddLoggerManageConnection("[ " + DateTime.Now + " ] => [ Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection... ]"); } }
private void btnSearchScraper_Click(object sender, EventArgs e) { CheckNetConn = System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable(); if (CheckNetConn) { try { try { SearchCriteria.starter = true; if (comboBoxemail.Items.Count <= 0) { AddLoggerScrapeUsers("[ " + DateTime.Now + " ] => [ Load The account From Menu and switch the tab and again come to InBoardProGetData Tab ]"); lbGeneralLogs.Items.Clear(); frmAccounts FrmAccount = new frmAccounts(); FrmAccount.Show(); return; } if (comboBoxemail.SelectedIndex < 0) { AddLoggerScrapeUsers("[ " + DateTime.Now + " ] => [ Select The Email Id From The Dropdown and Fill All Mandatory (*) Fields ]"); } if (string.IsNullOrEmpty(txtScraperExportFilename.Text)) { MessageBox.Show("Please Add any Name to Export File Name"); return; } AddLoggerScrapeUsers("[ " + DateTime.Now + " ] => [ Starting Scraping ]"); IsStop_InBoardProGetDataThread = false; lstInBoardProGetDataThraed.Clear(); if (combScraperLocation.SelectedIndex == 0) { SearchCriteria.Location = "I"; lblScraperCountry.Visible = true; CombScraperCountry.Visible = true; } else if (combScraperLocation.SelectedIndex == 1) { SearchCriteria.Location = "Y"; lblScraperCountry.Visible = false; CombScraperCountry.Visible = false; } foreach (KeyValuePair<string, string> item in CountryCode) { try { if (item.Value == CombScraperCountry.SelectedItem.ToString()) { SearchCriteria.Country = item.Key; break; } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> getting CountryCode ---1--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> getting CountryCode ---1--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs); } } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---1--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---1--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs); } #region AreaWiseLocation foreach (var item in listAreaLocation) { string getAreWiseCode = HttpHelper.getHtmlfromUrl1(new Uri("http://www.linkedin.com/ta/region?query=" + item.ToString())); int startindex = getAreWiseCode.IndexOf("\"id\":"); int startindex1 = getAreWiseCode.IndexOf("displayName"); //{"resultList":[{"id":"in:6498","headLine":"<strong>Bhilai<\/strong> Area, India","displayName":"Bhilai Area, India","subLine":""}]} if (startindex > 0) { try { string start = getAreWiseCode.Substring(startindex).Replace("\"id\":", string.Empty); int endindex = start.IndexOf(","); string end = start.Substring(0, endindex).Replace(":", "%3A").Replace("\"", ""); //SearchCriteria.LocationAreaCode = end.Replace(":", "%").Replace("\"", ""); string start1 = getAreWiseCode.Substring(startindex1).Replace("displayName", string.Empty); int endindex1 = start1.IndexOf("\",\""); string end1 = start1.Substring(0, endindex1).Replace(":", "").Replace("\"", ""); if (string.IsNullOrEmpty(SearchCriteria.LocationArea)) { SearchCriteria.LocationArea = end; } else { SearchCriteria.LocationArea = SearchCriteria.LocationArea + "," + end; } string contrycd = end.Split('%')[0].Replace("3A", string.Empty); if (contrycd != SearchCriteria.Country) { AddLoggerScrapeUsers("[ " + DateTime.Now + " ] => [ Wrong Selection of Country or Your Area Location is not matched the country ]"); return; } else { AddLoggerScrapeUsers("[ " + DateTime.Now + " ] => [ Added Area Location: " + end1.ToString() + " ]"); } } catch { } } } #endregion #region Industry List string Industryvalue = string.Empty; string[] arrIndustry = Regex.Split(IndustryList, ","); foreach (string Industry in checkedListBoxIndustry.CheckedItems) { foreach (string itemIndustry in arrIndustry) { try { if (itemIndustry.Contains(Industry)) { string[] arryIndustry = Regex.Split(itemIndustry, ";"); if (arryIndustry.Length == 2) { if (!string.IsNullOrEmpty(arryIndustry[1])) { if (string.IsNullOrEmpty(Industryvalue)) { Industryvalue = arryIndustry[1]; } else { Industryvalue = Industryvalue + "," + arryIndustry[1]; } } } } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> arrIndustry 1 ---2--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> arrIndustry 1 ---2--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs); } } } //if (string.IsNullOrEmpty(Industryvalue)) //{ // Industryvalue = "select-all"; //} SearchCriteria.IndustryType = Industryvalue; #endregion #region Company size List string companysizevalue = string.Empty; string[] arraycompnaysize = Regex.Split(companysizelist, ","); foreach (string companysize in checkedListBoxCompanySize.CheckedItems) { foreach (string item in arraycompnaysize) { try { if (item.Split(':')[1] == companysize) { string[] ArrayCompnay = Regex.Split(item, ":"); if (!string.IsNullOrEmpty(ArrayCompnay[0])) { if (string.IsNullOrEmpty(companysizevalue)) { companysizevalue = ArrayCompnay[0]; } else { companysizevalue = companysizevalue + "," + ArrayCompnay[0]; } } //break; } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---3--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---3--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs); } } //break; } if (companysizevalue == "all") { SearchCriteria.CompanySize = string.Empty; } else { SearchCriteria.CompanySize = companysizevalue; } #endregion #region Group List string Groupsvalue = string.Empty; foreach (string Groups in checkedListGroups.CheckedItems) { //foreach (var item1 in GroupStatus.GroupMemUrl) //{ // string[] grp = item1.Split(':'); // if (SelUser[1] == grp[0]) // { // SpeGroupId = grp[2]; // break; // } //} foreach (var item in GroupStatus.GroupMemUrl) { try { string[] grp = item.Split(':'); if (grp[0].Equals(Groups)) { if (!string.IsNullOrEmpty(grp[2])) { if (string.IsNullOrEmpty(Groupsvalue)) { Groupsvalue = grp[2]; } else { Groupsvalue = Groupsvalue + "," + grp[2]; } } } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---4--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---4--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs); } } } SearchCriteria.Group = Groupsvalue; #endregion #region Senority List if (SearchCriteria.AccountType == "RecuiterType") { senioritylevel = senioritylevelRecruiterType; } string Seniorlevelvalue = string.Empty; string[] senoirLevelList = Regex.Split(senioritylevel, ","); foreach (string Seniorlevel in checkedListBoxSeniorlevel.CheckedItems) { foreach (string itemSeniorLevel in senoirLevelList) { try { if (itemSeniorLevel.Contains(Seniorlevel)) { string[] arrysenoirLevel = Regex.Split(itemSeniorLevel, ":"); if (arrysenoirLevel.Length == 2) { if (!string.IsNullOrEmpty(arrysenoirLevel[0])) { if (string.IsNullOrEmpty(Seniorlevelvalue)) { Seniorlevelvalue = arrysenoirLevel[0]; } else { Seniorlevelvalue = Seniorlevelvalue + "," + arrysenoirLevel[0]; } } } } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> arrIndustry 1 ---2--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> arrIndustry 1 ---2--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs); } } } if (Seniorlevelvalue == "all") { SearchCriteria.SeniorLevel = string.Empty; } else { SearchCriteria.SeniorLevel = Seniorlevelvalue; } #endregion #region Language List string language = string.Empty; string[] arrLang = Regex.Split(Language, ","); foreach (string LanguageL in checkedListBoxLanguage.CheckedItems) { foreach (string item in arrLang) { try { if (item.Contains(LanguageL)) { string[] arryLang = Regex.Split(item, ";"); if (arryLang.Length == 2) { if (!string.IsNullOrEmpty(arryLang[1])) { if (string.IsNullOrEmpty(language)) { language = arryLang[1]; } else { language = language + "," + arryLang[1]; } } } } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---6--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---6--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs); } } } if (string.IsNullOrEmpty(language)) { //language = "select-all"; language = ""; } SearchCriteria.language = language; #endregion #region Relationship List string Relationship = string.Empty; string[] arrRelation = Regex.Split(RelationshipList, ","); foreach (string RelationL in checkedListRelationship.CheckedItems) { foreach (string item in arrRelation) { try { if (item.Contains(RelationL)) { string[] arryRelat = Regex.Split(item, ":"); if (arryRelat.Length == 2) { if (!string.IsNullOrEmpty(arryRelat[0])) { if (string.IsNullOrEmpty(Relationship)) { Relationship = arryRelat[0]; } else { Relationship = arryRelat[0] + "," + Relationship; } } } } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---7--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---7--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs); } } } if (Relationship == "N") { SearchCriteria.Relationship = string.Empty; } else { SearchCriteria.Relationship = Relationship; } #endregion #region Function List string Function = string.Empty; if (SearchCriteria.AccountType == "RecuiterType") { Functionlist = Functionlistrecruiter; } string[] FunctionList = Regex.Split(Functionlist, ","); foreach (string FunctionL in checkedListFunction.CheckedItems) { foreach (string itemFunction in FunctionList) { try { if (itemFunction.Contains(FunctionL)) { string[] functionItem = Regex.Split(itemFunction, ":"); if (!string.IsNullOrEmpty(functionItem[0])) { if (string.IsNullOrEmpty(Function)) { Function = functionItem[0]; } else { Function = Function + "," + functionItem[0]; } } } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---8--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---8--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs); } } } if (Function == "all") { SearchCriteria.Function = string.Empty; } else { SearchCriteria.Function = Function; } #endregion #region IntrestedIn string InterestedIn = string.Empty; string[] IntrestesList = Regex.Split(IntrestedinList, ","); foreach (string InterestedL in checkedListBoxInterestedIN.CheckedItems) { foreach (string Intresteditem in IntrestesList) { try { if (Intresteditem.Contains(InterestedL)) { string[] arrayIntrst = Regex.Split(Intresteditem, ":"); if (!string.IsNullOrEmpty(Intresteditem)) { if (string.IsNullOrEmpty(InterestedIn)) { InterestedIn = arrayIntrst[0]; } else { InterestedIn = InterestedIn + "," + arrayIntrst[0]; } } } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---9--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---9--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs); } } } if (InterestedIn == "select-all") { SearchCriteria.InerestedIn = string.Empty; } else { SearchCriteria.InerestedIn = InterestedIn; } #endregion #region Explerience list string TotalExperience = string.Empty; string[] arratExpericne = Regex.Split(expList, ","); foreach (string YearOfExperienceL in GetDataForPrimiumAccount.CheckedItems) { foreach (string itemExp in arratExpericne) { try { if (itemExp.Contains(YearOfExperienceL)) { string[] arrayitem = Regex.Split(itemExp, ":"); if (!string.IsNullOrEmpty(arrayitem[1])) { if (string.IsNullOrEmpty(TotalExperience)) { TotalExperience = arrayitem[0]; } else { TotalExperience = TotalExperience + "," + arrayitem[0]; } } } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---10--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---10--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs); } } } if (TotalExperience == "select-all") { SearchCriteria.YearOfExperience = string.Empty; } else { SearchCriteria.YearOfExperience = TotalExperience; } #endregion #region Recently Joined string RecentlyJoined = string.Empty; string[] RecetlyJoinedArr = Regex.Split(RecentlyjoinedList, ","); foreach (string RecentlyJoinedL in checkedListBoxRecentlyJoined.CheckedItems) { foreach (string item in RecetlyJoinedArr) { try { string[] arrayitem = Regex.Split(item, ":"); if (item.Contains(RecentlyJoinedL)) { if (!string.IsNullOrEmpty(arrayitem[0])) { if (string.IsNullOrEmpty(RecentlyJoined)) { RecentlyJoined = arrayitem[0]; } else { RecentlyJoined = RecentlyJoined + "," + arrayitem[0]; } } } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---11--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---11--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs); } } } if (RecentlyJoined == "select-all") { SearchCriteria.RecentlyJoined = string.Empty; } else { SearchCriteria.RecentlyJoined = RecentlyJoined.Trim(); } #endregion #region Fortune List string Fortune1000 = string.Empty; string[] FortuneArr = Regex.Split(fortuneList, ","); foreach (string Fortune1000L in checkedListBoxFortune1000.CheckedItems) { foreach (string item in FortuneArr) { try { string[] arrayItem = Regex.Split(item, ":"); if (item.Contains(Fortune1000L)) { if (!string.IsNullOrEmpty(arrayItem[0])) { if (string.IsNullOrEmpty(Fortune1000)) { Fortune1000 = arrayItem[0]; } else { Fortune1000 = Fortune1000 + "," + arrayItem[0]; } } } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---12--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---12--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs); } } } if (RecentlyJoined == "select-all") { SearchCriteria.Fortune1000 = string.Empty; } else { SearchCriteria.Fortune1000 = Fortune1000; } #endregion #region Within the PostalCode try { string[] arraywithinList = Regex.Split(WithingList, ","); foreach (string item in arraywithinList) { if (item.Contains(cmbboxWithin.SelectedItem.ToString())) { string[] arrayWithin = Regex.Split(item, ":"); SearchCriteria.within = arrayWithin[0]; } } } catch (Exception ex) { } #endregion #region within Title value try { string[] arrayTitleList = Regex.Split(TitleValue, ","); foreach (string item in arrayTitleList) { string[] arrayTitleValue = Regex.Split(item, ":"); if (arrayTitleValue[1] == cmbboxTitle.SelectedItem.ToString()) { SearchCriteria.TitleValue = arrayTitleValue[0]; } } } catch (Exception ex) { } #endregion #region within Companyvalue try { if (cmbboxCompanyValue.Enabled == true) { string[] arrayTitleList = Regex.Split(TitleValue, ","); foreach (string item in arrayTitleList) { string[] arrayTitleValue = Regex.Split(item, ":"); if (arrayTitleValue[1] == cmbboxCompanyValue.SelectedItem.ToString()) { SearchCriteria.CompanyValue = arrayTitleValue[0]; } } } } catch (Exception ex) { } #endregion SearchCriteria.FileName = (txtScraperExportFilename.Text).Replace("\"", string.Empty).Replace(",", string.Empty).ToString(); SearchCriteria.FirstName = txtScrperFirstname.Text; SearchCriteria.LastName = txtScrperlastname.Text; SearchCriteria.Keyword = txtKeyword.Text; SearchCriteria.Title = txtTitle.Text; if (SearchCriteria.Keyword.Contains("or") || (SearchCriteria.Keyword.Contains("and")) || (SearchCriteria.Keyword.Contains("not"))) { try { SearchCriteria.Keyword = SearchCriteria.Keyword.Replace(" or ", " OR "); SearchCriteria.Keyword = SearchCriteria.Keyword.Replace(" and ", " AND "); SearchCriteria.Keyword = SearchCriteria.Keyword.Replace(" not ", " NOT "); } catch { } } if (SearchCriteria.Title.Contains("or") || (SearchCriteria.Title.Contains("and")) || (SearchCriteria.Title.Contains("not"))) { try { SearchCriteria.Title = SearchCriteria.Title.Replace(" or ", " OR "); SearchCriteria.Title = SearchCriteria.Title.Replace(" and ", " AND "); SearchCriteria.Title = SearchCriteria.Title.Replace(" not ", " NOT "); } catch { } } if (!string.IsNullOrEmpty(txtPostalcode.Text)) { SearchCriteria.PostalCode = txtPostalcode.Text; } if (!string.IsNullOrEmpty(txtCompnayName.Text)) { SearchCriteria.Company = txtCompnayName.Text; } if (CombScraperCountry.SelectedItem.ToString() != null && CombScraperCountry.SelectedIndex > 0) { try { if (!string.IsNullOrEmpty(CombScraperCountry.SelectedItem.ToString())) { string countryValue = string.Empty; string temCOuntry = CombScraperCountry.SelectedItem.ToString(); GetCountryNameValue(ref temCOuntry, ref countryValue); SearchCriteria.Country = countryValue; } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---13--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---13--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs); } } if (string.IsNullOrEmpty(txtScraperMinimumDelay.Text) || string.IsNullOrEmpty(txtScraperMaximumDelay.Text)) { MessageBox.Show("Please enter proper delay time."); return; } else { SearchCriteria.scraperMinDelay = Convert.ToInt32(txtScraperMinimumDelay.Text.Trim()); SearchCriteria.scraperMaxDelay = Convert.ToInt32(txtScraperMaximumDelay.Text.Trim()); } btnSearchScraper.Cursor = Cursors.AppStarting; new Thread(() => { StartInBoardProGetData(); }).Start(); } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---13--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---13--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs); } } else { MessageBox.Show("Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection..."); AddLoggerScrapeUsers("[ " + DateTime.Now + " ] => [ Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection... ]"); } }
private void btnSendEmailInvite_Click(object sender, EventArgs e) { CheckNetConn = System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable(); if (CheckNetConn) { try { lstSearchconnectionThread.Clear(); if (IsStop) { IsStop = false; } if (_lstConnectionSearchKeyword.Count == 0) { MessageBox.Show("Please Add Keywords!"); AddLoggerManageConnection("[ " + DateTime.Now + " ] => [ Please Add Keywords! ]"); return; } else if (txtInviteMsg.Text.Contains("|")) { if (!(chkUseSpintax_InviteMessage.Checked)) { AddLoggerManageConnection("[ " + DateTime.Now + " ] => [ Please Check SpinTax CheckBox.. ]"); MessageBox.Show("Please Check SpinTax CheckBox.."); return; } if (txtInviteMsg.Text.Contains("{") || txtInviteMsg.Text.Contains("}")) { AddLoggerManageConnection("[ " + DateTime.Now + " ] => [ Its a wrong SpinTax Format.. ]"); MessageBox.Show("Its a wrong SpinTax Format.."); return; } } if (chkUseSpintax_InviteMessage.Checked) { ConnectUsingSearchKeywod.isSpinTaxSearchWithInvite = true; ConnectUsingSearchKeywod.UpdatelistGreetMessatge = SpinnedListGenerator.GetSpinnedList(new List<string> { txtInviteMsg.Text }); } if (!string.IsNullOrEmpty(txt_campNoOfRetweetsParAc.Text) && NumberHelper.ValidateNumber(txt_campNoOfRetweetsParAc.Text)) { SearchCriteria.NumberOfRequestPerKeyword = Convert.ToInt32(txt_campNoOfRetweetsParAc.Text); } if ((LinkedInManager.linkedInDictionary.Count > 0 && !string.IsNullOrEmpty(txtInviteKeyword.Text.ToString()))) { counter_GroupMemberSearch = LinkedInManager.linkedInDictionary.Count; btnSearchKeyword.Cursor = Cursors.AppStarting; new Thread(() => SearchConnectionKeywordThread()).Start(); } else if (string.IsNullOrEmpty(txtInviteKeyword.Text.ToString())) { MessageBox.Show("Please Enter Keywords for search !"); AddLoggerManageConnection("[ " + DateTime.Now + " ] => [ Please Enter Keywords for search ! ]"); return; } else if ((LinkedInManager.linkedInDictionary.Count == 0)) { MessageBox.Show("Please Load LinkedIn Accounts From MyAccounts Menu"); AddLoggerManageConnection("[ " + DateTime.Now + " ] => [ Please Load LinkedIn Accounts From MyAccounts Menu ]"); frmAccounts FrmAccount = new frmAccounts(); FrmAccount.Show(); return; } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Connection --> btnSearchConnection_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Connection --> btnSearchConnection_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinAddConnectionErrorLogs); } } else { MessageBox.Show("Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection..."); AddLoggerManageConnection("[ " + DateTime.Now + " ] => [ Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection... ]"); } }
private void btnCreateOpenGroup_Click(object sender, EventArgs e) { CheckNetConn = System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable(); if (CheckNetConn) { try { lstworkingThread.Clear(); if (IsStop) { IsStop = false; } if (!NumberHelper.ValidateNumber(txtGroupCreateMinDelay.Text)) { AddLoggerSearchGroup("[ " + DateTime.Now + " ] => [ Please Enter Valid Value in Minimum Delay ]"); MessageBox.Show("Please Enter Valid Value in Minimum Delay"); txtGroupCreateMinDelay.Focus(); return; } else if (!NumberHelper.ValidateNumber(txtGroupCreateMaxDelay.Text)) { AddLoggerSearchGroup("[ " + DateTime.Now + " ] => [ Please Enter Valid Value in Maximum Delay ]"); MessageBox.Show("Please Enter Valid Value in Maximum Delay"); txtGroupCreateMaxDelay.Focus(); return; } if (LinkedInManager.linkedInDictionary.Count() > 0 && lstLogoImage.Count > 0 && listGroupName.Count > 0 && listDesciption.Count > 0 && listSummary.Count > 0 && cmbLanguage.SelectedIndex > -1 && cmbGroupType.SelectedIndex > -1) { try { clsSettingDB ObjclsSettingDB = new clsSettingDB(); ObjclsSettingDB.InsertOrUpdateSetting("GroupCreator", "GroupName", StringEncoderDecoder.Encode(txtGroupName.Text)); ObjclsSettingDB.InsertOrUpdateSetting("GroupCreator", "GroupSummary", StringEncoderDecoder.Encode(txtSummary.Text)); ObjclsSettingDB.InsertOrUpdateSetting("GroupCreator", "GroupDescription", StringEncoderDecoder.Encode(txtDesc.Text)); ObjclsSettingDB.InsertOrUpdateSetting("GroupCreator", "GroupWebsite", StringEncoderDecoder.Encode(txtWebsite.Text)); } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnCreateOpenGroup_Click --> Storing Default File() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnCreateOpenGroup_Click --> Storing Default File() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinCreateGroupErrorLogs); } if (chkboxCreateOpenGrp.Checked) { SearchCriteria.CreateGroupStatus = "Open"; AddLoggerCreateGroup("[ " + DateTime.Now + " ] => [ Starting Open Group Creation ]"); } else if (chkboxCreateMemGrp.Checked) { SearchCriteria.CreateGroupStatus = "Member"; AddLoggerCreateGroup("[ " + DateTime.Now + " ] => [ Starting Member only Group Creation ]"); } try { string[] array = Regex.Split(GroupType, ";"); foreach (string item in array) { if (item.Contains(cmbGroupType.SelectedItem.ToString())) { string[] newArray = Regex.Split(item, ":"); SearchCriteria.GroupType = newArray[1]; } } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Create Group --> btnCreateOpenGroup_Click() ---cmbGroupType.SelectedItem--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Create Group --> btnCreateOpenGroup_Click() ---cmbGroupType.SelectedItem--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinCreateGroupErrorLogs); } try { Dictionary<string, string> GroupLanguage = new Dictionary<string, string>(); GroupLanguage = ObjSelectMethod.getLangauge(); string language = string.Empty; foreach (KeyValuePair<string, string> pair in GroupLanguage) { string CheckedString = cmbLanguage.SelectedItem.ToString(); if (CheckedString == pair.Key) { language = pair.Value; SearchCriteria.GroupLang = language; } } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Create Group --> btnCreateOpenGroup_Click() ---cmbLanguage.SelectedItem--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Create Group --> btnCreateOpenGroup_Click() ---cmbLanguage.SelectedItem--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinCreateGroupErrorLogs); } try { foreach (string item in listGroupName) { Que_Grpname_Post.Enqueue(item); } } catch { } try { foreach (string item in listDesciption) { Que_GrpDesc_Post.Enqueue(item); } } catch { } try { foreach (string item in listSummary) { Que_GrpSummary_Post.Enqueue(item); } } catch { } try { foreach (string item in listWebsite) { Que_Grpwebsite_Post.Enqueue(item); } } catch { } btnCreateOpenGroup.Cursor = Cursors.AppStarting; if (string.IsNullOrEmpty(txtCountPerAccount.Text)) { MessageBox.Show("Please enter the number of groups to be created per account"); AddLoggerCreateGroup("[ " + DateTime.Now + " ] => [ Please enter the number of groups to be created per account ]"); return; } new Thread(() => { LinkdinCreateGroup(); }).Start(); } else { if (LinkedInManager.linkedInDictionary.Count() == 0) { MessageBox.Show("Please Load LinkedIn Accounts From MyAccounts Menu"); AddLoggerCreateGroup("[ " + DateTime.Now + " ] => [ Please Load LinkedIn Accounts From MyAccounts Menu ]"); lbGeneralLogs.Items.Clear(); frmAccounts FrmAccount = new frmAccounts(); FrmAccount.Show(); return; } if (lstLogoImage.Count <= 0) { MessageBox.Show("Please Add Logo.."); AddLoggerCreateGroup("[ " + DateTime.Now + " ] => [ Please Add Logo.. ]"); txtGroupLogo.Focus(); return; } else if (listGroupName.Count <= 0) { MessageBox.Show("Please Add GroupName.."); AddLoggerCreateGroup("[ " + DateTime.Now + " ] => [ Please Add GroupName.. ]"); txtGroupName.Focus(); return; } else if (listSummary.Count <= 0) { MessageBox.Show("Please Add SelectGroupSummary.."); AddLoggerCreateGroup("[ " + DateTime.Now + " ] => [ Please Add SelectGroupSummary..]"); txtSummary.Focus(); return; } else if (listDesciption.Count <= 0) { MessageBox.Show("Please Add GroupDesciption.."); AddLoggerCreateGroup("[ " + DateTime.Now + " ] => [ Please Add GroupDesciption.. ]"); txtDesc.Focus(); return; } else if (cmbLanguage.SelectedIndex == -1) { MessageBox.Show("Please Select Language.."); AddLoggerCreateGroup("[ " + DateTime.Now + " ] => [ Please Select Language.. ]"); cmbLanguage.Focus(); return; } else if (cmbGroupType.SelectedIndex == -1) { MessageBox.Show("Please Select GroupType.."); AddLoggerCreateGroup("[ " + DateTime.Now + " ] => [ Please Select GroupType.. ]"); cmbGroupType.Focus(); return; } } } catch { } } else { MessageBox.Show("Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection..."); AddLoggerCreateGroup("[ " + DateTime.Now + " ] => [ Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection... ]"); } }
private void LoadPreScrapper() { try { if (LinkedInManager.linkedInDictionary.Count() == 0) { MessageBox.Show("Please Load LinkedIn Accounts From MyAccounts Menu"); AddLoggerStatusUpdate("[ " + DateTime.Now + " ] => [ Please Load LinkedIn Accounts From MyAccounts Menu ]"); lbGeneralLogs.Items.Clear(); frmAccounts FrmAccount = new frmAccounts(); FrmAccount.Show(); return; } else { try { //Thread obj_PopulateCmo = new Thread(PopulateCmo); //obj_PopulateCmo.Start(); PopulateCmo(); } catch { } } } catch { } }
private void btnCompanyEmployeeSearch_Click(object sender, EventArgs e) { CheckNetConn = System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable(); //LinkedinSearch obj_LinkedinSearch = new LinkedinSearch(); if (CheckNetConn) { #region country code foreach (KeyValuePair<string, string> item in CountryCode) { try { if (item.Value == CombScraperCountry.SelectedItem.ToString()) { SearchCriteria.Country = item.Key; break; } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> getting CountryCode ---1--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> getting CountryCode ---1--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs); } } #endregion #region MyRegion SearchCriteria.Keyword = txtKeyword.Text.ToString(); #endregion try { SearchCriteria.starter = true; if (comboBoxemail.Items.Count <= 0) { AddLoggerCompanyEmployeeSearch("[ " + DateTime.Now + " ] => [ Load The account From Menu and switch the tab and again come to InBoardProGetData Tab ]"); frmAccounts FrmAccount = new frmAccounts(); FrmAccount.Show(); return; } if (comboBoxemail.SelectedIndex < 0) { AddLoggerCompanyEmployeeSearch("[ " + DateTime.Now + " ] => [ Select The Email Id From The Dropdown and Fill All Mandatory (*) Fields ]"); } if (string.IsNullOrEmpty(txtCompanyEmployeeScraperURL.Text)) { AddLoggerCompanyEmployeeSearch("[ " + DateTime.Now + " ] => [ Please upload URL ]"); return; } AddLoggerCompanyEmployeeSearch("[ " + DateTime.Now + " ] => [ Starting Scraping ]"); IsStop_CompanyEmployeeScraperThread = false; lstCompanyEmployeeScraperThread.Clear(); Thread thread_CompanyEmployeeSearch = new Thread(StartCompanyEmployeeSearch); thread_CompanyEmployeeSearch.Start(); } catch { } } }
private void BindData_LinkedinSearch_cmbEmailId(object parameters) { try { try { Array paramsArray = new object[2]; paramsArray = (Array)parameters; string strTbtoSelect = (string)paramsArray.GetValue(0); ComboBox cmo = (ComboBox)paramsArray.GetValue(1); if (LinkedInManager.linkedInDictionary.Count() == 0) { this.Invoke(new MethodInvoker(delegate { lbGeneralLogs.Items.Clear(); frmAccounts FrmAccount = new frmAccounts(); FrmAccount.Show(); //tabMain.SelectTab("LinkedinSearch"); //tabMain.SelectedTab.Show(); // This condition is failed if there is No Accounts Uploaded in LinkedIn Accounts ! //tabMai.SelectTab(strTbtoSelect); //tabMai.SelectedTab.Show(); return; })); } else { try { //Thread obj_PopulateCmo = new Thread(PopulateCmo); //obj_PopulateCmo.Start(); PopulateCmo(); BindData_LinkedinSearch(cmo); } catch { } } } catch { } } catch { } }
private void btnAddSearchGroup_Click(object sender, EventArgs e) { CheckNetConn = System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable(); if (CheckNetConn) { try { SearchGroup = "Start"; if (!string.IsNullOrEmpty(txtBoxGroupCount.Text) && NumberHelper.ValidateNumber(txtBoxGroupCount.Text)) { Groups.JoinSearchGroup.BoxGroupCount = Convert.ToInt32(txtBoxGroupCount.Text); } else { if (string.IsNullOrEmpty(txtBoxGroupCount.Text)) { } else { MessageBox.Show("Enter No. of Group in Numeric Form !"); return; } } lstJoinSearchGroupThread.Clear(); if (IsStop) { IsStop = false; } if (LinkedInManager.linkedInDictionary.Count == 0) { MessageBox.Show("Please Load LinkedIn Accounts From MyAccounts Menu"); AddLoggerSearchGroup("[ " + DateTime.Now + " ] => [ Please Load LinkedIn Accounts From MyAccounts Menu ]"); lbGeneralLogs.Items.Clear(); frmAccounts FrmAccount = new frmAccounts(); FrmAccount.Show(); return; } else if (txtSearchKeyword.Text == string.Empty) { AddLoggerSearchGroup("[ " + DateTime.Now + " ] => [ Please Enter Keyword to Search.. ]"); MessageBox.Show("Please Enter Keyword to Search.."); txtSearchKeyword.Focus(); return; } else if (txtBoxGroupCount.Text == string.Empty) { AddLoggerSearchGroup("[ " + DateTime.Now + " ] => [ Please Enter Number of Groups.. ]"); MessageBox.Show("Please Enter Number of Groups.."); txtBoxGroupCount.Focus(); return; } else if (Convert.ToInt32(txtBoxGroupCount.Text) < 1) { AddLoggerSearchGroup("[ " + DateTime.Now + " ] => [ Please Enter Minimum Number of 1 Group.. ]"); MessageBox.Show("Please Enter Minimum Number of 1 Group.."); txtBoxGroupCount.Focus(); return; } listLoggerSearchGroup.Items.Clear(); chkListSearchGroup.Items.Clear(); cmbSearchGroup.Items.Clear(); LinkdInContacts.Clear(); AddLoggerSearchGroup("[ " + DateTime.Now + " ] => [ Starting Search for Groups.. ]"); btnAddSearchGroup.Cursor = Cursors.AppStarting; new Thread(() => { LinkedInOpenGroupSearch(); }).Start(); } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Search Groups --> btnAddSearchGroup_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Search Groups --> btnAddSearchGroup_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinAddSearchGroupErrorLogs); } } else { MessageBox.Show("Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection..."); AddLoggerSearchGroup("[ " + DateTime.Now + " ] => [ Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection... ]"); } }