/// <summary> /// Gets new name for Function from user. /// </summary> /// <param name="element">Element to rename.</param> /// <param name="newName">Element's new name.</param> /// <param name="oldName">Old name of element.</param> /// <param name="openAllChangedDocument">Indicates that open code files in Visual Studio Text Editor</param> /// <returns></returns> private static bool GetNewName(CodeElement element, string oldName, ref string newName, out bool openAllChangedDocument) { bool success; using (var renameSymbolForm = new RenameSymbolForm(oldName, GetElementTypeDescription(element))) { renameSymbolForm.NewName = string.IsNullOrEmpty(newName) ? oldName : newName; DialogResult dResult = renameSymbolForm.ShowDialog(); success = dResult == DialogResult.OK; newName = renameSymbolForm.NewName; openAllChangedDocument = renameSymbolForm.OpenAllChangedDocument; } return(success); }
/// <summary> /// Gets new name for Function from user. /// </summary> /// <param name="element">Element to rename.</param> /// <param name="newName">Element's new name.</param> /// <param name="oldName">Old name of element.</param> /// <param name="openAllChangedDocument">Indicates that open code files in Visual Studio Text Editor</param> /// <returns></returns> private static bool GetNewName(CodeElement element, string oldName, ref string newName, out bool openAllChangedDocument) { bool success; using (var renameSymbolForm = new RenameSymbolForm(oldName, GetElementTypeDescription(element))) { renameSymbolForm.NewName = string.IsNullOrEmpty(newName) ? oldName : newName; DialogResult dResult = renameSymbolForm.ShowDialog(); success = dResult == DialogResult.OK; newName = renameSymbolForm.NewName; openAllChangedDocument = renameSymbolForm.OpenAllChangedDocument; } return success; }