public static bool RenameTagHandler(RestrictedStringFormData data) { EditName form = new EditName(data.Value); form.InvalidNames.AddRange(data.RestrictedValues); if (form.ShowDialog() == DialogResult.OK && form.IsModified) { data.Value = form.TagName; return true; } else return false; }
public static bool RenameTagHandler (RestrictedStringFormData data) { EditNameWindowController form = new EditNameWindowController (); form.OriginalName = data.Value; form.InvalidNames.AddRange (data.RestrictedValues); if (RunWindow (form) == ModalResult.OK) { data.Value = form.TagName; return true; } else return false; }
public static bool RenameTagHandler(RestrictedStringFormData data) { EditName form = new EditName(data.Value); form.InvalidNames.AddRange(data.RestrictedValues); if (form.ShowDialog() == DialogResult.OK && form.IsModified) { data.Value = form.TagName; return(true); } else { return(false); } }
public static bool RenameTagHandler(RestrictedStringFormData data) { EditNameWindowController form = new EditNameWindowController(); form.OriginalName = data.Value; form.InvalidNames.AddRange(data.RestrictedValues); if (RunWindow(form) == ModalResult.OK) { data.Value = form.TagName; return(true); } else { return(false); } }
public override bool RenameNode() { if (CanRenameNode && TagParent != null && TagParent.IsNamedContainer && FormRegistry.EditString != null) { RestrictedStringFormData data = new RestrictedStringFormData(TagParent.NamedTagContainer.GetTagName(Tag)); data.RestrictedValues.AddRange(TagParent.NamedTagContainer.TagNamesInUse); if (FormRegistry.RenameTag(data)) { if (TagParent.NamedTagContainer.RenameTag(Tag, data.Value)) { IsDataModified = true; return(true); } } } return(false); }
public override bool RenameNode() { if (CanRenameNode && FormRegistry.EditString != null) { var data = new RestrictedStringFormData(_tree.Name ?? "") { AllowEmpty = true }; if (FormRegistry.RenameTag(data)) if (_tree.Name != data.Value) { _tree.Name = data.Value; IsDataModified = true; return true; } } return false; }
public override bool RenameNode() { if (CanRenameNode && FormRegistry.EditString != null) { RestrictedStringFormData data = new RestrictedStringFormData(_tree.Name ?? "") { AllowEmpty = true, }; if (FormRegistry.RenameTag(data)) { if (_tree.Name != data.Value) { _tree.Name = data.Value; IsDataModified = true; return true; } } } return false; }
public override bool RenameNode() { if (CanRenameNode && TagParent.IsNamedContainer && FormRegistry.EditString != null) { RestrictedStringFormData data = new RestrictedStringFormData(TagParent.NamedTagContainer.GetTagName(Tag)); data.RestrictedValues.AddRange(TagParent.NamedTagContainer.TagNamesInUse); if (FormRegistry.RenameTag(data)) { if (TagParent.NamedTagContainer.RenameTag(Tag, data.Value)) { IsDataModified = true; return true; } } } return false; }