hoTools.Find.FindAndReplace.FindInPackageRecursive C# (CSharp) Method

FindInPackageRecursive() public method

Find all choosen items beneath selected package (recursive). - Create item list (l_items) The task is delegated doRecursivePackage
public FindInPackageRecursive ( ) : void
return void
        public void FindInPackageRecursive()
        {
            _index = -1;
            RecursivePackageFind.doRecursivePkg(_rep, _pkg,  this);
            if (_l_items.Count > 0) {_index = 0;}
            //else {MessageBox.Show("No found element", String.Format("{0} elements found", _l_items.Count));}
        }
        #endregion

Usage Example

        /// <summary>
        /// btnFind_Click
        /// Find all matching items in recursive elements
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnFind_Click(object sender, EventArgs e)
        {
            if (txtFindString.Text.Length < 3)
            {
                DialogResult result = MessageBox.Show("Yes=Continue",
                                                      "Short find string (<3 characters)", MessageBoxButtons.OKCancel);
                if (result == DialogResult.Cancel)
                {
                    return;
                }
            }
            EA.Package pkg = Repository.GetTreeSelectedPackage();
            _fr = new FindAndReplace(Repository, pkg,
                                     txtFindString.Text,
                                     txtReplaceString.Text,
                                     chkCaseSensetive.Checked, chkRegularExpression.Checked, chkIgnoreWhiteSpaces.Checked,
                                     chkName.Checked, chkDescription.Checked, chkStereotype.Checked, chkTaggedValue.Checked,
                                     txtTaggedValue.Text,
                                     chkPackage.Checked, chkElement.Checked, chkDiagram.Checked,
                                     chkAttribute.Checked, chkOperation.Checked);

            _fr.FindInPackageRecursive();
            _fr.LocateCurrentElement();
            if (_fr.Index >= 0)
            {
                txtStatus.Text = _fr.ItemShortDescription();
                activateFindChangeParameters(false);
            }
        }
All Usage Examples Of hoTools.Find.FindAndReplace::FindInPackageRecursive