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); }
public override void Revert(EpsonCommander commander) { if (Size != null) { commander.CharacterSize("1").CarriageReturn(); } }
public void Execute(EpsonCommander commander) { Apply(commander); foreach (var child in Children) { child.Execute(commander); } Revert(commander); }
public override void Apply(EpsonCommander commander) { if (!string.IsNullOrEmpty(Lenght)) { commander.Line(Convert.ToInt32(Lenght)); } else { commander.Line(); } }
public abstract void Revert(EpsonCommander commander);
public abstract void Apply(EpsonCommander commander);
public override void Revert(EpsonCommander commander) { }
public override void Apply(EpsonCommander commander) { commander.Cut(CutMode.Partial); }
public override void Revert(EpsonCommander commander) { commander.Align(Align.Left).CarriageReturn(); }
public override void Apply(EpsonCommander commander) { commander.Align(Align.Center).CarriageReturn(); }
public override void Revert(EpsonCommander commander) { commander.NewLine(); }
public override void Apply(EpsonCommander commander) { }
public override void Apply(EpsonCommander commander) { commander.Feed(Convert.ToInt32(Lines)); }
public override void Revert(EpsonCommander commander) { commander.Emphasis(false); }
public override void Apply(EpsonCommander commander) { commander.Emphasis(true); }