public void SetText(ByteVector type, string[] text) { if (text == null) { ilst_box.RemoveChild(FixId(type)); return; } SetText(type, string.Join("; ", text)); }
/// <summary> /// Sets the text for a specified box type. /// </summary> /// <param name="type"> /// A <see cref="ByteVector" /> object containing the type to /// add to the new instance. /// </param> /// <param name="text"> /// A <see cref="string[]" /> containing text to store. /// </param> public void SetText(ByteVector type, string [] text) { // Remove empty data and return. if (text == null) { ilst_box.RemoveChild(FixId(type)); return; } // Create a list... ByteVectorCollection l = new ByteVectorCollection(); // and populate it with the ByteVectorized strings. foreach (string value in text) { l.Add(ByteVector.FromString(value, StringType.UTF8)); } // Send our final byte vectors to SetData SetData(type, l, (uint) AppleDataBox.FlagType.ContainsText); }