public static void AddTextRange(this DataGridViewCellCollection c, params string[] text) { foreach (var item in text) { c.AddText(item); } }
private static Paragraph AddText(this Paragraph paragraph, string text, ParagraphAlignment align, string style = null) { paragraph.Format.Alignment = align; if (style == null) paragraph.AddText(text); else paragraph.AddFormattedText(text, style); return paragraph; }
static public void Fill(this I18NLanguagePack langPack, XElement source) { if (source == null) throw new ArgumentNullException("source"); var list_text = source.Elements("text"); foreach (var item in list_text) { langPack.AddText(item.Attribute("id").Value, item.Value); } }
static public void Fill(this I18NLanguagePack langPack, Table source) { if (source == null) throw new ArgumentNullException("source"); var table = source; foreach (var textItem in table) { langPack.AddText(textItem["id"].ToString(), textItem["text"].ToString()); } }