public ChangeString ( string stringToChange, string newString = "" ) : string | ||
stringToChange | string | |
newString | string | "Change the found values to 'neString'." |
리턴 | string |
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."; }
private void btnChangeAll_Click(object sender, EventArgs e) { foreach (FindAndReplaceItem frItem in _fr.l_items) { frItem.Name = _fr.ChangeString(frItem.Name, txtTo.Text); frItem.Description = _fr.ChangeString(frItem.Description, txtTo.Text); frItem.save(_fr.rep, _fr.searchFieldType); } ShowItem(); txtState.Text = StateCurrentItem() + " all found items changed."; }