Esempio n. 1
0
        public Slip Build(Order order, SlipType type)
        {
            _slipFabric = GetFabric(order);
            switch (type)
            {
            case SlipType.Standard:
                return(Slip.Create(_slipFabric.Standard(order)));

            case SlipType.Crash:
                return(Slip.Create(_slipFabric.Crash(order)));

            default:
                throw new NotImplementedException();
            }
        }
Esempio n. 2
0
        public void Test_Html_to_BMP(Order order)
        {
            // Prepare
            SlipComponentsFabric fabric = GetComponentFabric(order);


            // Pre-validate


            // Perform

            Slip slip = Slip.Create(fabric.Standard(order));

            // Post-validate
            Assert.NotNull(slip);

            Image image = HtmlRender.RenderToImage(slip.Data, new Size(250, 800), new Size(270, 800), Color.White);

            image.Save(@"D:\Test.png", ImageFormat.Png);
        }