Exemple #1
0
 private void PopulateQuickSearchResultGrid(ReqProProject.SearchResult[] searchResult, int[] anKeys)
 {
     ReqProProject.SearchResult[] aSearchResult = new ReqProProject.SearchResult[1];
     for (int i = 0; i < searchResult.GetLength(0); i++)
     {
         aSearchResult[0] = searchResult[i];
         dgvQuickSearchResult.AddRow(aSearchResult, (anKeys == null) ? 0 : anKeys[i]);
     }
 }
Exemple #2
0
        private void FindRequirements(TreeNode tn, string strSearchExpr,
                                      ref List <ReqDBBrowser.ReqProProject.SearchResult> listSearchResult, ref List <int> listnKeysFound)
        {
            int    nIdx    = -1;
            string strComp = tn.Text.ToLower();

            nIdx = strComp.IndexOf(strSearchExpr);
            if (nIdx >= 0)
            {
                ReqProProject.SearchResult sResult = new ReqProProject.SearchResult(tn.Text);
                sResult.Index  = nIdx;
                sResult.Length = strSearchExpr.Length;
                listSearchResult.Add(sResult);
                listnKeysFound.Add((int)tn.Tag);
            }
            foreach (TreeNode tnChild in tn.Nodes)
            {
                FindRequirements(tnChild, strSearchExpr, ref listSearchResult, ref listnKeysFound);
            }
        }