示例#1
0
        public void WordsIncludesInFile(ListView list, bool left)
        {
            string currentPath;

            if (left)
            {
                currentPath = CurrentPath1;
            }
            else
            {
                currentPath = CurrentPath2;
            }
            if (list.SelectedItems.Count > 0)
            {
                foreach (int i in list.SelectedIndices)
                {
                    if (list.Items[i].ImageIndex == 0)
                    {
                        continue;
                    }
                    else
                    {
                        string     currentPosition = list.Items[i].Text;
                        CommonFile commonFile      = new CommonFile(currentPath + "\\" + list.Items[i].Text);
                        if (currentPosition.Substring(currentPosition.LastIndexOf(".") + 1) == "txt")
                        {
                            string sent = commonFile.GetText(new TxtFile(currentPath + "\\" + list.Items[i].Text));
                            Presenter.SearchWordIncludes(sent);
                        }
                        else
                        {
                            continue;
                        }
                    }
                }
            }
        }