Beispiel #1
0
        public void TestExportImport_Elegant_Bodoprivate()
        {
            var t = new ElegantTypographyPageHeader("Cambria", "Cambria", "Cambria")
            {
                LogoPath = @"C:\bodoconsult\Logos\logoStatera.jpg"
            };


            t.SetMargins();

            var fileName = Path.Combine(ExportFolderName, "ElegantTypographyBodoPrivate.json");

            if (File.Exists(fileName))
            {
                File.Delete(fileName);
            }

            ExportToJson(t, fileName);

            var typo2 = ImportFromJson <ElegantTypographyPageHeader>(fileName);

            typo2.SetMargins();


            Assert.IsTrue(File.Exists(fileName));
            Assert.IsFalse(typo2 == null);
            Assert.IsTrue(t.MarginUnit - typo2.MarginUnit < Tolerance);
        }
Beispiel #2
0
        public void TestExportImport_Elegant()
        {
            var t = new ElegantTypographyPageHeader("Cambria", "Calibri", "Calibri")
            {
                MarginLeftFactor   = 1,
                MarginRightFactor  = 1,
                MarginTopFactor    = 1,
                MarginBottomFactor = 1
            };


            t.SetMargins();

            var fileName = Path.Combine(ExportFolderName, "ElegantTypography.json");

            if (File.Exists(fileName))
            {
                File.Delete(fileName);
            }

            ExportToJson(t, fileName);

            var typo2 = ImportFromJson <ElegantTypographyPageHeader>(fileName);

            typo2.SetMargins();


            Assert.IsTrue(File.Exists(fileName));
            Assert.IsFalse(typo2 == null);
            Assert.IsTrue(t.MarginUnit - typo2.MarginUnit < Tolerance);
        }
Beispiel #3
0
        /// <summary>
        /// Get a elegant default typography
        /// </summary>
        /// <returns></returns>
        public static ITypography DefaultTypography()
        {
            var typography = new ElegantTypographyPageHeader("Calibri", "Calibri", "Calibri")
            {
                ChartStyle =
                {
                    Width             =                     750,
                    Height            =                     464,
                    FontSize          =                      10,
                    BackGradientStyle = GradientStyle.TopBottom,
                }
            };

            return(typography);
        }