Esempio n. 1
0
        public void FormatOutput(StringBuilder sb, GPAppDayResults cal)
        {
            bool done = false;

            if (Template != null)
            {
                if (Template == "default:plain")
                {
                    sb.AppendLine("<html><head><title>Calendar</title>");
                    sb.AppendLine("<style>");
                    sb.AppendLine("<!--");
                    sb.AppendLine(FormaterHtml.CurrentFormattingStyles);
                    sb.AppendLine("-->");
                    sb.AppendLine("</style>");
                    sb.AppendLine("</head>");
                    sb.AppendLine("<body>");
                    sb.AppendLine("<pre>");
                    StringBuilder fout = new StringBuilder();
                    FormaterPlain.FormatAppDayText(cal, fout);
                    sb.Append(fout);

                    sb.AppendLine("</pre></body></html>");
                    done = true;
                }
            }
            if (!done)
            {
                FormaterHtml.WriteAppDayHTML(cal, sb);
            }
        }
Esempio n. 2
0
        protected override void Execute()
        {
            GPAppDayResults app = new GPAppDayResults();

            app.calculateAppearanceDayData(Location, DateTime);

            StringBuilder sb = new StringBuilder();

            FormatOutput(sb, app);

            HtmlText         = sb.ToString();
            CalculatedObject = app;
        }