public static string GetStringWithUniquePostfix(string name, Control sender, int start_ind) { HelloApps.GUI.CommandEditorClass top_commandEditorClass = HelloApps.GUI.GUIUtils.GetEditorInstance(sender); Dictionary <string, int> stringToIntMapping = top_commandEditorClass._stringToIntMapping; int count = 0; if (stringToIntMapping.ContainsKey(name)) { count = stringToIntMapping[name]; count = count + 1; stringToIntMapping[name] = count; } else { count = start_ind; stringToIntMapping.Add(name, count); } return(name + count.ToString()); }
public static string GetNextForLoopIndexName(Control sender) { HelloApps.GUI.CommandEditorClass top_commandEditorClass = HelloApps.GUI.GUIUtils.GetEditorInstance(sender); return(top_commandEditorClass.GetNextForLoopIndexName()); }