private void btnChange_Click(object sender, EventArgs e)
{
if (_fr.Index >= 0)
{
FindAndReplaceItem item = _fr.LItems[_fr.Index];
item.Name = _fr.ChangeString(item.Name, txtTo.Text);
item.Description = _fr.ChangeString(item.Description, txtTo.Text);
item.Stereotype = _fr.ChangeString(item.Stereotype, txtTo.Text);
// update form
rtfName.Text = item.Name;
rtfNotes.Text = item.Description;
rtfStereotype.Text = item.Stereotype;
//
if (_fr.IsTagSearch && (gridTags != null))
{
gridTags.DataSource = null;
//FindAndReplaceItemElement itemEl = (FindAndReplaceItemElement)item;
foreach (FindAndReplaceItemTag tag in item.LItemTag)
{
tag.Value = _fr.ChangeString(tag.Value, txtTo.Text);
}
gridTags.AutoGenerateColumns = false;
gridTags.DataSource = item.LItemTag;
}
}
txtState.Text = StateCurrentItem() + @" changed temporary, store if you want it permanently.";
}