CheckedListBox
Items
foreach (object o in lstKeyWordsForSearch.CheckedItems)
null
public List<string> GetKeyWordsFormList() { List<string> words = new List<string>(); foreach (object o in lstKeyWordsForSearch.CheckedItems) { string s = o.ToString().ToLower(); if (s != null) { string[] separated = s.Split(','); string[] arrremove = null; frmStopWordList stopWords = new frmStopWordList(); arrremove = stopWords.getStopWords(); for (int i = 0; i < separated.Length; i++) { for (int j = 0; j < arrremove.Length; j++) { if (separated[i] == arrremove[j]) { separated[i] = ""; } } } // remove stop words foreach (string word in separated) { if (!string.IsNullOrEmpty(word)) { if (!words.Contains(word)) { words.Add(word); } } } } } return words; }</string></string></string>
lstKeyWordsForSearch
frmMainForm mainForm = new frmMainForm(); List<string> SearchKeyWords = mainForm.GetKeyWordsFormList(); foreach (string item in SearchKeyWords) { MessageBox.Show(item); }</string>
MessageBox.Show(item);
public List<string> GetKeyWordsFormList()</string>
frmMainForm mainForm = new frmMainForm(); List SearchKeyWords = mainForm.GetKeyWordsFormList();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)