load() public method

public load ( EA rep ) : void
rep EA
return void
        /// <summary>
        /// Replace all occurences of "Search string" by "Replace String" in current selected item.
        /// </summary>
        public int ReplaceItem()
        {
            if (_index < 0)
            {
                return(0);
            }
            FindAndReplaceItem item = _l_items[_index];// get item

            item.load(_rep);

            // search for name
            if ((_searchFieldTypes & FindAndReplaceItem.FieldType.Name) > 0)
            {
                item.Name = ChangeString(item.Name);
            }

            // search for description
            if ((_searchFieldTypes & FindAndReplaceItem.FieldType.Description) > 0)
            {
                item.Description = ChangeString(item.Description);
            }
            // search for stereotype
            if ((_searchFieldTypes & FindAndReplaceItem.FieldType.Stereotype) > 0)
            {
                item.Stereotype = ChangeString(item.Stereotype);
            }



            if ((_searchFieldTypes & FindAndReplaceItem.FieldType.Tag) > 0)
            {
                foreach (FindAndReplaceItemTag tag in item.l_itemTag)
                {
                    tag.Value = ChangeString(tag.Value);
                    tag.save();
                }
            }

            // set to changed
            item.save(_rep, _searchFieldTypes);
            return(item.CountChanges);
        }
        /// <summary>
        /// Show the current item
        /// </summary>
        private void ShowItem()
        {
            // fill information
            _frItem = _fr.l_items[_fr.Index];
            _frItem.load(_fr.rep);

            txtType.Text    = _frItem.getType();
            txtSubType.Text = _frItem.getSubType();
            txtFrom.Text    = _fr.findString;
            txtTo.Text      = _fr.replaceString;

            // rtf fields
            _fr.SetRtfBoxText(rtfName, _frItem.Name);
            _fr.SetRtfBoxText(rtfStereotype, _frItem.Stereotype);
            _fr.SetRtfBoxText(rtfNotes, _frItem.Description);

            if (_fr.isTagSearch)
            {
                txtTaggedValueNames.Text     = string.Join(",", _fr.tagValueNames);
                txtTaggedValueNames.Visible  = true;
                lblTaggedValues.Visible      = true;
                gridTags.Visible             = true;
                gridTags.DataSource          = null;
                gridTags.AutoGenerateColumns = false;
                // load tags
                gridTags.DataSource = _frItem.l_itemTag;
            }
            else
            {
                txtTaggedValueNames.Text    = "";
                txtTaggedValueNames.Visible = false;
                lblTaggedValues.Visible     = false;
                gridTags.Visible            = false;
            }

            txtState.Text = StateCurrentItem() + " found";
        }
        /// <summary>
        /// Show the current item
        /// </summary>
        private void ShowItem()
        {
            // fill information
            _frItem = _fr.l_items[_fr.Index];
            _frItem.load(_fr.rep);
            
            txtType.Text = _frItem.getType();
            txtSubType.Text = _frItem.getSubType();
            txtFrom.Text = _fr.findString;
            txtTo.Text = _fr.replaceString;

            // rtf fields 
            _fr.SetRtfBoxText(rtfName, _frItem.Name);
            _fr.SetRtfBoxText(rtfStereotype, _frItem.Stereotype);
            _fr.SetRtfBoxText(rtfNotes, _frItem.Description);

            if (_fr.isTagSearch)
            {
                txtTaggedValueNames.Text = string.Join(",", _fr.tagValueNames);
                txtTaggedValueNames.Visible = true;
                lblTaggedValues.Visible = true;
                gridTags.Visible = true;
                gridTags.DataSource = null;
                gridTags.AutoGenerateColumns = false;
                // load tags
                gridTags.DataSource = _frItem.l_itemTag;
            }
            else
            {
                txtTaggedValueNames.Text = "";
                txtTaggedValueNames.Visible = false;
                lblTaggedValues.Visible = false;
                gridTags.Visible = false;
            }

            txtState.Text = StateCurrentItem() + " found" ;
        }