public override void Revert(EpsonCommander commander) { if (Size != null) { commander.CharacterSize("1").CarriageReturn(); } }
public override void Apply(EpsonCommander commander) { if (Size != null) { commander.CharacterSize(Size).CarriageReturn(); } if (Value == null) { Value = ""; } string data; if (string.IsNullOrEmpty(Width)) { data = Value; } else { int width = Convert.ToInt32(Width); string text = Normalize(Value, width); data = new string(' ', width); switch (Alignment) { case "C": data = data.Insert(GetCenteredOffset(width, text.Length), text); break; case "R": data = data.Insert(width - text.Length, text); break; case "L": default: data = data.Insert(0, text); break; } data = data.Substring(0, width); } commander.Text(data); }