public IsScriptNameAlreadyUsed ( string tryName, object ignoreObject ) : bool | ||
tryName | string | |
ignoreObject | object | |
리턴 | bool |
private static void EnsureCharacterScriptNameIsUnique(Character character, Game game) { string scriptNameBase = character.ScriptName; int suffix = 0; while (game.IsScriptNameAlreadyUsed(character.ScriptName, character)) { suffix++; character.ScriptName = scriptNameBase + suffix; } }
private static void EnsureViewNameIsUnique(View view, Game game) { string scriptNameBase = view.Name; int suffix = 0; while (game.IsScriptNameAlreadyUsed(view.Name.ToUpper(), view)) { suffix++; view.Name = scriptNameBase + suffix; } }
private static void AdjustScriptNamesToEnsureEverythingIsUnique(GUI gui, Game game) { while (game.IsScriptNameAlreadyUsed(gui.Name, gui)) { gui.Name += "2"; } foreach (GUIControl control in gui.Controls) { while (game.IsScriptNameAlreadyUsed(control.Name, control)) { control.Name += "2"; } } }