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(); } }
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); }