//*********Manage Connetion with search keword*****************// #region btnKeywordLoadFile_Click private void btnKeywordLoadFile_Click(object sender, EventArgs e) { try { using (OpenFileDialog ofd = new OpenFileDialog()) { ofd.Filter = "Text Files (*.txt)|*.txt"; ofd.InitialDirectory = Application.StartupPath; if (ofd.ShowDialog() == DialogResult.OK) { txtKeywordLoad.Text = ofd.FileName; CampainGroupCreate.Campaign_lstConnectionSearchKeyword.Clear(); List <string> templist = GlobusFileHelper.ReadFiletoStringList(ofd.FileName); foreach (string item in templist) { if (!CampainGroupCreate.Campaign_lstConnectionSearchKeyword.Contains(item)) { if (!string.IsNullOrEmpty(item.Replace(" ", "").Replace("\t", ""))) { CampainGroupCreate.Campaign_lstConnectionSearchKeyword.Add(item); //SearchCriteria.Que_Keyword.Enqueue(item); } } } } AddLoggerLinkedInProfileManager("[ " + DateTime.Now + " ] => [ " + CampainGroupCreate.Campaign_lstConnectionSearchKeyword.Count + " Keywords Loaded ]"); } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Connection --> btnKeywordLoadFile_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs); GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Connection --> btnKeywordLoadFile_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinAddConnectionErrorLogs); } }
private void btnSet_Click(object sender, EventArgs e) { try { Globals.DesktopFolder = txtExportLocation.Text; string path = string.Empty; path = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\InBoardPro\\LDDefaultFolderPath.txt"; using (StreamWriter sw = new StreamWriter(path)) { sw.Write(""); } GlobusFileHelper.AppendStringToTextfileNewLine(txtExportLocation.Text, Globals.Path_LinkedinDefaultSave); List <string> defaultpath = new List <string>(); if (MessageBox.Show("Export Location Is >>>" + Globals.DesktopFolder, "Notification", MessageBoxButtons.OK) == DialogResult.OK) { defaultpath = GlobusFileHelper.ReadFiletoStringList(Globals.Path_LinkedinDefaultSave); txtExportLocation.Text = defaultpath[0]; this.Close(); } } catch { } }
public void LoadStatusHeader() { try { Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog(); dlg.DefaultExt = ".txt"; dlg.Filter = "Text documents (.txt)|*.txt"; Nullable <bool> result = dlg.ShowDialog(); GlobalsGroups.lstStatusHeader = GlobusFileHelper.ReadFiletoStringList(dlg.FileName); Application.Current.Dispatcher.Invoke(new Action(() => { txt_GroupStatusUpdate_StatusHeader.Text = dlg.FileName; })); GlobusLogHelper.log.Info("Headers uploaded : " + GlobalsGroups.lstStatusHeader.Count); foreach (var item in GlobalsGroups.lstStatusHeader) { if (item.Length < 200) { GlobalsGroups.ListGrpDiscussion.Add(item); } else { GlobusLogHelper.log.Info("Item length exceeded 200"); } } } catch (Exception ex) { } }
private void btnstart_Click(object sender, EventArgs e) { if (validate_data()) { return; } //keyword = readfiles.ReadSearchfile("sumit"); //spamlist = readfiles.ReadSpamfile("sumit"); keyword = GlobusFileHelper.ReadFiletoStringList(Application.StartupPath + "\\search.txt"); spamlist = GlobusFileHelper.ReadFiletoStringList(Application.StartupPath + "\\spamurls.txt"); if (!File.Exists(Application.CommonAppDataPath + "\\yahoo_Details.txt")) { string strUserDetails = txtyahooid.Text + ":" + txtyahoopassword.Text; GlobusFileHelper.WriteStringToTextfile(strUserDetails, Application.CommonAppDataPath + "\\yahoo_Details.txt"); } foreach (string link in keyword) { List <string> templist = new List <string>(); List <string> tempspamlist = new List <string>(); crawlyahoolink.loginyahoo(txtyahooid.Text, txtyahoopassword.Text); templist = crawlyahoolink.FetchLinksToSearch(link); tempspamlist = crawlyahoolink.checkpagforspam(spamlist, templist); } }
public void LoadKeywords() { try { Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog(); dlg.DefaultExt = ".txt"; dlg.Filter = "Text documents (.txt)|*.txt"; Nullable <bool> result = dlg.ShowDialog(); //txt_AddConn_Keyword.Text = dlg.FileName; GlobalsAddConn.lst_keyWords_for_AddConnection.Clear(); List <string> templist = GlobusFileHelper.ReadFiletoStringList(dlg.FileName); foreach (string item in templist) { if (!GlobalsAddConn.lst_keyWords_for_AddConnection.Contains(item)) { if (!string.IsNullOrEmpty(item.Replace(" ", "").Replace("\t", ""))) { GlobalsAddConn.lst_keyWords_for_AddConnection.Add(item); } } } Application.Current.Dispatcher.Invoke(new Action(() => { txt_AddConn_Keyword.Text = dlg.FileName; })); } catch (Exception ex) { } }
private void frmChangeDefaultFolderPath_Load(object sender, EventArgs e) { image = Properties.Resources.background; List <string> defaultpath = new List <string>(); try { defaultpath = GlobusFileHelper.ReadFiletoStringList(Globals.Path_LinkedinDefaultSave); txtExportLocation.Text = defaultpath[0]; } catch { } }
public void LoadJobUrls() { try { Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog(); dlg.DefaultExt = ".txt"; dlg.Filter = "Text documents (.txt)|*.txt"; Nullable <bool> result = dlg.ShowDialog(); GlobalsScraper.lstUrlJobScraper = GlobusFileHelper.ReadFiletoStringList(dlg.FileName); } catch (Exception ex) { } }
public void LoadComnpanyUrls() { try { Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog(); dlg.DefaultExt = ".txt"; dlg.Filter = "Text documents (.txt)|*.txt"; Nullable <bool> result = dlg.ShowDialog(); GlobalsScraper.lstUrlCompanyEmpScraper = GlobusFileHelper.ReadFiletoStringList(dlg.FileName); GlobusLogHelper.log.Info("Number of urls uploaded : " + GlobalsScraper.lstUrlCompanyEmpScraper.Count); } catch (Exception ex) { } }
private void button3_Click(object sender, EventArgs e) { try { using (OpenFileDialog ofd = new OpenFileDialog()) { ofd.Filter = "Text Files (*.txt)|*.txt"; ofd.InitialDirectory = Application.StartupPath; if (ofd.ShowDialog() == DialogResult.OK) { textBox1.Text = ofd.FileName; List <string> templist = GlobusFileHelper.ReadFiletoStringList(ofd.FileName); templist = templist.Distinct().ToList(); ///Modified [1.0.0.3] //lstMessage = new List<string>(); foreach (string item in templist) { //if (!lstMessage.Contains(item)) { lstMessage.Add(item); } } //Console.WriteLine(lstGrpKeywords.Count + " Group Keywords loaded"); AddToReplyInterfaceLog("[ " + DateTime.Now + " ] => [ " + lstMessage.Count + " Message Loaded ! ]"); //AddToGrpPages(lstGrpKeywords.Count + " Group Keywords loaded"); //Save the file if ((lstMessage.Count > 0) && (!string.IsNullOrEmpty(textBox1.Text))) { try { objclsSettingDB.InsertOrUpdateSetting("MentionReplyInterface", "Message", StringEncoderDecoder.Encode(textBox1.Text)); } catch { } } } } BindDataIntoDropDownList(); } catch { } }
private void btn_AccountDetails_Click(object sender, EventArgs e) { using (FolderBrowserDialog ofd = new FolderBrowserDialog()) { ofd.SelectedPath = Application.StartupPath + "\\Profile\\Pics"; if (ofd.ShowDialog() == DialogResult.OK) { //SET FILE PATH IN TEXT BOX.. txt_AccountDetailsFilePath.Text = ofd.SelectedPath; MixedCampaignManager.classes.AccountCreatorEntities._AccountdeatilsFolderPath = ofd.SelectedPath; if (!string.IsNullOrEmpty(MixedCampaignManager.classes.AccountCreatorEntities._AccountdeatilsFolderPath)) { #region GET ALL FILE FROM FOLDER.. string[] Files = Directory.GetFiles(MixedCampaignManager.classes.AccountCreatorEntities._AccountdeatilsFolderPath); foreach (string file in Files) { if ((file.Contains("UserName.txt")) || (file.Contains("username.txt"))) { AccountUsersName = GlobusFileHelper.ReadFiletoStringList(file); Log(AccountUsersName.Count + " User Names uploaded."); } else if ((file.Contains("Name.txt")) || (file.Contains("name.txt")) || (file.Contains("Names.txt"))) { AccountNames = GlobusFileHelper.ReadFiletoStringList(file); Log(AccountNames.Count + " Names uploaded."); } if ((file.Contains("Email.txt")) || (file.Contains("email.txt")) || (file.Contains("emails.txt")) || (file.Contains("Emails.txt"))) { Emails = GlobusFileHelper.ReadFiletoStringList(file); Log(Emails.Count + " Emails uploaded."); } } //END FOREACH #endregion } //END IF } } //END USING IF }
private void LoadDefaultsFiles() { try { #region TD Ubdate by me lstMessage.Clear(); string MessageSettings = string.Empty; #endregion //Globussoft1.GlobusHttpHelper DataTable dt = objclsSettingDB.SelectSettingData(); foreach (DataRow row in dt.Rows) { try { if ("MentionReplyInterface" == row[0].ToString()) { if ("Message" == row[1].ToString()) { MessageSettings = StringEncoderDecoder.Decode(row[2].ToString()); } } } catch { } } if (File.Exists(MessageSettings)) { lstMessage = GlobusFileHelper.ReadFiletoStringList(MessageSettings); textBox1.Text = MessageSettings; BindDataIntoDropDownList(); AddToReplyInterfaceLog("[ " + DateTime.Now + " ] => [ " + lstMessage.Count + " Message loaded ]"); } } catch (Exception ex) { Console.WriteLine(ex.StackTrace); } }
public void LoadMoreDetails() { try { Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog(); dlg.DefaultExt = ".txt"; dlg.Filter = "Text documents (.txt)|*.txt"; Nullable <bool> result = dlg.ShowDialog(); GlobalsGroups.ListGrpMoreDetails = GlobusFileHelper.ReadFiletoStringList(dlg.FileName); GlobusLogHelper.log.Info("Details uploaded : " + GlobalsGroups.ListGrpMoreDetails.Count); Application.Current.Dispatcher.Invoke(new Action(() => { txt_GroupStatusUpdate_MoreDetails.Text = dlg.FileName; })); txt_GroupStatusUpdate_MoreDetails.Text = dlg.FileName; } catch (Exception ex) { } }
private void btn_AccountProfileDetails_Click(object sender, EventArgs e) { using (FolderBrowserDialog ofd = new FolderBrowserDialog()) { ofd.SelectedPath = Application.StartupPath + "\\Profile\\Pics"; if (ofd.ShowDialog() == DialogResult.OK) { //SET FILE PATH IN TEXT BOX.. txt_ProfileDetailsFilePath.Text = ofd.SelectedPath; MixedCampaignManager.classes.AccountCreatorEntities.ProfileDetailsFolderPath = ofd.SelectedPath; if (!string.IsNullOrEmpty(MixedCampaignManager.classes.AccountCreatorEntities.ProfileDetailsFolderPath)) { #region GET ALL FILE FROM FOLDER.. string[] Files = Directory.GetFiles(MixedCampaignManager.classes.AccountCreatorEntities.ProfileDetailsFolderPath); foreach (string file in Files) { if (((file.Contains("ProfileLocation.txt")) || (file.Contains("profilelocation.txt")) || (file.Contains("Profilelocations.txt")))) { ProfileLocation = GlobusFileHelper.ReadFiletoStringList(file); Log(ProfileLocation.Count + " Profile locations uploaded."); } if (((file.Contains("ProfileDescription.txt")) || (file.Contains("profiledescription.txt")))) { ProfileDescription = GlobusFileHelper.ReadFiletoStringList(file); Log(ProfileDescription.Count + " Profile description uploaded."); } if (((file.Contains("ProfileUrl.txt")) || (file.Contains("profileurl.txt")) || (file.Contains("profileurl.txt")) || (file.Contains("ProfileUrls.txt")))) { ProfileUrls = GlobusFileHelper.ReadFiletoStringList(file); Log(ProfileUrls.Count + " Profile Url's uploaded."); } } //END FOREACH #endregion } //END IF } } //END USING IF }
public void LoadEmails() { try { try { Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog(); dlg.DefaultExt = ".txt"; dlg.Filter = "Text documents (.txt)|*.txt"; Nullable <bool> result = dlg.ShowDialog(); // GlobalsAddConn.lstLoadEmails = GlobusFileHelper.ReadFiletoStringList(dlg.FileName); lstEmails = GlobusFileHelper.ReadFiletoStringList(dlg.FileName); Application.Current.Dispatcher.Invoke(new Action(() => { txt_AddConn_Email.Text = dlg.FileName; })); } catch (Exception ex) { } } catch (Exception ex) { } }
public void LoadAccounts() { try { int countAccount = 0; if (Globals.IsFreeVersion) { //try //{ // string DeleteQuery = "Delete from tb_LinkedInAccount"; // DataBaseHandler.DeleteQuery(DeleteQuery, "tb_LinkedInAccount"); // LoadDataGrid(); //} //catch (Exception) //{ //} try { btnClearAccounts.Enabled = false; DataTable dt1 = objclsLinkedINAccount.SelectAccoutsForGridView(); countAccount = dt1.Rows.Count; if (countAccount >= 5) { return; } else { countAccount = 5 - countAccount; } } catch (Exception) { } } DataTable dt = new DataTable(); using (OpenFileDialog ofd = new OpenFileDialog()) { ofd.Filter = "Text Files (*.txt)|*.txt"; ofd.InitialDirectory = Application.StartupPath; if (ofd.ShowDialog() == DialogResult.OK) { this.Invoke(new MethodInvoker(delegate { txtAccountFile.Text = ofd.FileName; clsSettingDB ObjclsSettingDB = new clsSettingDB(); ObjclsSettingDB.InsertOrUpdateSetting("LoadAccounts", "LoadAccounts", StringEncoderDecoder.Encode(txtAccountFile.Text)); })); List <string> templist = GlobusFileHelper.ReadFiletoStringList(ofd.FileName); Ld_lstAccountCheckerEmail.AddRange(templist); int countlist = templist.Count(); if (Globals.IsFreeVersion) { try { //templist.RemoveRange(5, templist.Count - 5); templist.RemoveRange(countAccount, templist.Count - countAccount); } catch { } foreach (string item in templist) { LoadDBAccount(item); } LoadGridView(); if (countlist > 5) { try { this.Invoke(new MethodInvoker(delegate { FrmFreeTrial frmFreeTrial = new FrmFreeTrial(); frmFreeTrial.TopMost = true; frmFreeTrial.BringToFront(); frmFreeTrial.ShowDialog(); })); } catch (Exception) { } } this.Invoke(new MethodInvoker(delegate { this.Close(); })); } else { foreach (string item in templist) { LoadDBAccount(item); } LoadGridView(); } } AddLoggerAccountLoad("[ " + DateTime.Now + " ] => [ " + LinkedInManager.linkedInDictionary.Count + " Accounts loaded ]"); //AddLoggerAccounts(LinkedInManager.linkedInDictionary.Count + " Accounts loaded"); Log("[ " + DateTime.Now + " ] => [ " + LinkedInManager.linkedInDictionary.Count + " Accounts loaded ]"); } } catch { } }
private void AssignProxy() { try { if (MessageBox.Show("Assign Private/Public proxies from Database???", "Confirmation", MessageBoxButtons.YesNo) == DialogResult.Yes) { try { List <string> lstProxies = proxyFetcher.GetPublicProxies(); if (lstProxies.Count > 0) { if (!string.IsNullOrEmpty(txtAccountsPerProxy.Text) && GlobusRegex.ValidateNumber(txtAccountsPerProxy.Text)) { try { accountsPerProxy = int.Parse(txtAccountsPerProxy.Text); } catch { accountsPerProxy = 10; } } AddLoggerAccountLoad("[ " + DateTime.Now + " ] => [ Please Wait Process Running ....! ]"); proxyFetcher.AssignProxiesToAccounts(lstProxies, accountsPerProxy); //AssignProxiesToAccounts(lstProxies); LoadDataGrid(); //Refresh Datagrid if (dgvAccount.RowCount > 1) { AddLoggerAccountLoad("[ " + DateTime.Now + " ] => [ All Proxy has been Alloted. ]"); } else { AddLoggerAccountLoad("[ " + DateTime.Now + " ] => [ Please Load Some Account ]"); } } else { MessageBox.Show("Please assign Private/Public proxies from Proxies Tab in Main Page OR Upload a proxies Text File"); } } catch { } } else { try { using (OpenFileDialog ofd = new OpenFileDialog()) { ofd.Filter = "Text Files (*.txt)|*.txt"; ofd.InitialDirectory = Application.StartupPath; if (ofd.ShowDialog() == DialogResult.OK) { lstProxies = new List <string>(); lstProxies = GlobusFileHelper.ReadFiletoStringList(ofd.FileName); if (!string.IsNullOrEmpty(txtAccountsPerProxy.Text) && GlobusRegex.ValidateNumber(txtAccountsPerProxy.Text)) { try { accountsPerProxy = int.Parse(txtAccountsPerProxy.Text); } catch { accountsPerProxy = 10; } } AddLoggerAccountLoad("[ " + DateTime.Now + " ] => [ Please Wait Process Running ....! ]"); proxyFetcher.AssignProxiesToAccounts(lstProxies, accountsPerProxy); //AssignProxiesToAccounts(lstProxies); LoadDataGrid(); //Refresh Datagrid //AssignProxiesToAccountsModified(); } } } catch { } } AddLoggerAccountLoad("[ " + DateTime.Now + " ] => [ PROCESS COMPLETED ]"); AddLoggerAccountLoad("----------------------------------------------------------------------------------------"); } catch { } }
private void BindDataIntoDropDownList() { try { //comboBox1.Items.Clear(); if (!string.IsNullOrEmpty(textBox1.Text)) { List <string> templist = GlobusFileHelper.ReadFiletoStringList(textBox1.Text); templist.Distinct().ToList(); ///Modified [1.0.0.3] lstMessage = new List <string>(); foreach (string item in templist) { if (!lstMessage.Contains(item)) { lstMessage.Add(item); } } //comboBox1.Items.Clear(); ddlSelectMessage.Items.Clear(); if (lstMessage.Count > 0) { foreach (string item in lstMessage) { try { if (!string.IsNullOrEmpty(item) && !string.IsNullOrWhiteSpace(item)) { ddlSelectMessage.Items.Add(item); } } catch { } } AddToReplyInterfaceLog("[ " + DateTime.Now + " ] => [ Message Bound Drop Down List Successfully ! ]"); //foreach (string lstMessageitem in lstMessage) //{ // try // { // string[] strTitleMessage = Regex.Split(lstMessageitem, "\r\n"); // if (strTitleMessage.Count() > 0) // { // foreach (string item in strTitleMessage) // { // if (!string.IsNullOrWhiteSpace(item)) // { // //comboBox1.Items.Add(lstMessageitem); // ddlSelectMessage.Items.Add(item); // break; // } // } // } // } // catch // { // } //} ////comboBox1.SelectedIndex = 0; //ddlSelectMessage.SelectedIndex = 0; //foreach (string item in lstMessage) //{ // string[] strTitleMessage = Regex.Split(item, "\r\n"); // try // { // foreach (string item1 in strTitleMessage) // { // try // { // if (!string.IsNullOrWhiteSpace(item1)) // { // if (item1 == ddlSelectMessage.SelectedItem.ToString()) // { // try // { // txtEditMessage.Text = item.Replace(ddlSelectMessage.SelectedItem.ToString(), string.Empty).TrimStart(); // editMessage = txtEditMessage.Text; // return; // } // catch (Exception) // { // } // } // } // } // catch (Exception) // { // } // } // } // catch { } //} } } else { MessageBox.Show("Please Browse Message File !"); } } catch (Exception ex) { Console.WriteLine(ex.StackTrace); } }