Beispiel #1
0
        public static void PrintSchedule(Schedule schedule)
        {
            string          path    = Settings.Default.ScheduleTemplatePath;
            SchedulePrinter printer = new SchedulePrinter(schedule, path);

            printer.Print();
        }
Beispiel #2
0
        private Image GetPrintedSchedule(Schedule schedule)
        {
            var image           = new Bitmap(this.notificationArea.Width, this.notificationArea.Height) as Image;
            var schedulePrinter = new SchedulePrinter();

            schedulePrinter.Print(schedule, image);
            return(image);
        }
        public NotificationCanvas(int width, int height, Schedule schedule)
        {
            this.Width  = width;
            this.Height = height;

            this.Image = new Bitmap(width, height);

            this.Padding = new ThickEdge(15);

            using (var graphics = Graphics.FromImage(this.Image))
            {
                this.DrawBackground(graphics);
                this.DrawModernBorder(graphics);
            }

            var schedulePrinter = new SchedulePrinter();

            schedulePrinter.Print(schedule, this.Image, this.Padding);
        }