예제 #1
0
 public void ExecuteSection(EpsonCommander helper)
 {
     foreach (var command in Commands)
     {
         command.Execute(helper);
         if (!command.HasNewLine)
         {
             helper.NewLine();
         }
     }
     for (int x = 0; x < MinLines - Commands.Count; x++)
     {
         helper.NewLine();
     }
 }
예제 #2
0
        public IEnumerable <string> Execute()
        {
            var pages  = new List <string>();
            var helper = new EpsonCommander(CharactersPerLine);

            foreach (var command in Commands)
            {
                command.Execute(helper);
            }
            pages.Add(helper.Build());

            /*if (FitsInOnePage())
             * {
             *  helper.Init();
             *  for (int x = 0; x < InlineCopies + 1; x++)
             *  {
             *      Header.ExecuteSection(helper);
             *      Body.ExecuteSection(helper);
             *      Footer.ExecuteSection(helper);
             *  }
             *  helper.FormFeed();
             *  helper.Init();
             *  pages.Add(helper.Build());
             * }
             * else
             * {
             *  for (int x = 0; x < InlineCopies + 1; x++)
             *  {
             *      helper.Clear();
             *      helper.Init();
             *      Header.ExecuteSection(helper);
             *      Body.ExecuteSection(helper);
             *      Footer.ExecuteSection(helper);
             *      helper.FormFeed();
             *      helper.Init();
             *      pages.Add(helper.Build());
             *  }
             * }*/
            return(pages);
        }