public TabStop AddTw(TabStopType type, int position, TabStopLeaderCharacter?leaderCharacter = null) { Xml ??= CreateRootElement(); var tabStop = TabStop.Create(type, position, leaderCharacter); Xml.Add(tabStop.Xml); return(tabStop); }
public static TabStop Create(TabStopType type, int position, TabStopLeaderCharacter?leaderCharacter) { var tab = new XElement(XName.Get("tab", Namespaces.w.NamespaceName)); tab.SetOwnAttributeEnum("val", type); tab.SetOwnAttributeInt("pos", position); tab.SetOwnAttributeEnumNullable("leader", leaderCharacter); return(new TabStop(tab)); }
public static string GetValue(this TabStopType type) { return(type.ToString().ToLower()); }
public TabStop AddInch(TabStopType type, int position, TabStopLeaderCharacter?leaderCharacter = null) { return(AddTw(type, (int)(position * UnitHelper.TwipsPerInch), leaderCharacter)); }
public TabStop(int position, TabStopType type) { Position = position; Type = type; }