protected void UpdateImage() { byte[] imageBytes = null; int caseCount = 0; int layerCount = 0; double weightLoad = 0.0, weightTotal = 0.0; Vector3D bbLoad = Vector3D.Zero; Vector3D bbTotal = Vector3D.Zero; PalletStacking.GetSolution( DimCase, WeightCase, DimPallet, WeightPallet, MaxPalletHeight, BoxPositions, ChkbAlternateLayers.Checked, ChkbInterlayerBottom.Checked, ChkbInterlayersIntermediate.Checked, ChkbInterlayerTop.Checked, Angle, ref imageBytes, ref caseCount, ref layerCount, ref weightLoad, ref weightTotal, ref bbLoad, ref bbTotal); Session[SessionVariables.ImageWidth] = 500; Session[SessionVariables.ImageHeight] = 500; Session[SessionVariables.ImageBytes] = imageBytes; ImagePallet.ImageUrl = "~/Handler.ashx?param=" + DateTime.Now.Ticks.ToString(); loadedPallet.Update(); }
protected void UpdateImage() { Vector3D caseDim = DimCaseCtrl; double caseWeight = WeightCaseCtrl; Vector3D palletDim = DimPalletCtrl; double palletWeight = WeightPalletCtrl; double maxPalletHeight = MaxPalletHeightCtrl; byte[] imageBytes = null; int caseCount = 0; int layerCount = 0; double weightLoad = 0.0, weightTotal = 0.0; Vector3D bbLoad = Vector3D.Zero; Vector3D bbTotal = Vector3D.Zero; PalletStacking.GetSolution( caseDim, caseWeight, BitmapTexture, palletDim, palletWeight, maxPalletHeight, BoxPositionsLayer, false, false, false, false, false, Angle, new Size(500, 460), ref imageBytes, ref caseCount, ref layerCount, ref weightLoad, ref weightTotal, ref bbLoad, ref bbTotal ); var palletDetails = new List <PalletDetails> { new PalletDetails("Number of cases", $"{caseCount}", ""), new PalletDetails("Layer count", $"{layerCount}", ""), new PalletDetails("Load weight", $"{weightLoad}", "kg"), new PalletDetails("Total weight", $"{weightTotal}", "kg"), new PalletDetails("Load dimensions", $"{bbLoad.X} x {bbLoad.Y} x {bbLoad.Z}", "mm"), new PalletDetails("Overall dimensions", $"{bbTotal.X} x {bbTotal.Y} x {bbTotal.Z}", "mm") }; PalletDetails.DataSource = palletDetails; PalletDetails.DataBind(); DimCase = caseDim; DimPallet = palletDim; MaxPalletHeight = maxPalletHeight; Session[SessionVariables.ImageWidth] = 500; Session[SessionVariables.ImageHeight] = 460; Session[SessionVariables.ImageBytes] = imageBytes; selectedLayer.Update(); }
protected void UpdateImage() { Vector3D caseDim = DimCaseCtrl; double caseWeight = WeightCaseCtrl; Vector3D palletDim = DimPalletCtrl; double palletWeight = WeightPalletCtrl; double maxPalletHeight = MaxPalletHeightCtrl; byte[] imageBytes = null; int caseCount = 0; int layerCount = 0; double weightLoad = 0.0, weightTotal = 0.0; Vector3D bbLoad = Vector3D.Zero; Vector3D bbTotal = Vector3D.Zero; PalletStacking.GetSolution( caseDim, caseWeight, palletDim, palletWeight, maxPalletHeight, BoxPositionsLayer, false, false, false, false, Angle, ref imageBytes, ref caseCount, ref layerCount, ref weightLoad, ref weightTotal, ref bbLoad, ref bbTotal); var palletDetails = new List <PalletDetails>(); palletDetails.Add(new PalletDetails("Number of cases", $"{caseCount}", "")); palletDetails.Add(new PalletDetails("Layer count", $"{layerCount}", "")); palletDetails.Add(new PalletDetails("Load weight", $"{weightLoad}", "kg")); palletDetails.Add(new PalletDetails("Total weight", $"{weightTotal}", "kg")); palletDetails.Add(new PalletDetails("Load dimensions", $"{bbLoad.X} x {bbLoad.Y} x {bbLoad.Z}", "mm x mm x mm")); palletDetails.Add(new PalletDetails("Overall dimensions", $"{bbTotal.X} x {bbTotal.Y} x {bbTotal.Z}", "mm x mm x mm")); PalletDetails.DataSource = palletDetails; PalletDetails.DataBind(); DimCase = caseDim; DimPallet = palletDim; MaxPalletHeight = maxPalletHeight; Session[SessionVariables.ImageWidth] = 500; Session[SessionVariables.ImageHeight] = 500; Session[SessionVariables.ImageBytes] = imageBytes; ImagePallet.ImageUrl = "~/Handler.ashx?param=" + DateTime.Now.Ticks.ToString(); selectedLayer.Update(); }