private void btn_FollowKeyWordsFileUpload_Click(object sender, EventArgs e) { SelectionType = "Username"; txtKeywordList.Text = ""; using (System.Windows.Forms.OpenFileDialog ofd = new System.Windows.Forms.OpenFileDialog()) { ofd.Filter = "Text Files (*.txt)|*.txt"; ofd.InitialDirectory = Application.StartupPath; if (ofd.ShowDialog() == DialogResult.OK) { List <string> tempFile = GlobusFileHelper.ReadLargeFile(ofd.FileName);//GlobusFileHelper.ReadFiletoStringList(ofd.FileName); txtUsernameList.Text = ofd.FileName; } } }
private void btnKeywordSearch_Click(object sender, EventArgs e) { try { SelectionType = "Keyword"; txtUsernameList.Text = ""; using (System.Windows.Forms.OpenFileDialog ofd = new System.Windows.Forms.OpenFileDialog()) { ofd.Filter = "Text Files (*.txt)|*.txt"; ofd.InitialDirectory = Application.StartupPath; if (ofd.ShowDialog() == DialogResult.OK) { List <string> tempFile = GlobusFileHelper.ReadLargeFile(ofd.FileName);//GlobusFileHelper.ReadFiletoStringList(ofd.FileName); txtKeywordList.Text = ofd.FileName; } } } catch (Exception ex) { GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> btnKeywordSearch_Click() --> " + ex.Message, Globals.Path_CampaignManager); } }