/** * <summary>Creates a new custom token, or replaces it if one with the same ID number already exists.</summary> * <param name = "_ID">The token's unique identifier</param> * <param name = "_replacementText">The token's replacement text.</param> */ public void SetCustomToken(int _ID, string _replacementText) { CustomToken newToken = new CustomToken(_ID, _replacementText); for (int i = 0; i < customTokens.Count; i++) { if (customTokens[i].ID == _ID) { customTokens.RemoveAt(i); break; } } customTokens.Add(newToken); }
/** * <summary>Creates a new custom token, or replaces it if one with the same ID number already exists.</summary> * <param name = "_ID">The token's unique identifier</param> * <param name = "_replacementText">The token's replacement text.</param> */ public void SetCustomToken(int _ID, string _replacementText) { CustomToken newToken = new CustomToken (_ID, _replacementText); for (int i=0; i<customTokens.Count; i++) { if (customTokens[i].ID == _ID) { customTokens.RemoveAt (i); break; } } customTokens.Add (newToken); }