From 423b9511a9ce98fe36a235d5d2ab0d5a8e66238e Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期三, 11 十二月 2024 17:55:44 +0800 Subject: [PATCH] 报告图片导入 --- WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/02-helper/SimulationWorkingReportHelper.cs | 67 +++++++++++++++++---------------- 1 files changed, 34 insertions(+), 33 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/02-helper/SimulationWorkingReportHelper.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/02-helper/SimulationWorkingReportHelper.cs index 2cb5e83..58e6ace 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/02-helper/SimulationWorkingReportHelper.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/02-helper/SimulationWorkingReportHelper.cs @@ -9,7 +9,6 @@ /// </summary> public class SimulationWorkingReportHelper { - //鏂囧瓧鎻忚堪杩愯妯″紡浠嬬粛 浜岋級杩愯鎯呭喌涓庤兘鑰楀垎鏋愪腑 "鍏ㄥ勾:"鍚� private string _run_mode = "*******************************************************************"; @@ -49,8 +48,6 @@ //鎶ュ憡缁撳熬 鏃堕棿鏈� private int _month = DateTime.Today.Month; - - /// <summary> /// 鍒涘缓word @@ -120,6 +117,8 @@ SimulationWordReportHelper Text_left_15_black = new SimulationWordReportHelper(builder) { fontsize = 15, isblod = true };//涓�绾ф爣棰� SimulationWordReportHelper Text_left_12_black = new SimulationWordReportHelper(builder) { fontsize = 12 }; SimulationWordReportHelper Text_reight_10_black = new SimulationWordReportHelper(builder) { fontalignment = ParagraphAlignment.Right, fontsize = 12 }; + SimulationWordReportHelper Text_left_13_black = new SimulationWordReportHelper(builder) { fontsize = 13 }; + SetWordHander(src, vm.Info.Name, vm.ReportType); SetWordFooter(src, vm.Info.Name, vm.ReportType); @@ -135,9 +134,7 @@ Text_center_25_black.structureText(string.Format("{0}{1}", vm.Info.Name, vm.ReportType)); Text_left_15_black.structureText("涓�銆佺郴缁熸杩�"); - Text_left_15_black.AddBlankLine(); - Text_left_15_black.AddBlankLine(); - Text_left_12_black.structureText(string.Format("{0}", vm.Info.Description)); + Text_left_13_black.structureText(string.Format("{0}", vm.Info.Description)); Text_left_12_black.structureText("1.1銆佽澶囧熀鏈厤缃�"); #region 璁惧埆鍩烘湰閰嶇疆琛� @@ -169,25 +166,26 @@ Cell.structureCell("cos蠁"); Cell.structureCell("r/m "); builder.EndRow(); - //if (vm.Pumps != null) - //{ - // foreach (var item in vm.Equipments) - // { - // Cell.structureCell(item.EquipmentName); - // Cell.structureCell(item.EquipmentNumber); - // Cell.structureCell(item.EquipmentMainName); - // Cell.structureCell(item.RatedFlow); - // Cell.structureCell(item.RatedHead); - // Cell.structureCell(item.TypeOfDrive); - // Cell.structureCell("鐢垫満椹卞姩"); - // Cell.structureCell(item.RatedCurrent); - // Cell.structureCell(item.RatedPower); - // Cell.structureCell(item.RatedFactor); - // Cell.structureCell(item.Speed); - // builder.EndRow(); - // } - //} - //else + if (vm.Pumps != null) + { + foreach (var item in vm.Pumps) + { + Cell.structureCell(item.Name); + Cell.structureCell(item.SerialNO); + Cell.structureCell(item.ModelType); + Cell.structureCell(item.RatedQ); + Cell.structureCell(item.RatedH); + //Cell.structureCell(item.TypeOfDrive); + Cell.structureCell("鐢垫満椹卞姩"); + Cell.structureCell("鐢垫満椹卞姩"); + Cell.structureCell(item.RatedI); + Cell.structureCell(item.RatedP); + Cell.structureCell(item.RatedF); + Cell.structureCell(item.RatedN); + builder.EndRow(); + } + } + else { Cell.structureCell(""); Cell.structureCell(""); @@ -584,10 +582,17 @@ #endregion 瀹為檯鑳借�楁儏鍐佃〃 Text_left_12_black.structureLeft20Text("2.3銆侀珮鑳借�楀垎鏋�"); + Text_left_12_black.structureTextAndImage(vm.Working.EnergyAnalyImagePath, 240, 400); Text_left_12_black.structureLeft20Text("閫氳繃瀵圭郴缁熻繍琛屽伐鍐佃繘琛屾娴嬪垎鏋愶紝璁や负璇ョ郴缁熷瓨鍦� 鈥滀綆鏁堢巼銆侀珮鑳借�椻�濈幇璞°�備富瑕佽〃鐜板湪浠ヤ笅鏂归潰锛�"); Text_left_12_black.structureLeft20Text("1锛夋按娉电壒鎬т笌绠$綉鐗规�т笉鐩稿尮閰嶏紝閫犳垚姘存车鍋忕璁捐宸ュ喌杩愯锛屽叾瀹為檯杩愯鏁堢巼涓嬮檷锛岄�犳垚杈冨鐨勬棤鏁堣兘鑰楋紝澶勪簬涓嶇粡娴庤繍琛岀姸鎬侊紱鑰屽綋鍓嶅惊鐜按宸ュ喌鍙堝苟闈炴槸绯荤粺鐨勬渶浣崇姸鎬侊紝浼樺寲绠$綉闃绘姉鏁村悎杩愯鍙傛暟锛屽皢浣挎湰绯荤粺鍏锋湁杈冨ぇ鐨勮妭鑳界┖闂淬��"); Text_left_12_black.structureLeft20Text("2锛夋按娉垫�ц兘鏇茬嚎鍜岀缃戠壒鎬ф洸绾夸笉鐩稿尮閰嶏紝鍦ㄦ按绯荤粺鍦ㄨ緭閫佽繃绋嬩腑瀛樺湪闂榾璋冭妭闃诲姏锛屽鍔犱簡杈撻�佽繃绋嬩腑鐨勬棤鏁堣兘鑰楋紝闄嶄綆姘寸郴缁熺殑杈撻�佹晥鐜囷紱闇�瑕侀噸鏂板绯荤粺杩涜寤烘ā鍒嗘瀽锛岄檷浣庣郴缁熼樆鍔涳紝浼樺寲姘存车鎵▼銆�"); Text_left_12_black.structureLeft20Text("3锛夌己涔忔妧鏈墜娈靛鎹㈢儹璁惧杩涜閲忓寲璋冭妭锛屾祦閲忚繃澶у瓨鍦ㄦ氮璐广�傞�氳繃璋冭瘯骞堕厤缃紭鍖栵紝瀵规崲鐑櫒瀹氶噺鍒嗘瀽锛屽埗瀹氭崲鐑櫒杩愯鍚堢悊鏂规锛屾敼鎹㈢儹鍣ㄤ负瀹氶噺鎺у埗锛屾渶缁堟秷闄ゆ棤鏁堟祦閲忥紝浣跨郴缁熷鍦ㄤ紭鑹姸鎬佷笅杩愯銆�"); + Text_left_12_black.structureLeft20Text("2.4銆佹崯澶辨洸绾�"); + Text_left_12_black.structureTextAndImage(vm.Working.LossCurveImagePath, 210, 400); + Text_left_12_black.structureLeft20Text("2.5銆佹崯澶辩粺璁�"); + var pathList = new List<string>() { vm.Working.EnergyInputImagePath, vm.Working.EnergyLossImagePath }; + Text_left_12_black.structureImagesInRow(pathList, 110, 220); + Text_left_12_black.structureTextAndImage(vm.Working.EnergyStatisticsImagePath, 50, 440); Text_left_15_black.structureText("涓夛級\t鑺傝兘鎶�鏀规柟妗堜笌璁捐鎸囨爣"); Text_left_12_black.structureLeft20Text("3.1銆佽璁′緷鎹�"); @@ -597,15 +602,13 @@ Text_left_12_black.structureLeft20Text("3.1.3 閫氳繃姘存车鎬ц兘鏇茬嚎妯℃嫙锛屾按娉佃繍琛屽湪涓�瀹氱殑宸ュ喌涓嬶紝鍏舵祦閲廞銆佹壃绋婬銆佸姛鐜嘝銆佹晥鐜囄风浉瀵瑰簲锛涘疄闄呮�ц兘涓庢爣鍑嗘�ц兘涓�鑸樊寮傦紙涓昏涓烘晥鐜囄锋寚鏍囷級"); Text_left_12_black.structureLeft20Text("3.1.4 绠¤矾绯荤粺鍘嬪姏闄嶆崲绠楀熀鏈叕寮忥紙i浠h〃鍗曚綅绫抽暱搴︾閬撲笂娌跨▼闃诲姏绯绘暟锛�"); - // 鎻掑叆鍥剧墖 - // builder.Write(" "); + Text_left_12_black.structureTextAndImage(Xhs.Core.Properties.Resources.Pressure_conversion_formula_big1_2, 30, 150); - Text_left_12_black.structureTextAndImage("00-core\\Pressure_conversion_formula_big1.2.png", 30, 150); // builder.Write(" "); - Text_left_12_black.structureTextAndImage("00-core\\Pressure_conversion_formula_small1.2.png", 35, 220); + Text_left_12_black.structureTextAndImage(Xhs.Core.Properties.Resources.Pressure_conversion_formula_small1_2, 35, 220); Text_left_12_black.structureLeft20Text("3.1.5 灞�閮ㄩ樆鍔涜绠楀叕寮�"); // builder.Write(" "); - Text_left_12_black.structureTextAndImage("00-core\\Local_resistance.png", 35, 60); + Text_left_12_black.structureTextAndImage(Xhs.Core.Properties.Resources.Local_resistance, 35, 60); Text_left_12_black.structureLeft20Text("3.1.6 闃�闂ㄥ紑搴︿笌灞�閮ㄩ樆鍔涚郴鏁板叧绯伙紙鍙傝�冿級"); #region 闃�闂ㄥ紑搴︿笌灞�閮ㄩ樆鍔涚郴鏁板叧绯昏〃 @@ -1278,7 +1281,5 @@ builder.MoveToDocumentEnd(); } } - - } -} +} \ No newline at end of file -- Gitblit v1.9.3