Exemplo n.º 1
0
        public Layout GetUpdatedLayout()
        {
            SettingsHandler settingsHandler = new SettingsHandler();
            LayoutFactory   layoutFactory   = new LayoutFactory();

            LayoutItems = layoutFactory.GetLayout(settingsHandler, productPartName);
            return(this);
        }
Exemplo n.º 2
0
        public Layout()
        {
            ProductPartName = "Text";
            SettingsHandler settingsHandler = new SettingsHandler();
            LayoutFactory   layoutFactory   = new LayoutFactory();

            LayoutItems = layoutFactory.GetLayout(settingsHandler, productPartName);
        }
        public void GetVerticalOffset_XAxisInverted_ContainerIsEmpty()
        {
            LayoutFactory factory = new LayoutFactory();

            DocumentElement documentElement = new DocumentElement();

            documentElement.Pages.Add(new PageElement()
            {
                Key = "MyFirstPage", Height = UnitConverter.GetPoints(297), Width = UnitConverter.GetPoints(210)
            });

            Layout layout = factory.GetLayout(null, true, documentElement.Pages[0].Height, UnitConverter.GetPoints(10), UnitConverter.GetPoints(10), UnitConverter.GetPoints(200), UnitConverter.GetPoints(100));

            Assert.AreEqual(841.89, layout.YPosition, 0.01);
        }