|
@@ -18,7 +18,6 @@ namespace WpfTest1.Toolkits
|
|
Document document = new Document(PageSize.A4);
|
|
Document document = new Document(PageSize.A4);
|
|
//中文字体
|
|
//中文字体
|
|
string chinese = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Fonts), "DENGL.TTF");
|
|
string chinese = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Fonts), "DENGL.TTF");
|
|
- //System.Console.WriteLine(chinese);
|
|
|
|
BaseFont baseFont = BaseFont.CreateFont(chinese, BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
|
|
BaseFont baseFont = BaseFont.CreateFont(chinese, BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
|
|
//文字大小12,文字样式
|
|
//文字大小12,文字样式
|
|
Font cn = new Font(baseFont, 12, Font.NORMAL);
|
|
Font cn = new Font(baseFont, 12, Font.NORMAL);
|
|
@@ -145,5 +144,2360 @@ namespace WpfTest1.Toolkits
|
|
//打开文件
|
|
//打开文件
|
|
System.Diagnostics.Process.Start(fileName);
|
|
System.Diagnostics.Process.Start(fileName);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ public static void generateReport_constum(SQLite.Record oneRecord)
|
|
|
|
+ {
|
|
|
|
+ string fileName = Constants.reportPath + "\\" + oneRecord.r_id.ToString() + ".pdf";
|
|
|
|
+ Document document = new Document(PageSize.A4);
|
|
|
|
+ //中文字体
|
|
|
|
+ string chinese = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Fonts), "simhei.TTF");
|
|
|
|
+ //System.Console.WriteLine(chinese);
|
|
|
|
+ BaseFont baseFont = BaseFont.CreateFont(chinese, BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
|
|
|
|
+ //文字大小12,文字样式
|
|
|
|
+ Font cn = new Font(baseFont, 12, Font.NORMAL);
|
|
|
|
+ PdfWriter writer = PdfWriter.GetInstance(document, new FileStream(fileName, FileMode.Create));
|
|
|
|
+ var jsonUserSelections = oneRecord.r_selection;
|
|
|
|
+ List<SQLite.UserSelection> uss = JsonMapper.ToObject<List<SQLite.UserSelection>>(jsonUserSelections);
|
|
|
|
+ Dictionary<string, int> all_values = get_all_values(uss);
|
|
|
|
+ Dictionary<string, int> all_pains = get_all_pains(uss);
|
|
|
|
+ document.Open();
|
|
|
|
+ //||page0:封面
|
|
|
|
+ string templateName = Constants.template_custom + "\\page0.pdf";
|
|
|
|
+ if (File.Exists(templateName))
|
|
|
|
+ {
|
|
|
|
+ document.NewPage();
|
|
|
|
+ PdfReader readerTemp = new PdfReader(templateName);
|
|
|
|
+ PdfImportedPage newPage = writer.GetImportedPage(readerTemp, 1);
|
|
|
|
+ PdfContentByte cb = writer.DirectContent;
|
|
|
|
+ cb.AddTemplate(newPage, 0, 0);
|
|
|
|
+ }
|
|
|
|
+ //||page1:检测结果
|
|
|
|
+ templateName = Constants.template_custom + "\\page1.pdf";
|
|
|
|
+ if (File.Exists(templateName))
|
|
|
|
+ {
|
|
|
|
+ document.NewPage();
|
|
|
|
+
|
|
|
|
+ int col1_align_left = 90;
|
|
|
|
+ int col2_align_left = 290;
|
|
|
|
+ int col3_align_left = 460;
|
|
|
|
+ int risk_zoom_percentage = 30;
|
|
|
|
+ string 疼痛趋势发展高风险位置 = "";
|
|
|
|
+ string 疼痛趋势发展有风险位置 = "";
|
|
|
|
+ string 不良体态趋势发展高风险位置 = "";
|
|
|
|
+ string 不良体态趋势发展有风险位置 = "";
|
|
|
|
+ string 对日常生活的影响高风险位置 = "";
|
|
|
|
+ string 对日常生活的影响有风险位置 = "";
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ PdfReader readerTemp = new PdfReader(templateName);
|
|
|
|
+ PdfImportedPage newPage = writer.GetImportedPage(readerTemp, 1);
|
|
|
|
+ PdfContentByte cb = writer.DirectContent;
|
|
|
|
+ cb.AddTemplate(newPage, 0, 0);
|
|
|
|
+
|
|
|
|
+ //图示阶段
|
|
|
|
+ Image 疼痛趋势发展_颈肩部;
|
|
|
|
+ if (all_values["左侧侧卧髋外展"] <= 1 || all_values["右侧侧卧髋外展"] <= 1)
|
|
|
|
+ {
|
|
|
|
+ 疼痛趋势发展_颈肩部 = Image.GetInstance(Constants.template_custom_element + "\\highrisk_rect.jpg");
|
|
|
|
+ 疼痛趋势发展高风险位置 += "、颈肩部";
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧侧卧髋外展"] >= 3 && all_values["右侧侧卧髋外展"] >= 3)
|
|
|
|
+ {
|
|
|
|
+ 疼痛趋势发展_颈肩部 = Image.GetInstance(Constants.template_custom_element + "\\good_rect.jpg");
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ 疼痛趋势发展_颈肩部 = Image.GetInstance(Constants.template_custom_element + "\\normalrisk_rect.jpg");
|
|
|
|
+ 疼痛趋势发展有风险位置 += "、颈肩部";
|
|
|
|
+ }
|
|
|
|
+ 疼痛趋势发展_颈肩部.ScalePercent(30);//设置图片比例
|
|
|
|
+ 疼痛趋势发展_颈肩部.SetAbsolutePosition(col1_align_left, 690);//设置图片的绝对位置
|
|
|
|
+ cb.AddImage(疼痛趋势发展_颈肩部);
|
|
|
|
+
|
|
|
|
+ Image 疼痛趋势发展_腰部;
|
|
|
|
+ Image 对日常生活的影响_腰部;
|
|
|
|
+ if (all_values["左侧仰卧骨盆上抬"] <= 1 || all_values["右侧仰卧骨盆上抬"] <= 1 || all_values["左侧侧卧髋外展"] == 0 || all_values["右侧侧卧髋外展"] <= 1 || all_values["左侧俯卧支撑"] <= 1 || all_values["右侧俯卧支撑"] <= 1)
|
|
|
|
+ {
|
|
|
|
+ 疼痛趋势发展_腰部 = Image.GetInstance(Constants.template_custom_element + "\\highrisk_rect.jpg");
|
|
|
|
+ 对日常生活的影响_腰部 = Image.GetInstance(Constants.template_custom_element + "\\highrisk_rect.jpg");
|
|
|
|
+ 疼痛趋势发展高风险位置 += "、腰部";
|
|
|
|
+ 对日常生活的影响高风险位置 += "、腰部";
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧仰卧骨盆上抬"] >= 3 && all_values["右侧仰卧骨盆上抬"] >= 3 && all_values["左侧侧卧髋外展"] >= 3 && all_values["右侧侧卧髋外展"] >= 3 && all_values["左侧俯卧支撑"] >= 3 && all_values["右侧俯卧支撑"] >= 3)
|
|
|
|
+ {
|
|
|
|
+ 疼痛趋势发展_腰部 = Image.GetInstance(Constants.template_custom_element + "\\good_rect.jpg");
|
|
|
|
+ 对日常生活的影响_腰部 = Image.GetInstance(Constants.template_custom_element + "\\good_rect.jpg");
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ 疼痛趋势发展_腰部 = Image.GetInstance(Constants.template_custom_element + "\\normalrisk_rect.jpg");
|
|
|
|
+ 对日常生活的影响_腰部 = Image.GetInstance(Constants.template_custom_element + "\\normalrisk_rect.jpg");
|
|
|
|
+ 疼痛趋势发展有风险位置 += "、腰部";
|
|
|
|
+ 对日常生活的影响有风险位置 += "、腰部";
|
|
|
|
+ }
|
|
|
|
+ 疼痛趋势发展_腰部.ScalePercent(risk_zoom_percentage);//设置图片比例
|
|
|
|
+ 疼痛趋势发展_腰部.SetAbsolutePosition(col1_align_left, 610);//设置图片的绝对位置
|
|
|
|
+ cb.AddImage(疼痛趋势发展_腰部);
|
|
|
|
+ 对日常生活的影响_腰部.ScalePercent(risk_zoom_percentage);//设置图片比例
|
|
|
|
+ 对日常生活的影响_腰部.SetAbsolutePosition(col3_align_left, 615);//设置图片的绝对位置
|
|
|
|
+ cb.AddImage(对日常生活的影响_腰部);
|
|
|
|
+
|
|
|
|
+ Image 疼痛趋势发展_腿部;
|
|
|
|
+ if (all_values["左侧俯卧支撑"] <= 1 || all_values["右侧俯卧支撑"] <= 1)
|
|
|
|
+ {
|
|
|
|
+ 疼痛趋势发展_腿部 = Image.GetInstance(Constants.template_custom_element + "\\highrisk_rect.jpg");
|
|
|
|
+ 疼痛趋势发展高风险位置 += "、腿部";
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧俯卧支撑"] >= 3 && all_values["右侧俯卧支撑"] >= 3)
|
|
|
|
+ {
|
|
|
|
+ 疼痛趋势发展_腿部 = Image.GetInstance(Constants.template_custom_element + "\\good_rect.jpg");
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ 疼痛趋势发展_腿部 = Image.GetInstance(Constants.template_custom_element + "\\normalrisk_rect.jpg");
|
|
|
|
+ 疼痛趋势发展有风险位置 += "、腿部";
|
|
|
|
+ }
|
|
|
|
+ 疼痛趋势发展_腿部.ScalePercent(risk_zoom_percentage);//设置图片比例
|
|
|
|
+ 疼痛趋势发展_腿部.SetAbsolutePosition(col1_align_left, 540);//设置图片的绝对位置
|
|
|
|
+ cb.AddImage(疼痛趋势发展_腿部);
|
|
|
|
+
|
|
|
|
+ Image 不良体态趋势发展_颈肩部;
|
|
|
|
+ if (all_values["左侧仰卧骨盆上抬"] == 0 || all_values["右侧仰卧骨盆上抬"] == 0 || all_values["左侧侧卧髋外展"] == 0 || all_values["右侧侧卧髋外展"] == 0)
|
|
|
|
+ {
|
|
|
|
+ 不良体态趋势发展_颈肩部 = Image.GetInstance(Constants.template_custom_element + "\\highrisk_rect.jpg");
|
|
|
|
+ 不良体态趋势发展高风险位置 += "、颈肩部";
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧仰卧骨盆上抬"] == 1 || all_values["右侧仰卧骨盆上抬"] == 1 || all_values["左侧侧卧髋外展"] == 1 || all_values["右侧侧卧髋外展"] == 1)
|
|
|
|
+ {
|
|
|
|
+ 不良体态趋势发展_颈肩部 = Image.GetInstance(Constants.template_custom_element + "\\normalrisk_rect.jpg");
|
|
|
|
+ 不良体态趋势发展有风险位置 += "、颈肩部";
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ 不良体态趋势发展_颈肩部 = Image.GetInstance(Constants.template_custom_element + "\\good_rect.jpg");
|
|
|
|
+ }
|
|
|
|
+ 不良体态趋势发展_颈肩部.ScalePercent(risk_zoom_percentage);//设置图片比例
|
|
|
|
+ 不良体态趋势发展_颈肩部.SetAbsolutePosition(col2_align_left, 700);//设置图片的绝对位置
|
|
|
|
+ cb.AddImage(不良体态趋势发展_颈肩部);
|
|
|
|
+
|
|
|
|
+ Image 不良体态趋势发展_胸部;
|
|
|
|
+ if (all_values["左侧侧卧髋外展"] == 0 && all_values["右侧侧卧髋外展"] == 0)
|
|
|
|
+ {
|
|
|
|
+ 不良体态趋势发展_胸部 = Image.GetInstance(Constants.template_custom_element + "\\highrisk_rect.jpg");
|
|
|
|
+ 不良体态趋势发展高风险位置 += "、胸部";
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧侧卧髋外展"] == 0 || all_values["右侧侧卧髋外展"] == 0)
|
|
|
|
+ {
|
|
|
|
+ 不良体态趋势发展_胸部 = Image.GetInstance(Constants.template_custom_element + "\\normalrisk_rect.jpg");
|
|
|
|
+ 不良体态趋势发展有风险位置 += "、胸部";
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ 不良体态趋势发展_胸部 = Image.GetInstance(Constants.template_custom_element + "\\good_rect.jpg");
|
|
|
|
+ }
|
|
|
|
+ 不良体态趋势发展_胸部.ScalePercent(risk_zoom_percentage);//设置图片比例
|
|
|
|
+ 不良体态趋势发展_胸部.SetAbsolutePosition(col2_align_left, 665);//设置图片的绝对位置
|
|
|
|
+ cb.AddImage(不良体态趋势发展_胸部);
|
|
|
|
+
|
|
|
|
+ Image 不良体态趋势发展_腹部;
|
|
|
|
+ if (all_values["左侧俯卧支撑"] <= 1 || all_values["右侧俯卧支撑"] <= 1)
|
|
|
|
+ {
|
|
|
|
+ 不良体态趋势发展_腹部 = Image.GetInstance(Constants.template_custom_element + "\\highrisk_rect.jpg");
|
|
|
|
+ 不良体态趋势发展高风险位置 += "、腹部";
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧俯卧支撑"] >= 3 && all_values["右侧俯卧支撑"] >= 3)
|
|
|
|
+ {
|
|
|
|
+ 不良体态趋势发展_腹部 = Image.GetInstance(Constants.template_custom_element + "\\good_rect.jpg");
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ 不良体态趋势发展_腹部 = Image.GetInstance(Constants.template_custom_element + "\\normalrisk_rect.jpg");
|
|
|
|
+ 不良体态趋势发展有风险位置 += "、腹部";
|
|
|
|
+ }
|
|
|
|
+ 不良体态趋势发展_腹部.ScalePercent(risk_zoom_percentage);//设置图片比例
|
|
|
|
+ 不良体态趋势发展_腹部.SetAbsolutePosition(col2_align_left, 630);//设置图片的绝对位置
|
|
|
|
+ cb.AddImage(不良体态趋势发展_腹部);
|
|
|
|
+
|
|
|
|
+ Image 不良体态趋势发展_骨盆;
|
|
|
|
+ Image 不良体态趋势发展_臀部;
|
|
|
|
+ Image 对日常生活的影响_颈肩部;
|
|
|
|
+ if (all_values["左侧仰卧骨盆上抬"] <= 1 || all_values["右侧仰卧骨盆上抬"] <= 1 || all_values["左侧侧卧髋外展"] <= 1 || all_values["右侧侧卧髋外展"] <= 1)
|
|
|
|
+ {
|
|
|
|
+ 不良体态趋势发展_骨盆 = Image.GetInstance(Constants.template_custom_element + "\\highrisk_rect.jpg");
|
|
|
|
+ 不良体态趋势发展_臀部 = Image.GetInstance(Constants.template_custom_element + "\\highrisk_rect.jpg");
|
|
|
|
+ 对日常生活的影响_颈肩部 = Image.GetInstance(Constants.template_custom_element + "\\highrisk_rect.jpg");
|
|
|
|
+ 不良体态趋势发展高风险位置 += "、骨盆";
|
|
|
|
+ 不良体态趋势发展高风险位置 += "、臀部";
|
|
|
|
+ 对日常生活的影响高风险位置 += "、颈肩部";
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧仰卧骨盆上抬"] >= 3 && all_values["右侧仰卧骨盆上抬"] >= 3 && all_values["左侧侧卧髋外展"] >= 3 && all_values["右侧侧卧髋外展"] >= 3)
|
|
|
|
+ {
|
|
|
|
+ 不良体态趋势发展_骨盆 = Image.GetInstance(Constants.template_custom_element + "\\good_rect.jpg");
|
|
|
|
+ 不良体态趋势发展_臀部 = Image.GetInstance(Constants.template_custom_element + "\\good_rect.jpg");
|
|
|
|
+ 对日常生活的影响_颈肩部 = Image.GetInstance(Constants.template_custom_element + "\\good_rect.jpg");
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ 不良体态趋势发展_骨盆 = Image.GetInstance(Constants.template_custom_element + "\\normalrisk_rect.jpg");
|
|
|
|
+ 不良体态趋势发展_臀部 = Image.GetInstance(Constants.template_custom_element + "\\normalrisk_rect.jpg");
|
|
|
|
+ 对日常生活的影响_颈肩部 = Image.GetInstance(Constants.template_custom_element + "\\normalrisk_rect.jpg");
|
|
|
|
+ 不良体态趋势发展有风险位置 += "、骨盆";
|
|
|
|
+ 不良体态趋势发展有风险位置 += "、臀部";
|
|
|
|
+ 对日常生活的影响有风险位置 += "、颈肩部";
|
|
|
|
+ }
|
|
|
|
+ 不良体态趋势发展_骨盆.ScalePercent(risk_zoom_percentage);//设置图片比例
|
|
|
|
+ 不良体态趋势发展_骨盆.SetAbsolutePosition(col2_align_left, 600);//设置图片的绝对位置
|
|
|
|
+ cb.AddImage(不良体态趋势发展_骨盆);
|
|
|
|
+ 不良体态趋势发展_臀部.ScalePercent(risk_zoom_percentage);//设置图片比例
|
|
|
|
+ 不良体态趋势发展_臀部.SetAbsolutePosition(col2_align_left, 570);//设置图片的绝对位置
|
|
|
|
+ cb.AddImage(不良体态趋势发展_臀部);
|
|
|
|
+ 对日常生活的影响_颈肩部.ScalePercent(risk_zoom_percentage);//设置图片比例
|
|
|
|
+ 对日常生活的影响_颈肩部.SetAbsolutePosition(col3_align_left, 655);//设置图片的绝对位置
|
|
|
|
+ cb.AddImage(对日常生活的影响_颈肩部);
|
|
|
|
+
|
|
|
|
+ Image 不良体态趋势发展_腿部;
|
|
|
|
+ if (all_values["左侧仰卧骨盆上抬"] == 0 || all_values["右侧仰卧骨盆上抬"] == 0 || all_values["左侧侧卧髋外展"] == 0 || all_values["右侧侧卧髋外展"] == 0)
|
|
|
|
+ {
|
|
|
|
+ 不良体态趋势发展_腿部 = Image.GetInstance(Constants.template_custom_element + "\\highrisk_rect.jpg");
|
|
|
|
+ 不良体态趋势发展高风险位置 += "、腿部";
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧仰卧骨盆上抬"] == 1 || all_values["右侧仰卧骨盆上抬"] == 1 || all_values["左侧侧卧髋外展"] == 1 || all_values["右侧侧卧髋外展"] == 1)
|
|
|
|
+ {
|
|
|
|
+ 不良体态趋势发展_腿部 = Image.GetInstance(Constants.template_custom_element + "\\normalrisk_rect.jpg");
|
|
|
|
+ 不良体态趋势发展有风险位置 += "、腿部";
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ 不良体态趋势发展_腿部 = Image.GetInstance(Constants.template_custom_element + "\\good_rect.jpg");
|
|
|
|
+ }
|
|
|
|
+ 不良体态趋势发展_腿部.ScalePercent(risk_zoom_percentage);//设置图片比例
|
|
|
|
+ 不良体态趋势发展_腿部.SetAbsolutePosition(col2_align_left, 535);//设置图片的绝对位置
|
|
|
|
+ cb.AddImage(不良体态趋势发展_腿部);
|
|
|
|
+
|
|
|
|
+ Image 对日常生活的影响_头部;
|
|
|
|
+ if (all_values["左侧仰卧骨盆上抬"] <= 1 || all_values["右侧仰卧骨盆上抬"] <= 1)
|
|
|
|
+ {
|
|
|
|
+ 对日常生活的影响_头部 = Image.GetInstance(Constants.template_custom_element + "\\highrisk_rect.jpg");
|
|
|
|
+ 对日常生活的影响高风险位置 += "、头部";
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧仰卧骨盆上抬"] >= 3 && all_values["右侧仰卧骨盆上抬"] >= 3)
|
|
|
|
+ {
|
|
|
|
+ 对日常生活的影响_头部 = Image.GetInstance(Constants.template_custom_element + "\\good_rect.jpg");
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ 对日常生活的影响_头部 = Image.GetInstance(Constants.template_custom_element + "\\normalrisk_rect.jpg");
|
|
|
|
+ 对日常生活的影响有风险位置 += "、头部";
|
|
|
|
+ }
|
|
|
|
+ 对日常生活的影响_头部.ScalePercent(risk_zoom_percentage);//设置图片比例
|
|
|
|
+ 对日常生活的影响_头部.SetAbsolutePosition(col3_align_left, 700);//设置图片的绝对位置
|
|
|
|
+ cb.AddImage(对日常生活的影响_头部);
|
|
|
|
+
|
|
|
|
+ Image 对日常生活的影响_盆底;
|
|
|
|
+ if (all_values["左侧俯卧支撑"] == 0 || all_values["右侧俯卧支撑"] == 0)
|
|
|
|
+ {
|
|
|
|
+ 对日常生活的影响_盆底 = Image.GetInstance(Constants.template_custom_element + "\\highrisk_rect.jpg");
|
|
|
|
+ 对日常生活的影响高风险位置 += "、盆底";
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧俯卧支撑"] >= 3 && all_values["右侧俯卧支撑"] >= 3)
|
|
|
|
+ {
|
|
|
|
+ 对日常生活的影响_盆底 = Image.GetInstance(Constants.template_custom_element + "\\good_rect.jpg");
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ 对日常生活的影响_盆底 = Image.GetInstance(Constants.template_custom_element + "\\normalrisk_rect.jpg");
|
|
|
|
+ 对日常生活的影响有风险位置 += "、盆底";
|
|
|
|
+ }
|
|
|
|
+ 对日常生活的影响_盆底.ScalePercent(risk_zoom_percentage);//设置图片比例
|
|
|
|
+ 对日常生活的影响_盆底.SetAbsolutePosition(col3_align_left, 575);//设置图片的绝对位置
|
|
|
|
+ cb.AddImage(对日常生活的影响_盆底);
|
|
|
|
+
|
|
|
|
+ Image 对日常生活的影响_膝部;
|
|
|
|
+ if (all_values["左侧侧卧髋外展"] <= 1 || all_values["右侧侧卧髋外展"] <= 1 || all_values["左侧俯卧支撑"] <= 1 || all_values["右侧俯卧支撑"] <= 1)
|
|
|
|
+ {
|
|
|
|
+ 对日常生活的影响_膝部 = Image.GetInstance(Constants.template_custom_element + "\\highrisk_rect.jpg");
|
|
|
|
+ 对日常生活的影响高风险位置 += "、膝部";
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧侧卧髋外展"] >= 3 && all_values["右侧侧卧髋外展"] >= 3 && all_values["左侧俯卧支撑"] >= 3 && all_values["右侧俯卧支撑"] >= 3)
|
|
|
|
+ {
|
|
|
|
+ 对日常生活的影响_膝部 = Image.GetInstance(Constants.template_custom_element + "\\good_rect.jpg");
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ 对日常生活的影响_膝部 = Image.GetInstance(Constants.template_custom_element + "\\normalrisk_rect.jpg");
|
|
|
|
+ 对日常生活的影响有风险位置 += "、膝部";
|
|
|
|
+ }
|
|
|
|
+ 对日常生活的影响_膝部.ScalePercent(risk_zoom_percentage);//设置图片比例
|
|
|
|
+ 对日常生活的影响_膝部.SetAbsolutePosition(col3_align_left, 535);//设置图片的绝对位置
|
|
|
|
+ cb.AddImage(对日常生活的影响_膝部);
|
|
|
|
+
|
|
|
|
+ string 图示显示_疼痛趋势发展 = "";
|
|
|
|
+ string 图示显示_不良体态趋势发展 = "";
|
|
|
|
+ string 图示显示_对日常生活的影响 = "";
|
|
|
|
+ if (疼痛趋势发展高风险位置 != "")
|
|
|
|
+ {
|
|
|
|
+ 图示显示_疼痛趋势发展 += 疼痛趋势发展高风险位置.Substring(1) + "的疼痛发展风险高";
|
|
|
|
+ }
|
|
|
|
+ if (疼痛趋势发展有风险位置 != "")
|
|
|
|
+ {
|
|
|
|
+ 图示显示_疼痛趋势发展 += "," + 疼痛趋势发展有风险位置.Substring(1) + "存在疼痛发生的风险。";
|
|
|
|
+ }
|
|
|
|
+ if (不良体态趋势发展高风险位置 != "")
|
|
|
|
+ {
|
|
|
|
+ 图示显示_不良体态趋势发展 += 不良体态趋势发展高风险位置.Substring(1) + "发生不良体态的风险高";
|
|
|
|
+ }
|
|
|
|
+ if (不良体态趋势发展有风险位置 != "")
|
|
|
|
+ {
|
|
|
|
+ 图示显示_不良体态趋势发展 += "," + 不良体态趋势发展有风险位置.Substring(1) + "存在发生不良体态发生的风险。";
|
|
|
|
+ }
|
|
|
|
+ if (对日常生活的影响高风险位置 != "")
|
|
|
|
+ {
|
|
|
|
+ 图示显示_对日常生活的影响 += 对日常生活的影响高风险位置.Substring(1) + "影响日常生活的风险高";
|
|
|
|
+ }
|
|
|
|
+ if (对日常生活的影响有风险位置 != "")
|
|
|
|
+ {
|
|
|
|
+ 图示显示_对日常生活的影响 += "," + 对日常生活的影响有风险位置.Substring(1) + "存在影响日常生活的风险。";
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ int caption_align_left = 105;
|
|
|
|
+ int tab_col1_align_left = 289;
|
|
|
|
+ int tab_col2_align_left = 379;
|
|
|
|
+ int tab_col3_align_left = 469;
|
|
|
|
+
|
|
|
|
+ //加载文本
|
|
|
|
+ cb.BeginText();
|
|
|
|
+ //文字加粗
|
|
|
|
+ //设置文本描边宽度
|
|
|
|
+ //cb.SetLineWidth(0.4);
|
|
|
|
+ //设置文本为加粗模式
|
|
|
|
+ //cb.SetTextRenderingMode(PdfContentByte.TEXT_RENDER_MODE_FILL_STROKE);
|
|
|
|
+ cb.SetTextRenderingMode(0);
|
|
|
|
+ //设置文本为中文、和字体大小
|
|
|
|
+ cb.SetRGBColorFill(39, 64, 90);
|
|
|
|
+ cb.SetFontAndSize(baseFont, 8);
|
|
|
|
+
|
|
|
|
+ //设置文本绝对坐标
|
|
|
|
+ cb.SetTextMatrix(caption_align_left, 428);
|
|
|
|
+ //设置文本
|
|
|
|
+ cb.ShowText(图示显示_疼痛趋势发展);
|
|
|
|
+ cb.SetTextMatrix(caption_align_left, 413);
|
|
|
|
+ cb.ShowText(图示显示_不良体态趋势发展);
|
|
|
|
+ cb.SetTextMatrix(caption_align_left, 398);
|
|
|
|
+ cb.ShowText(图示显示_对日常生活的影响);
|
|
|
|
+
|
|
|
|
+ //填表
|
|
|
|
+ cb.SetLineWidth(0.3);
|
|
|
|
+ cb.SetFontAndSize(baseFont, 12);
|
|
|
|
+ cb.SetTextMatrix(tab_col2_align_left, 339);
|
|
|
|
+ cb.ShowText(all_values["左侧仰卧骨盆上抬"].ToString());
|
|
|
|
+ if (all_values["左侧仰卧骨盆上抬"] <= 1)
|
|
|
|
+ {
|
|
|
|
+ cb.SetTextMatrix(tab_col3_align_left, 339);
|
|
|
|
+ cb.ShowText("√");
|
|
|
|
+ }
|
|
|
|
+ cb.SetTextMatrix(tab_col2_align_left, 313);
|
|
|
|
+ cb.ShowText(all_values["右侧仰卧骨盆上抬"].ToString());
|
|
|
|
+ if (all_values["右侧仰卧骨盆上抬"] <= 1)
|
|
|
|
+ {
|
|
|
|
+ cb.SetTextMatrix(tab_col3_align_left, 313);
|
|
|
|
+ cb.ShowText("√");
|
|
|
|
+ }
|
|
|
|
+ cb.SetTextMatrix(tab_col2_align_left, 287);
|
|
|
|
+ cb.ShowText(all_values["左侧侧卧髋外展"].ToString());
|
|
|
|
+ if (all_values["左侧侧卧髋外展"] <= 1)
|
|
|
|
+ {
|
|
|
|
+ cb.SetTextMatrix(tab_col3_align_left, 287);
|
|
|
|
+ cb.ShowText("√");
|
|
|
|
+ }
|
|
|
|
+ cb.SetTextMatrix(tab_col2_align_left, 261);
|
|
|
|
+ cb.ShowText(all_values["右侧侧卧髋外展"].ToString());
|
|
|
|
+ if (all_values["右侧侧卧髋外展"] <= 1)
|
|
|
|
+ {
|
|
|
|
+ cb.SetTextMatrix(tab_col3_align_left, 261);
|
|
|
|
+ cb.ShowText("√");
|
|
|
|
+ }
|
|
|
|
+ cb.SetTextMatrix(tab_col2_align_left, 235);
|
|
|
|
+ cb.ShowText(all_values["左侧俯卧支撑"].ToString());
|
|
|
|
+ if (all_values["左侧俯卧支撑"] <= 1)
|
|
|
|
+ {
|
|
|
|
+ cb.SetTextMatrix(tab_col3_align_left, 235);
|
|
|
|
+ cb.ShowText("√");
|
|
|
|
+ }
|
|
|
|
+ cb.SetTextMatrix(tab_col2_align_left, 209);
|
|
|
|
+ cb.ShowText(all_values["右侧俯卧支撑"].ToString());
|
|
|
|
+ if (all_values["右侧俯卧支撑"] <= 1)
|
|
|
|
+ {
|
|
|
|
+ cb.SetTextMatrix(tab_col3_align_left, 209);
|
|
|
|
+ cb.ShowText("√");
|
|
|
|
+ }
|
|
|
|
+ cb.SetTextMatrix(tab_col1_align_left, 339);
|
|
|
|
+ cb.ShowText(all_pains["左侧仰卧骨盆上抬"].ToString());
|
|
|
|
+ cb.SetTextMatrix(tab_col1_align_left, 313);
|
|
|
|
+ cb.ShowText(all_pains["右侧仰卧骨盆上抬"].ToString());
|
|
|
|
+ cb.SetTextMatrix(tab_col1_align_left, 287);
|
|
|
|
+ cb.ShowText(all_pains["左侧侧卧髋外展"].ToString());
|
|
|
|
+ cb.SetTextMatrix(tab_col1_align_left, 261);
|
|
|
|
+ cb.ShowText(all_pains["右侧侧卧髋外展"].ToString());
|
|
|
|
+ cb.SetTextMatrix(tab_col1_align_left, 235);
|
|
|
|
+ cb.ShowText(all_pains["左侧俯卧支撑"].ToString());
|
|
|
|
+ cb.SetTextMatrix(tab_col1_align_left, 209);
|
|
|
|
+ cb.ShowText(all_pains["右侧俯卧支撑"].ToString());
|
|
|
|
+ cb.EndText();
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ //||第二页
|
|
|
|
+ templateName = Constants.template_custom + "\\page2.pdf";
|
|
|
|
+ if (File.Exists(templateName))
|
|
|
|
+ {
|
|
|
|
+ document.NewPage();
|
|
|
|
+
|
|
|
|
+ int up_align_left = 238;
|
|
|
|
+ int up_align_buttom = 616;
|
|
|
|
+ int down_col1_align_left = 231;
|
|
|
|
+ int down_col2_align_left = 249;
|
|
|
|
+ int down_align_buttom = 260;
|
|
|
|
+ int up_zoom_percentage = 25;
|
|
|
|
+ int down_zoom_percentage = 25;
|
|
|
|
+ string 颈肩部风险文件 = "page2_up_1jinjian_";
|
|
|
|
+ string 腰部风险文件 = "page2_up_2yaobu_";
|
|
|
|
+ string 膝部风险文件 = "page2_up_3xibu_";
|
|
|
|
+ string 颈肩部疼痛趋势文件 = "page2_down_jinjian_";
|
|
|
|
+ string 腰部疼痛趋势文件 = "page2_down_yaobu_";
|
|
|
|
+ string 膝部疼痛趋势文件 = "page2_down_xibu_";
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ PdfReader readerTemp = new PdfReader(templateName);
|
|
|
|
+ PdfImportedPage newPage = writer.GetImportedPage(readerTemp, 1);
|
|
|
|
+ PdfContentByte cb = writer.DirectContent;
|
|
|
|
+ cb.AddTemplate(newPage, 0, 0);
|
|
|
|
+
|
|
|
|
+ Image one_image;
|
|
|
|
+ if (all_values["左侧侧卧髋外展"] == 0 && all_values["右侧侧卧髋外展"] == 0)
|
|
|
|
+ {
|
|
|
|
+ one_image = Image.GetInstance(Constants.template_custom_element + "\\" + 颈肩部风险文件 + "5.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧侧卧髋外展"] == 0 || all_values["右侧侧卧髋外展"] == 0)
|
|
|
|
+ {
|
|
|
|
+ one_image = Image.GetInstance(Constants.template_custom_element + "\\" + 颈肩部风险文件 + "4.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧侧卧髋外展"] == 1 || all_values["右侧侧卧髋外展"] == 1)
|
|
|
|
+ {
|
|
|
|
+ one_image = Image.GetInstance(Constants.template_custom_element + "\\" + 颈肩部风险文件 + "3.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧侧卧髋外展"] == 2 || all_values["右侧侧卧髋外展"] == 2)
|
|
|
|
+ {
|
|
|
|
+ one_image = Image.GetInstance(Constants.template_custom_element + "\\" + 颈肩部风险文件 + "2.jpg");
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ one_image = Image.GetInstance(Constants.template_custom_element + "\\" + 颈肩部风险文件 + "1.jpg");
|
|
|
|
+ }
|
|
|
|
+ one_image.ScalePercent(up_zoom_percentage);//设置图片比例
|
|
|
|
+ one_image.SetAbsolutePosition(up_align_left, up_align_buttom);//设置图片的绝对位置
|
|
|
|
+ cb.AddImage(one_image);
|
|
|
|
+
|
|
|
|
+ if ((all_values["左侧侧卧髋外展"] == 0 && all_values["右侧侧卧髋外展"] == 0) || (all_values["左侧仰卧骨盆上抬"] == 0 && all_values["右侧仰卧骨盆上抬"] == 0) || (all_values["左侧俯卧支撑"] == 0 && all_values["右侧俯卧支撑"] == 0))
|
|
|
|
+ {
|
|
|
|
+ one_image = Image.GetInstance(Constants.template_custom_element + "\\" + 腰部风险文件 + "5.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧侧卧髋外展"] == 0 || all_values["右侧侧卧髋外展"] == 0 || all_values["左侧仰卧骨盆上抬"] == 0 || all_values["右侧仰卧骨盆上抬"] == 0 || all_values["左侧俯卧支撑"] == 0 || all_values["右侧俯卧支撑"] == 0)
|
|
|
|
+ {
|
|
|
|
+ one_image = Image.GetInstance(Constants.template_custom_element + "\\" + 腰部风险文件 + "4.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧侧卧髋外展"] == 1 || all_values["右侧侧卧髋外展"] == 1 || all_values["左侧仰卧骨盆上抬"] == 1 || all_values["右侧仰卧骨盆上抬"] == 1 || all_values["左侧俯卧支撑"] == 1 || all_values["右侧俯卧支撑"] == 1)
|
|
|
|
+ {
|
|
|
|
+ one_image = Image.GetInstance(Constants.template_custom_element + "\\" + 腰部风险文件 + "3.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧侧卧髋外展"] == 2 || all_values["右侧侧卧髋外展"] == 2 || all_values["左侧仰卧骨盆上抬"] == 2 || all_values["右侧仰卧骨盆上抬"] == 2 || all_values["左侧俯卧支撑"] == 2 || all_values["右侧俯卧支撑"] == 2)
|
|
|
|
+ {
|
|
|
|
+ one_image = Image.GetInstance(Constants.template_custom_element + "\\" + 腰部风险文件 + "2.jpg");
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ one_image = Image.GetInstance(Constants.template_custom_element + "\\" + 腰部风险文件 + "1.jpg");
|
|
|
|
+ }
|
|
|
|
+ one_image.ScalePercent(up_zoom_percentage);//设置图片比例
|
|
|
|
+ one_image.SetAbsolutePosition(up_align_left, up_align_buttom - 90);//设置图片的绝对位置
|
|
|
|
+ cb.AddImage(one_image);
|
|
|
|
+
|
|
|
|
+ if (all_values["左侧俯卧支撑"] == 0 && all_values["右侧俯卧支撑"] == 0)
|
|
|
|
+ {
|
|
|
|
+ one_image = Image.GetInstance(Constants.template_custom_element + "\\" + 膝部风险文件 + "5.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧俯卧支撑"] == 0 || all_values["右侧俯卧支撑"] == 0)
|
|
|
|
+ {
|
|
|
|
+ one_image = Image.GetInstance(Constants.template_custom_element + "\\" + 膝部风险文件 + "4.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧俯卧支撑"] == 1 || all_values["右侧俯卧支撑"] == 1)
|
|
|
|
+ {
|
|
|
|
+ one_image = Image.GetInstance(Constants.template_custom_element + "\\" + 膝部风险文件 + "3.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧俯卧支撑"] == 2 || all_values["右侧俯卧支撑"] == 2)
|
|
|
|
+ {
|
|
|
|
+ one_image = Image.GetInstance(Constants.template_custom_element + "\\" + 膝部风险文件 + "2.jpg");
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ one_image = Image.GetInstance(Constants.template_custom_element + "\\" + 膝部风险文件 + "1.jpg");
|
|
|
|
+ }
|
|
|
|
+ one_image.ScalePercent(up_zoom_percentage);//设置图片比例
|
|
|
|
+ one_image.SetAbsolutePosition(up_align_left, up_align_buttom - 90 * 2);//设置图片的绝对位置
|
|
|
|
+ cb.AddImage(one_image);
|
|
|
|
+
|
|
|
|
+ if (all_values["左侧侧卧髋外展"] < 2 || all_values["右侧侧卧髋外展"] < 2)
|
|
|
|
+ {
|
|
|
|
+ one_image = Image.GetInstance(Constants.template_custom_element + "\\" + 颈肩部疼痛趋势文件 + "3.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧侧卧髋外展"] == 2 || all_values["右侧侧卧髋外展"] == 2)
|
|
|
|
+ {
|
|
|
|
+ one_image = Image.GetInstance(Constants.template_custom_element + "\\" + 颈肩部疼痛趋势文件 + "2.jpg");
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ one_image = Image.GetInstance(Constants.template_custom_element + "\\" + 颈肩部疼痛趋势文件 + "1.jpg");
|
|
|
|
+ }
|
|
|
|
+ one_image.ScalePercent(down_zoom_percentage);//设置图片比例
|
|
|
|
+ one_image.SetAbsolutePosition(down_col1_align_left, down_align_buttom);//设置图片的绝对位置
|
|
|
|
+ cb.AddImage(one_image);
|
|
|
|
+
|
|
|
|
+ if (all_values["左侧侧卧髋外展"] < 2 || all_values["右侧侧卧髋外展"] < 2 || all_values["左侧仰卧骨盆上抬"] < 2 || all_values["右侧仰卧骨盆上抬"] < 2 || all_values["左侧俯卧支撑"] < 2 || all_values["右侧俯卧支撑"] < 2)
|
|
|
|
+ {
|
|
|
|
+ one_image = Image.GetInstance(Constants.template_custom_element + "\\" + 腰部疼痛趋势文件 + "3.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧侧卧髋外展"] == 2 || all_values["右侧侧卧髋外展"] == 2 || all_values["左侧仰卧骨盆上抬"] == 2 || all_values["右侧仰卧骨盆上抬"] == 2 || all_values["左侧俯卧支撑"] == 2 || all_values["右侧俯卧支撑"] == 2)
|
|
|
|
+ {
|
|
|
|
+ one_image = Image.GetInstance(Constants.template_custom_element + "\\" + 腰部疼痛趋势文件 + "2.jpg");
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ one_image = Image.GetInstance(Constants.template_custom_element + "\\" + 腰部疼痛趋势文件 + "1.jpg");
|
|
|
|
+ }
|
|
|
|
+ one_image.ScalePercent(down_zoom_percentage);//设置图片比例
|
|
|
|
+ one_image.SetAbsolutePosition(down_col2_align_left, down_align_buttom - 75);//设置图片的绝对位置
|
|
|
|
+ cb.AddImage(one_image);
|
|
|
|
+
|
|
|
|
+ if (all_values["左侧俯卧支撑"] < 2 || all_values["右侧俯卧支撑"] < 2)
|
|
|
|
+ {
|
|
|
|
+ one_image = Image.GetInstance(Constants.template_custom_element + "\\" + 膝部疼痛趋势文件 + "3.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧俯卧支撑"] == 2 || all_values["右侧俯卧支撑"] == 2)
|
|
|
|
+ {
|
|
|
|
+ one_image = Image.GetInstance(Constants.template_custom_element + "\\" + 膝部疼痛趋势文件 + "2.jpg");
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ one_image = Image.GetInstance(Constants.template_custom_element + "\\" + 膝部疼痛趋势文件 + "1.jpg");
|
|
|
|
+ }
|
|
|
|
+ one_image.ScalePercent(down_zoom_percentage);//设置图片比例
|
|
|
|
+ one_image.SetAbsolutePosition(down_col1_align_left, down_align_buttom - 140);//设置图片的绝对位置
|
|
|
|
+ cb.AddImage(one_image);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //||第三页
|
|
|
|
+ templateName = Constants.template_custom + "\\page3.pdf";
|
|
|
|
+ if (File.Exists(templateName))
|
|
|
|
+ {
|
|
|
|
+ document.NewPage();
|
|
|
|
+
|
|
|
|
+ int align_left = 230;
|
|
|
|
+ int text_align_left = 70;
|
|
|
|
+ int fig_align_buttom = 572;
|
|
|
|
+ int text_align_buttom = 535;
|
|
|
|
+ int fig_zoom_percentage = 20;
|
|
|
|
+ int text_zoom_percentage = 30;
|
|
|
|
+ int diff_text_h = 220;
|
|
|
|
+ int diff_fig_h = 212;
|
|
|
|
+ string 颈肩部详解 = "page3_up_";
|
|
|
|
+ string 腰部详解 = "page3_middle_";
|
|
|
|
+ string 膝部详解 = "page3_down_";
|
|
|
|
+
|
|
|
|
+ PdfReader readerTemp = new PdfReader(templateName);
|
|
|
|
+ PdfImportedPage newPage = writer.GetImportedPage(readerTemp, 1);
|
|
|
|
+ PdfContentByte cb = writer.DirectContent;
|
|
|
|
+ cb.AddTemplate(newPage, 0, 0);
|
|
|
|
+
|
|
|
|
+ Image one_image;
|
|
|
|
+ Image image_text;
|
|
|
|
+ if (all_values["左侧侧卧髋外展"] == 0 && all_values["右侧侧卧髋外展"] == 0)
|
|
|
|
+ {
|
|
|
|
+ one_image = Image.GetInstance(Constants.template_custom_element + "\\" + 颈肩部详解 + "3.jpg");
|
|
|
|
+ image_text = Image.GetInstance(Constants.template_custom_element + "\\" + 颈肩部详解 + "text_5.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧侧卧髋外展"] == 0 || all_values["右侧侧卧髋外展"] == 0)
|
|
|
|
+ {
|
|
|
|
+ one_image = Image.GetInstance(Constants.template_custom_element + "\\" + 颈肩部详解 + "3.jpg");
|
|
|
|
+ image_text = Image.GetInstance(Constants.template_custom_element + "\\" + 颈肩部详解 + "text_4.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧侧卧髋外展"] == 1 || all_values["右侧侧卧髋外展"] == 1)
|
|
|
|
+ {
|
|
|
|
+ one_image = Image.GetInstance(Constants.template_custom_element + "\\" + 颈肩部详解 + "3.jpg");
|
|
|
|
+ image_text = Image.GetInstance(Constants.template_custom_element + "\\" + 颈肩部详解 + "text_3.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧侧卧髋外展"] == 2 || all_values["右侧侧卧髋外展"] == 2)
|
|
|
|
+ {
|
|
|
|
+ one_image = Image.GetInstance(Constants.template_custom_element + "\\" + 颈肩部详解 + "2.jpg");
|
|
|
|
+ image_text = Image.GetInstance(Constants.template_custom_element + "\\" + 颈肩部详解 + "text_2.jpg");
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ one_image = Image.GetInstance(Constants.template_custom_element + "\\" + 颈肩部详解 + "1.jpg");
|
|
|
|
+ image_text = Image.GetInstance(Constants.template_custom_element + "\\" + 颈肩部详解 + "text_1.jpg");
|
|
|
|
+ }
|
|
|
|
+ one_image.ScalePercent(fig_zoom_percentage);//设置图片比例
|
|
|
|
+ one_image.SetAbsolutePosition(align_left, fig_align_buttom);//设置图片的绝对位置
|
|
|
|
+ cb.AddImage(one_image);
|
|
|
|
+ image_text.ScalePercent(text_zoom_percentage);
|
|
|
|
+ image_text.SetAbsolutePosition(text_align_left, text_align_buttom);
|
|
|
|
+ cb.AddImage(image_text);
|
|
|
|
+
|
|
|
|
+ if ((all_values["左侧侧卧髋外展"] == 0 && all_values["右侧侧卧髋外展"] == 0) || (all_values["左侧仰卧骨盆上抬"] == 0 && all_values["右侧仰卧骨盆上抬"] == 0) || (all_values["左侧俯卧支撑"] == 0 && all_values["右侧俯卧支撑"] == 0))
|
|
|
|
+ {
|
|
|
|
+ one_image = Image.GetInstance(Constants.template_custom_element + "\\" + 腰部详解 + "3.jpg");
|
|
|
|
+ image_text = Image.GetInstance(Constants.template_custom_element + "\\" + 腰部详解 + "text_5.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧侧卧髋外展"] == 0 || all_values["右侧侧卧髋外展"] == 0 || all_values["左侧仰卧骨盆上抬"] == 0 || all_values["右侧仰卧骨盆上抬"] == 0 || all_values["左侧俯卧支撑"] == 0 || all_values["右侧俯卧支撑"] == 0)
|
|
|
|
+ {
|
|
|
|
+ one_image = Image.GetInstance(Constants.template_custom_element + "\\" + 腰部详解 + "3.jpg");
|
|
|
|
+ image_text = Image.GetInstance(Constants.template_custom_element + "\\" + 腰部详解 + "text_4.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧侧卧髋外展"] == 1 || all_values["右侧侧卧髋外展"] == 1 || all_values["左侧仰卧骨盆上抬"] == 1 || all_values["右侧仰卧骨盆上抬"] == 1 || all_values["左侧俯卧支撑"] == 1 || all_values["右侧俯卧支撑"] == 1)
|
|
|
|
+ {
|
|
|
|
+ one_image = Image.GetInstance(Constants.template_custom_element + "\\" + 腰部详解 + "3.jpg");
|
|
|
|
+ image_text = Image.GetInstance(Constants.template_custom_element + "\\" + 腰部详解 + "text_3.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧侧卧髋外展"] == 2 || all_values["右侧侧卧髋外展"] == 2 || all_values["左侧仰卧骨盆上抬"] == 2 || all_values["右侧仰卧骨盆上抬"] == 2 || all_values["左侧俯卧支撑"] == 2 || all_values["右侧俯卧支撑"] == 2)
|
|
|
|
+ {
|
|
|
|
+ one_image = Image.GetInstance(Constants.template_custom_element + "\\" + 腰部详解 + "2.jpg");
|
|
|
|
+ image_text = Image.GetInstance(Constants.template_custom_element + "\\" + 腰部详解 + "text_2.jpg");
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ one_image = Image.GetInstance(Constants.template_custom_element + "\\" + 腰部详解 + "1.jpg");
|
|
|
|
+ image_text = Image.GetInstance(Constants.template_custom_element + "\\" + 腰部详解 + "text_1.jpg");
|
|
|
|
+ }
|
|
|
|
+ one_image.ScalePercent(fig_zoom_percentage);//设置图片比例
|
|
|
|
+ one_image.SetAbsolutePosition(align_left, fig_align_buttom - diff_fig_h + 5);//设置图片的绝对位置
|
|
|
|
+ cb.AddImage(one_image);
|
|
|
|
+ image_text.ScalePercent(text_zoom_percentage);
|
|
|
|
+ image_text.SetAbsolutePosition(text_align_left, text_align_buttom - diff_text_h);
|
|
|
|
+ cb.AddImage(image_text);
|
|
|
|
+
|
|
|
|
+ if (all_values["左侧俯卧支撑"] == 0 && all_values["右侧俯卧支撑"] == 0)
|
|
|
|
+ {
|
|
|
|
+ one_image = Image.GetInstance(Constants.template_custom_element + "\\" + 膝部详解 + "3.jpg");
|
|
|
|
+ image_text = Image.GetInstance(Constants.template_custom_element + "\\" + 膝部详解 + "text_5.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧俯卧支撑"] == 0 || all_values["右侧俯卧支撑"] == 0)
|
|
|
|
+ {
|
|
|
|
+ one_image = Image.GetInstance(Constants.template_custom_element + "\\" + 膝部详解 + "3.jpg");
|
|
|
|
+ image_text = Image.GetInstance(Constants.template_custom_element + "\\" + 膝部详解 + "text_4.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧俯卧支撑"] == 1 || all_values["右侧俯卧支撑"] == 1)
|
|
|
|
+ {
|
|
|
|
+ one_image = Image.GetInstance(Constants.template_custom_element + "\\" + 膝部详解 + "3.jpg");
|
|
|
|
+ image_text = Image.GetInstance(Constants.template_custom_element + "\\" + 膝部详解 + "text_3.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧俯卧支撑"] == 2 || all_values["右侧俯卧支撑"] == 2)
|
|
|
|
+ {
|
|
|
|
+ one_image = Image.GetInstance(Constants.template_custom_element + "\\" + 膝部详解 + "2.jpg");
|
|
|
|
+ image_text = Image.GetInstance(Constants.template_custom_element + "\\" + 膝部详解 + "text_2.jpg");
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ one_image = Image.GetInstance(Constants.template_custom_element + "\\" + 膝部详解 + "1.jpg");
|
|
|
|
+ image_text = Image.GetInstance(Constants.template_custom_element + "\\" + 膝部详解 + "text_1.jpg");
|
|
|
|
+ }
|
|
|
|
+ one_image.ScalePercent(fig_zoom_percentage);//设置图片比例
|
|
|
|
+ one_image.SetAbsolutePosition(align_left, fig_align_buttom - diff_fig_h * 2);//设置图片的绝对位置
|
|
|
|
+ cb.AddImage(one_image);
|
|
|
|
+ image_text.ScalePercent(text_zoom_percentage);
|
|
|
|
+ image_text.SetAbsolutePosition(text_align_left, text_align_buttom - diff_text_h * 2);
|
|
|
|
+ cb.AddImage(image_text);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //||第4页
|
|
|
|
+ templateName = Constants.template_custom + "\\page4.pdf";
|
|
|
|
+ if (File.Exists(templateName))
|
|
|
|
+ {
|
|
|
|
+ document.NewPage();
|
|
|
|
+ PdfReader readerTemp = new PdfReader(templateName);
|
|
|
|
+ PdfImportedPage newPage = writer.GetImportedPage(readerTemp, 1);
|
|
|
|
+ PdfContentByte cb = writer.DirectContent;
|
|
|
|
+ cb.AddTemplate(newPage, 0, 0);
|
|
|
|
+ string 扁平臀上 = "page4_up_tunbu_bianpingtun";
|
|
|
|
+ string 腿部变形上 = "page4_up_tuibu_tuibubianxing";
|
|
|
|
+ string 扁平臀下 = "page4_down_bianpingtun";
|
|
|
|
+ string 骨盆前倾上 = "page4_up_gupeng_gupengqianqin";
|
|
|
|
+ string 腹部松弛无力上 = "page4_up_fubu_fubuwuli";
|
|
|
|
+ string 腹部松弛无力下 = "page4_down_fubuwulisongchi";
|
|
|
|
+ string 腹直肌分离上 = "page4_up_fubu_fuzhijifenli";
|
|
|
|
+ string 腹直肌分离下 = "page4_down_fuzhijifenli";
|
|
|
|
+ string 高低肩 = "page4_up_jianbu_gaodijian";
|
|
|
|
+ string 脊柱侧弯 = "page4_up_xiongbu_jizhucewan";
|
|
|
|
+ string 骨盆侧倾上 = "page4_up_gupeng_gupengceqin";
|
|
|
|
+ string 骨盆侧倾下 = "page4_down_gupengceqin";
|
|
|
|
+ string 腿部长短不一 = "page4_up_tuibu_tuibuchangduanbuyi";
|
|
|
|
+ string 圆肩驼背 = "page4_up_jianbu_yuanjiantuobei";
|
|
|
|
+ string 骨盆前倾假翘臀上 = "page4_up_gupeng_gupengqianqinjiaqiaotun";
|
|
|
|
+ string 骨盆前倾假翘臀下 = "page4_down_gupengqianqin";
|
|
|
|
+ string 假胯宽上 = "page4_up_tunbu_jiakuakuan";
|
|
|
|
+ string 假胯宽下 = "page4_down_jiakuakuan";
|
|
|
|
+ string 腿部变短变粗 = "page4_up_tuibu_tuibiancubianduan";
|
|
|
|
+ Image 腿部1 = null;
|
|
|
|
+ Image 腿部2 = null;
|
|
|
|
+ Image 腿部3 = null;
|
|
|
|
+ Image 臀部1 = null;
|
|
|
|
+ Image 臀部2 = null;
|
|
|
|
+ Image 扁平臀 = null;
|
|
|
|
+ Image 骨盆1 = null;
|
|
|
|
+ Image 骨盆2 = null;
|
|
|
|
+ Image 骨盆3 = null;
|
|
|
|
+ Image 腹部1 = null;
|
|
|
|
+ Image 腹部2 = null;
|
|
|
|
+ Image 腹部松弛无力 = null;
|
|
|
|
+ Image 腹直肌分离 = null;
|
|
|
|
+ Image 肩部1 = null;
|
|
|
|
+ Image 肩部2 = null;
|
|
|
|
+ Image 胸部 = null;
|
|
|
|
+ Image 骨盆侧倾 = null;
|
|
|
|
+ Image 骨盆前倾假翘臀 = null;
|
|
|
|
+ Image 假胯宽 = null;
|
|
|
|
+ if (all_values["左侧仰卧骨盆上抬"] == 0 && all_values["右侧仰卧骨盆上抬"] == 0)
|
|
|
|
+ {
|
|
|
|
+ 臀部1 = Image.GetInstance(Constants.template_custom_element + "\\" + 扁平臀上 + "5.jpg");
|
|
|
|
+ 腿部1 = Image.GetInstance(Constants.template_custom_element + "\\" + 腿部变形上 + "2.jpg");
|
|
|
|
+ 肩部1 = Image.GetInstance(Constants.template_custom_element + "\\" + 圆肩驼背 + "2.jpg");
|
|
|
|
+ 骨盆1 = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆前倾假翘臀上 + "5.jpg");
|
|
|
|
+ 扁平臀 = Image.GetInstance(Constants.template_custom_element + "\\" + 扁平臀下 + "3.jpg");
|
|
|
|
+ 骨盆前倾假翘臀 = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆前倾假翘臀下 + "2.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧仰卧骨盆上抬"] == 0 || all_values["右侧仰卧骨盆上抬"] == 0)
|
|
|
|
+ {
|
|
|
|
+ 臀部1 = Image.GetInstance(Constants.template_custom_element + "\\" + 扁平臀上 + "4.jpg");
|
|
|
|
+ 腿部1 = Image.GetInstance(Constants.template_custom_element + "\\" + 腿部变形上 + "1.jpg");
|
|
|
|
+ 肩部1 = Image.GetInstance(Constants.template_custom_element + "\\" + 圆肩驼背 + "1.jpg");
|
|
|
|
+ 骨盆1 = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆前倾假翘臀上 + "4.jpg");
|
|
|
|
+ 扁平臀 = Image.GetInstance(Constants.template_custom_element + "\\" + 扁平臀下 + "3.jpg");
|
|
|
|
+ 骨盆前倾假翘臀 = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆前倾假翘臀下 + "2.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧仰卧骨盆上抬"] == 1 || all_values["右侧仰卧骨盆上抬"] == 1)
|
|
|
|
+ {
|
|
|
|
+ 臀部1 = Image.GetInstance(Constants.template_custom_element + "\\" + 扁平臀上 + "3.jpg");
|
|
|
|
+ 肩部1 = Image.GetInstance(Constants.template_custom_element + "\\" + 圆肩驼背 + "1.jpg");
|
|
|
|
+ 骨盆1 = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆前倾假翘臀上 + "3.jpg");
|
|
|
|
+ 扁平臀 = Image.GetInstance(Constants.template_custom_element + "\\" + 扁平臀下 + "2.jpg");
|
|
|
|
+ 骨盆前倾假翘臀 = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆前倾假翘臀下 + "2.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧仰卧骨盆上抬"] == 2 || all_values["右侧仰卧骨盆上抬"] == 2)
|
|
|
|
+ {
|
|
|
|
+ 臀部1 = Image.GetInstance(Constants.template_custom_element + "\\" + 扁平臀上 + "2.jpg");
|
|
|
|
+ 骨盆1 = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆前倾假翘臀上 + "2.jpg");
|
|
|
|
+ 扁平臀 = Image.GetInstance(Constants.template_custom_element + "\\" + 扁平臀下 + "1.jpg");
|
|
|
|
+ 骨盆前倾假翘臀 = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆前倾假翘臀下 + "2.jpg");
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ 臀部1 = Image.GetInstance(Constants.template_custom_element + "\\" + 扁平臀上 + "1.jpg");
|
|
|
|
+ 骨盆1 = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆前倾假翘臀上 + "1.jpg");
|
|
|
|
+ 骨盆前倾假翘臀 = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆前倾假翘臀下 + "1.jpg");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ Image target_骨盆 = null;
|
|
|
|
+ Image target_臀部 = null;
|
|
|
|
+ Image target_腿部 = null;
|
|
|
|
+ if (all_values["左侧俯卧支撑"] == 0 && all_values["右侧俯卧支撑"] == 0)
|
|
|
|
+ {
|
|
|
|
+ target_骨盆 = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆前倾上 + "3.jpg");
|
|
|
|
+ 腹部1 = Image.GetInstance(Constants.template_custom_element + "\\" + 腹部松弛无力上 + "5.jpg");
|
|
|
|
+ 腹部2 = Image.GetInstance(Constants.template_custom_element + "\\" + 腹直肌分离上 + "5.jpg");
|
|
|
|
+ target_臀部 = Image.GetInstance(Constants.template_custom_element + "\\" + 假胯宽上 + "4.jpg");
|
|
|
|
+ target_腿部 = Image.GetInstance(Constants.template_custom_element + "\\" + 腿部变短变粗 + "3.jpg");
|
|
|
|
+ 假胯宽 = Image.GetInstance(Constants.template_custom_element + "\\" + 假胯宽下 + "2.jpg");
|
|
|
|
+ 腹部松弛无力 = Image.GetInstance(Constants.template_custom_element + "\\" + 腹部松弛无力下 + "3.jpg");
|
|
|
|
+ 腹直肌分离 = Image.GetInstance(Constants.template_custom_element + "\\" + 腹直肌分离下 + "2.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧俯卧支撑"] == 0 || all_values["右侧俯卧支撑"] == 0)
|
|
|
|
+ {
|
|
|
|
+ target_骨盆 = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆前倾上 + "3.jpg");
|
|
|
|
+ 腹部1 = Image.GetInstance(Constants.template_custom_element + "\\" + 腹部松弛无力上 + "4.jpg");
|
|
|
|
+ 腹部2 = Image.GetInstance(Constants.template_custom_element + "\\" + 腹直肌分离上 + "4.jpg");
|
|
|
|
+ target_臀部 = Image.GetInstance(Constants.template_custom_element + "\\" + 假胯宽上 + "3.jpg");
|
|
|
|
+ target_腿部 = Image.GetInstance(Constants.template_custom_element + "\\" + 腿部变短变粗 + "3.jpg");
|
|
|
|
+ 假胯宽 = Image.GetInstance(Constants.template_custom_element + "\\" + 假胯宽下 + "2.jpg");
|
|
|
|
+ 腹部松弛无力 = Image.GetInstance(Constants.template_custom_element + "\\" + 腹部松弛无力下 + "3.jpg");
|
|
|
|
+ 腹直肌分离 = Image.GetInstance(Constants.template_custom_element + "\\" + 腹直肌分离下 + "2.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧俯卧支撑"] == 1 || all_values["右侧俯卧支撑"] == 1)
|
|
|
|
+ {
|
|
|
|
+ target_骨盆 = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆前倾上 + "2.jpg");
|
|
|
|
+ 腹部1 = Image.GetInstance(Constants.template_custom_element + "\\" + 腹部松弛无力上 + "3.jpg");
|
|
|
|
+ 腹部2 = Image.GetInstance(Constants.template_custom_element + "\\" + 腹直肌分离上 + "3.jpg");
|
|
|
|
+ target_臀部 = Image.GetInstance(Constants.template_custom_element + "\\" + 假胯宽上 + "3.jpg");
|
|
|
|
+ target_腿部 = Image.GetInstance(Constants.template_custom_element + "\\" + 腿部变短变粗 + "2.jpg");
|
|
|
|
+ 假胯宽 = Image.GetInstance(Constants.template_custom_element + "\\" + 假胯宽下 + "2.jpg");
|
|
|
|
+ 腹部松弛无力 = Image.GetInstance(Constants.template_custom_element + "\\" + 腹部松弛无力下 + "2.jpg");
|
|
|
|
+ 腹直肌分离 = Image.GetInstance(Constants.template_custom_element + "\\" + 腹直肌分离下 + "1.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧俯卧支撑"] == 2 || all_values["右侧俯卧支撑"] == 2)
|
|
|
|
+ {
|
|
|
|
+ target_骨盆 = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆前倾上 + "1.jpg");
|
|
|
|
+ 腹部1 = Image.GetInstance(Constants.template_custom_element + "\\" + 腹部松弛无力上 + "2.jpg");
|
|
|
|
+ 腹部2 = Image.GetInstance(Constants.template_custom_element + "\\" + 腹直肌分离上 + "2.jpg");
|
|
|
|
+ target_臀部 = Image.GetInstance(Constants.template_custom_element + "\\" + 假胯宽上 + "2.jpg");
|
|
|
|
+ target_腿部 = Image.GetInstance(Constants.template_custom_element + "\\" + 腿部变短变粗 + "1.jpg");
|
|
|
|
+ 假胯宽 = Image.GetInstance(Constants.template_custom_element + "\\" + 假胯宽下 + "1.jpg");
|
|
|
|
+ 腹部松弛无力 = Image.GetInstance(Constants.template_custom_element + "\\" + 腹部松弛无力下 + "1.jpg");
|
|
|
|
+ 腹直肌分离 = Image.GetInstance(Constants.template_custom_element + "\\" + 腹直肌分离下 + "1.jpg");
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ 腹部1 = Image.GetInstance(Constants.template_custom_element + "\\" + 腹部松弛无力上 + "1.jpg");
|
|
|
|
+ 腹部2 = Image.GetInstance(Constants.template_custom_element + "\\" + 腹直肌分离上 + "1.jpg");
|
|
|
|
+ target_臀部 = Image.GetInstance(Constants.template_custom_element + "\\" + 假胯宽上 + "1.jpg");
|
|
|
|
+ }
|
|
|
|
+ if (骨盆1 == null)
|
|
|
|
+ 骨盆1 = target_骨盆;
|
|
|
|
+ else
|
|
|
|
+ 骨盆2 = target_骨盆;
|
|
|
|
+ if (臀部1 == null)
|
|
|
|
+ 臀部1 = target_臀部;
|
|
|
|
+ else
|
|
|
|
+ 臀部2 = target_臀部;
|
|
|
|
+ if (腿部1 == null)
|
|
|
|
+ 腿部1 = target_腿部;
|
|
|
|
+ else
|
|
|
|
+ 腿部2 = target_腿部;
|
|
|
|
+
|
|
|
|
+ Image target_肩部 = null;
|
|
|
|
+ if (all_values["左侧侧卧髋外展"] == 0 && all_values["右侧侧卧髋外展"] == 0)
|
|
|
|
+ {
|
|
|
|
+ target_肩部 = Image.GetInstance(Constants.template_custom_element + "\\" + 高低肩 + "3.jpg");
|
|
|
|
+ 胸部 = Image.GetInstance(Constants.template_custom_element + "\\" + 脊柱侧弯 + "2.jpg");
|
|
|
|
+ target_骨盆 = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆侧倾上 + "3.jpg");
|
|
|
|
+ target_腿部 = Image.GetInstance(Constants.template_custom_element + "\\" + 腿部长短不一 + "3.jpg");
|
|
|
|
+ 骨盆侧倾 = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆侧倾下 + "3.jpg");
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧侧卧髋外展"] == 0 || all_values["右侧侧卧髋外展"] == 0)
|
|
|
|
+ {
|
|
|
|
+ target_肩部 = Image.GetInstance(Constants.template_custom_element + "\\" + 高低肩 + "2.jpg");
|
|
|
|
+ 胸部 = Image.GetInstance(Constants.template_custom_element + "\\" + 脊柱侧弯 + "1.jpg");
|
|
|
|
+ target_骨盆 = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆侧倾上 + "3.jpg");
|
|
|
|
+ target_腿部 = Image.GetInstance(Constants.template_custom_element + "\\" + 腿部长短不一 + "3.jpg");
|
|
|
|
+ 骨盆侧倾 = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆侧倾下 + "3.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧侧卧髋外展"] == 1 || all_values["右侧侧卧髋外展"] == 1)
|
|
|
|
+ {
|
|
|
|
+ target_肩部 = Image.GetInstance(Constants.template_custom_element + "\\" + 高低肩 + "1.jpg");
|
|
|
|
+ target_骨盆 = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆侧倾上 + "3.jpg");
|
|
|
|
+ target_腿部 = Image.GetInstance(Constants.template_custom_element + "\\" + 腿部长短不一 + "2.jpg");
|
|
|
|
+ 骨盆侧倾 = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆侧倾下 + "2.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧侧卧髋外展"] == 2 || all_values["右侧侧卧髋外展"] == 2)
|
|
|
|
+ {
|
|
|
|
+ target_骨盆 = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆侧倾上 + "2.jpg");
|
|
|
|
+ target_腿部 = Image.GetInstance(Constants.template_custom_element + "\\" + 腿部长短不一 + "1.jpg");
|
|
|
|
+ 骨盆侧倾 = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆侧倾下 + "1.jpg");
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ target_骨盆 = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆侧倾上 + "1.jpg");
|
|
|
|
+ }
|
|
|
|
+ if (骨盆1 == null)
|
|
|
|
+ 骨盆1 = target_骨盆;
|
|
|
|
+ else if (骨盆2 == null)
|
|
|
|
+ 骨盆2 = target_骨盆;
|
|
|
|
+ else
|
|
|
|
+ 骨盆3 = target_骨盆;
|
|
|
|
+ if (腿部1 == null)
|
|
|
|
+ 腿部1 = target_腿部;
|
|
|
|
+ else if (腿部2 == null)
|
|
|
|
+ 腿部2 = target_腿部;
|
|
|
|
+ else
|
|
|
|
+ 腿部3 = target_腿部;
|
|
|
|
+ if (肩部1 == null)
|
|
|
|
+ 肩部1 = target_肩部;
|
|
|
|
+ else
|
|
|
|
+ 肩部2 = target_肩部;
|
|
|
|
+
|
|
|
|
+ //设置排版参数
|
|
|
|
+ int fig_zoom_up = 20;
|
|
|
|
+ int fig_zoom_up2 = 20;
|
|
|
|
+ int fig_zoom_down = 25;
|
|
|
|
+ int up_align_left = 407;
|
|
|
|
+ int up_align_right = 345;
|
|
|
|
+ int down_align_left = 237;
|
|
|
|
+ int down_align_bottom = 360;
|
|
|
|
+ int diff_down = 43;
|
|
|
|
+ //排图
|
|
|
|
+ //System.Console.WriteLine(PageSize.A4.Width);
|
|
|
|
+ if (臀部1 != null)
|
|
|
|
+ {
|
|
|
|
+ 臀部1.ScalePercent(fig_zoom_up);
|
|
|
|
+ 臀部1.SetAbsolutePosition(PageSize.A4.Width - (int)(臀部1.Width * fig_zoom_up * 0.01) - up_align_right, 657);
|
|
|
|
+ cb.AddImage(臀部1);
|
|
|
|
+ }
|
|
|
|
+ if (臀部2 != null)
|
|
|
|
+ {
|
|
|
|
+ 臀部2.ScalePercent(fig_zoom_up);
|
|
|
|
+ 臀部2.SetAbsolutePosition(PageSize.A4.Width - (int)(臀部2.Width * fig_zoom_up * 0.01) - up_align_right, 615);
|
|
|
|
+ cb.AddImage(臀部2);
|
|
|
|
+ }
|
|
|
|
+ if (胸部 != null)
|
|
|
|
+ {
|
|
|
|
+ 胸部.ScalePercent(fig_zoom_up);
|
|
|
|
+ 胸部.SetAbsolutePosition(PageSize.A4.Width - (int)(胸部.Width * fig_zoom_up * 0.01) - up_align_right, 563);
|
|
|
|
+ cb.AddImage(胸部);
|
|
|
|
+ }
|
|
|
|
+ if (腿部1 != null)
|
|
|
|
+ {
|
|
|
|
+ 腿部1.ScalePercent(fig_zoom_up);
|
|
|
|
+ 腿部1.SetAbsolutePosition(PageSize.A4.Width - (int)(腿部1.Width * fig_zoom_up * 0.01) - up_align_right, 512);
|
|
|
|
+ cb.AddImage(腿部1);
|
|
|
|
+ }
|
|
|
|
+ if (腿部2 != null)
|
|
|
|
+ {
|
|
|
|
+ 腿部2.ScalePercent(fig_zoom_up);
|
|
|
|
+ 腿部2.SetAbsolutePosition(PageSize.A4.Width - (int)(腿部2.Width * fig_zoom_up * 0.01) - up_align_right, 472);
|
|
|
|
+ cb.AddImage(腿部2);
|
|
|
|
+ }
|
|
|
|
+ if (腿部3 != null)
|
|
|
|
+ {
|
|
|
|
+ 腿部3.ScalePercent(fig_zoom_up);
|
|
|
|
+ 腿部3.SetAbsolutePosition(PageSize.A4.Width - (int)(腿部3.Width * fig_zoom_up * 0.01) - up_align_right, 432);
|
|
|
|
+ cb.AddImage(腿部3);
|
|
|
|
+ }
|
|
|
|
+ if (肩部1 != null)
|
|
|
|
+ {
|
|
|
|
+ 肩部1.ScalePercent(fig_zoom_up2);
|
|
|
|
+ 肩部1.SetAbsolutePosition(up_align_left, 658);
|
|
|
|
+ cb.AddImage(肩部1);
|
|
|
|
+ }
|
|
|
|
+ if (肩部2 != null)
|
|
|
|
+ {
|
|
|
|
+ 肩部2.ScalePercent(fig_zoom_up2);
|
|
|
|
+ 肩部2.SetAbsolutePosition(up_align_left, 618);
|
|
|
|
+ cb.AddImage(肩部2);
|
|
|
|
+ }
|
|
|
|
+ if (骨盆1 != null)
|
|
|
|
+ {
|
|
|
|
+ 骨盆1.ScalePercent(fig_zoom_up2);
|
|
|
|
+ 骨盆1.SetAbsolutePosition(up_align_left, 566);
|
|
|
|
+ cb.AddImage(骨盆1);
|
|
|
|
+ }
|
|
|
|
+ if (骨盆2 != null)
|
|
|
|
+ {
|
|
|
|
+ 骨盆2.ScalePercent(fig_zoom_up2);
|
|
|
|
+ 骨盆2.SetAbsolutePosition(up_align_left, 524);
|
|
|
|
+ cb.AddImage(骨盆2);
|
|
|
|
+ }
|
|
|
|
+ if (骨盆3 != null)
|
|
|
|
+ {
|
|
|
|
+ 骨盆3.ScalePercent(fig_zoom_up2);
|
|
|
|
+ 骨盆3.SetAbsolutePosition(up_align_left + 50, 524);
|
|
|
|
+ cb.AddImage(骨盆3);
|
|
|
|
+ }
|
|
|
|
+ if (腹部1 != null)
|
|
|
|
+ {
|
|
|
|
+ 腹部1.ScalePercent(fig_zoom_up2);
|
|
|
|
+ 腹部1.SetAbsolutePosition(up_align_left, 470);
|
|
|
|
+ cb.AddImage(腹部1);
|
|
|
|
+ }
|
|
|
|
+ if (腹部2 != null)
|
|
|
|
+ {
|
|
|
|
+ 腹部2.ScalePercent(fig_zoom_up2);
|
|
|
|
+ 腹部2.SetAbsolutePosition(up_align_left, 428);
|
|
|
|
+ cb.AddImage(腹部2);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (骨盆前倾假翘臀 != null)
|
|
|
|
+ {
|
|
|
|
+ 骨盆前倾假翘臀.ScalePercent(fig_zoom_down);
|
|
|
|
+ 骨盆前倾假翘臀.SetAbsolutePosition(down_align_left, down_align_bottom - diff_down * 1);
|
|
|
|
+ cb.AddImage(骨盆前倾假翘臀);
|
|
|
|
+ }
|
|
|
|
+ if (扁平臀 != null)
|
|
|
|
+ {
|
|
|
|
+ 扁平臀.ScalePercent(fig_zoom_down);
|
|
|
|
+ 扁平臀.SetAbsolutePosition(down_align_left, down_align_bottom - diff_down * 2);
|
|
|
|
+ cb.AddImage(扁平臀);
|
|
|
|
+ }
|
|
|
|
+ if (骨盆侧倾 != null)
|
|
|
|
+ {
|
|
|
|
+ 骨盆侧倾.ScalePercent(fig_zoom_down);
|
|
|
|
+ 骨盆侧倾.SetAbsolutePosition(down_align_left, down_align_bottom - diff_down * 3);
|
|
|
|
+ cb.AddImage(骨盆侧倾);
|
|
|
|
+ }
|
|
|
|
+ if (假胯宽 != null)
|
|
|
|
+ {
|
|
|
|
+ 假胯宽.ScalePercent(fig_zoom_down);
|
|
|
|
+ 假胯宽.SetAbsolutePosition(down_align_left, down_align_bottom - diff_down * 4);
|
|
|
|
+ cb.AddImage(假胯宽);
|
|
|
|
+ }
|
|
|
|
+ if (腹直肌分离 != null)
|
|
|
|
+ {
|
|
|
|
+ 腹直肌分离.ScalePercent(fig_zoom_down);
|
|
|
|
+ 腹直肌分离.SetAbsolutePosition(down_align_left, down_align_bottom - diff_down * 5);
|
|
|
|
+ cb.AddImage(腹直肌分离);
|
|
|
|
+ }
|
|
|
|
+ if (腹直肌分离 != null)
|
|
|
|
+ {
|
|
|
|
+ 腹部松弛无力.ScalePercent(fig_zoom_down);
|
|
|
|
+ 腹部松弛无力.SetAbsolutePosition(down_align_left, down_align_bottom - diff_down * 6);
|
|
|
|
+ cb.AddImage(腹部松弛无力);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //||第5页
|
|
|
|
+ templateName = Constants.template_custom + "\\page5.pdf";
|
|
|
|
+ if (File.Exists(templateName))
|
|
|
|
+ {
|
|
|
|
+ document.NewPage();
|
|
|
|
+ PdfReader readerTemp = new PdfReader(templateName);
|
|
|
|
+ PdfImportedPage newPage = writer.GetImportedPage(readerTemp, 1);
|
|
|
|
+ PdfContentByte cb = writer.DirectContent;
|
|
|
|
+ cb.AddTemplate(newPage, 0, 0);
|
|
|
|
+ string 骨盆前倾 = "page5_up_fig";
|
|
|
|
+ string 骨盆前倾文字 = "page5_up_text";
|
|
|
|
+ string 骨盆侧倾 = "page5_down_fig";
|
|
|
|
+ string 骨盆侧倾文字 = "page5_down_text";
|
|
|
|
+ Image up_fig = null;
|
|
|
|
+ Image up_text;
|
|
|
|
+ Image down_fig = null;
|
|
|
|
+ Image down_text;
|
|
|
|
+ if (all_values["左侧仰卧骨盆上抬"] == 0 && all_values["右侧仰卧骨盆上抬"] == 0)
|
|
|
|
+ {
|
|
|
|
+ up_fig = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆前倾 + "2.jpg");
|
|
|
|
+ up_text = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆前倾文字 + "5.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧仰卧骨盆上抬"] == 0 || all_values["右侧仰卧骨盆上抬"] == 0)
|
|
|
|
+ {
|
|
|
|
+ up_fig = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆前倾 + "2.jpg");
|
|
|
|
+ up_text = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆前倾文字 + "4.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧仰卧骨盆上抬"] == 1 || all_values["右侧仰卧骨盆上抬"] == 1)
|
|
|
|
+ {
|
|
|
|
+ up_fig = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆前倾 + "2.jpg");
|
|
|
|
+ up_text = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆前倾文字 + "3.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧仰卧骨盆上抬"] == 2 || all_values["右侧仰卧骨盆上抬"] == 2)
|
|
|
|
+ {
|
|
|
|
+ up_fig = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆前倾 + "1.jpg");
|
|
|
|
+ up_text = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆前倾文字 + "2.jpg");
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ up_text = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆前倾文字 + "1.jpg");
|
|
|
|
+ }
|
|
|
|
+ //
|
|
|
|
+ if (all_values["左侧侧卧髋外展"] == 0 && all_values["右侧侧卧髋外展"] == 0)
|
|
|
|
+ {
|
|
|
|
+ down_fig = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆侧倾 + "3.jpg");
|
|
|
|
+ down_text = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆侧倾文字 + "5.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧侧卧髋外展"] == 0 || all_values["右侧侧卧髋外展"] == 0)
|
|
|
|
+ {
|
|
|
|
+ down_fig = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆侧倾 + "3.jpg");
|
|
|
|
+ down_text = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆侧倾文字 + "4.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧侧卧髋外展"] == 1 || all_values["右侧侧卧髋外展"] == 1)
|
|
|
|
+ {
|
|
|
|
+ down_fig = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆侧倾 + "2.jpg");
|
|
|
|
+ down_text = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆侧倾文字 + "3.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧侧卧髋外展"] == 2 || all_values["右侧侧卧髋外展"] == 2)
|
|
|
|
+ {
|
|
|
|
+ down_fig = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆侧倾 + "1.jpg");
|
|
|
|
+ down_text = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆侧倾文字 + "2.jpg");
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ down_text = Image.GetInstance(Constants.template_custom_element + "\\" + 骨盆侧倾文字 + "1.jpg");
|
|
|
|
+ }
|
|
|
|
+ int fig_zoom = 25;
|
|
|
|
+ int text_zoom = 25;
|
|
|
|
+ int align_left_fig = 270;
|
|
|
|
+ int align_left_text = 190;
|
|
|
|
+ if (up_fig != null)
|
|
|
|
+ {
|
|
|
|
+ up_fig.ScalePercent(fig_zoom);
|
|
|
|
+ up_fig.SetAbsolutePosition(align_left_fig, 585);
|
|
|
|
+ cb.AddImage(up_fig);
|
|
|
|
+ }
|
|
|
|
+ int down_fig_height = 375;
|
|
|
|
+ if (down_fig != null)
|
|
|
|
+ {
|
|
|
|
+ down_fig.ScalePercent(fig_zoom);
|
|
|
|
+ down_fig_height = (int)down_fig.Height;
|
|
|
|
+ down_fig.SetAbsolutePosition(align_left_fig, PageSize.A4.Height - (int)(down_fig_height * fig_zoom * 0.01) - 320);
|
|
|
|
+ cb.AddImage(down_fig);
|
|
|
|
+ //System.Console.WriteLine(down_fig.Height);
|
|
|
|
+ }
|
|
|
|
+ up_text.ScalePercent(text_zoom);
|
|
|
|
+ up_text.SetAbsolutePosition(align_left_text, 550);
|
|
|
|
+ cb.AddImage(up_text);
|
|
|
|
+ down_text.ScalePercent(text_zoom);
|
|
|
|
+ down_text.SetAbsolutePosition(align_left_text, PageSize.A4.Height - (int)(down_fig_height * fig_zoom * 0.01) - 370);
|
|
|
|
+ cb.AddImage(down_text);
|
|
|
|
+ }
|
|
|
|
+ //||第6页
|
|
|
|
+ templateName = Constants.template_custom + "\\page6.pdf";
|
|
|
|
+ if (File.Exists(templateName))
|
|
|
|
+ {
|
|
|
|
+ document.NewPage();
|
|
|
|
+ PdfReader readerTemp = new PdfReader(templateName);
|
|
|
|
+ PdfImportedPage newPage = writer.GetImportedPage(readerTemp, 1);
|
|
|
|
+ PdfContentByte cb = writer.DirectContent;
|
|
|
|
+ cb.AddTemplate(newPage, 0, 0);
|
|
|
|
+ string 扁平臀 = "page6_up_fig";
|
|
|
|
+ string 扁平臀文字 = "page6_up_text";
|
|
|
|
+ string 假胯宽 = "page6_down_fig";
|
|
|
|
+ string 假胯宽文字 = "page6_down_text";
|
|
|
|
+ Image up_fig = null;
|
|
|
|
+ Image up_text;
|
|
|
|
+ Image down_fig = null;
|
|
|
|
+ Image down_text;
|
|
|
|
+ if (all_values["左侧仰卧骨盆上抬"] == 0 && all_values["右侧仰卧骨盆上抬"] == 0)
|
|
|
|
+ {
|
|
|
|
+ up_fig = Image.GetInstance(Constants.template_custom_element + "\\" + 扁平臀 + "3.jpg");
|
|
|
|
+ up_text = Image.GetInstance(Constants.template_custom_element + "\\" + 扁平臀文字 + "5.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧仰卧骨盆上抬"] == 0 || all_values["右侧仰卧骨盆上抬"] == 0)
|
|
|
|
+ {
|
|
|
|
+ up_fig = Image.GetInstance(Constants.template_custom_element + "\\" + 扁平臀 + "3.jpg");
|
|
|
|
+ up_text = Image.GetInstance(Constants.template_custom_element + "\\" + 扁平臀文字 + "4.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧仰卧骨盆上抬"] == 1 || all_values["右侧仰卧骨盆上抬"] == 1)
|
|
|
|
+ {
|
|
|
|
+ up_fig = Image.GetInstance(Constants.template_custom_element + "\\" + 扁平臀 + "2.jpg");
|
|
|
|
+ up_text = Image.GetInstance(Constants.template_custom_element + "\\" + 扁平臀文字 + "3.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧仰卧骨盆上抬"] == 2 || all_values["右侧仰卧骨盆上抬"] == 2)
|
|
|
|
+ {
|
|
|
|
+ up_fig = Image.GetInstance(Constants.template_custom_element + "\\" + 扁平臀 + "1.jpg");
|
|
|
|
+ up_text = Image.GetInstance(Constants.template_custom_element + "\\" + 扁平臀文字 + "2.jpg");
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ up_text = Image.GetInstance(Constants.template_custom_element + "\\" + 扁平臀文字 + "1.jpg");
|
|
|
|
+ }
|
|
|
|
+ //
|
|
|
|
+ if (all_values["左侧侧卧髋外展"] == 0 && all_values["右侧侧卧髋外展"] == 0)
|
|
|
|
+ {
|
|
|
|
+ down_fig = Image.GetInstance(Constants.template_custom_element + "\\" + 假胯宽 + "2.jpg");
|
|
|
|
+ down_text = Image.GetInstance(Constants.template_custom_element + "\\" + 假胯宽文字 + "5.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧侧卧髋外展"] == 0 || all_values["右侧侧卧髋外展"] == 0)
|
|
|
|
+ {
|
|
|
|
+ down_fig = Image.GetInstance(Constants.template_custom_element + "\\" + 假胯宽 + "2.jpg");
|
|
|
|
+ down_text = Image.GetInstance(Constants.template_custom_element + "\\" + 假胯宽文字 + "4.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧侧卧髋外展"] == 1 || all_values["右侧侧卧髋外展"] == 1)
|
|
|
|
+ {
|
|
|
|
+ down_fig = Image.GetInstance(Constants.template_custom_element + "\\" + 假胯宽 + "2.jpg");
|
|
|
|
+ down_text = Image.GetInstance(Constants.template_custom_element + "\\" + 假胯宽文字 + "3.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧侧卧髋外展"] == 2 || all_values["右侧侧卧髋外展"] == 2)
|
|
|
|
+ {
|
|
|
|
+ down_fig = Image.GetInstance(Constants.template_custom_element + "\\" + 假胯宽 + "1.jpg");
|
|
|
|
+ down_text = Image.GetInstance(Constants.template_custom_element + "\\" + 假胯宽文字 + "2.jpg");
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ down_text = Image.GetInstance(Constants.template_custom_element + "\\" + 假胯宽文字 + "1.jpg");
|
|
|
|
+ }
|
|
|
|
+ int fig_zoom = 25;
|
|
|
|
+ int text_zoom = 25;
|
|
|
|
+ int align_left_fig = 230;
|
|
|
|
+ int align_left_text = 150;
|
|
|
|
+ if (up_fig != null)
|
|
|
|
+ {
|
|
|
|
+ up_fig.ScalePercent(fig_zoom);
|
|
|
|
+ up_fig.SetAbsolutePosition(align_left_fig, (int)(PageSize.A4.Height - up_fig.Height * fig_zoom * 0.01-185));
|
|
|
|
+ cb.AddImage(up_fig);
|
|
|
|
+ }
|
|
|
|
+ if (down_fig != null)
|
|
|
|
+ {
|
|
|
|
+ down_fig.ScalePercent(fig_zoom - 3);
|
|
|
|
+ down_fig.SetAbsolutePosition(290, 245);
|
|
|
|
+ cb.AddImage(down_fig);
|
|
|
|
+ }
|
|
|
|
+ up_text.ScalePercent(text_zoom);
|
|
|
|
+ up_text.SetAbsolutePosition(align_left_text, 370);
|
|
|
|
+ cb.AddImage(up_text);
|
|
|
|
+ down_text.ScalePercent(text_zoom);
|
|
|
|
+ down_text.SetAbsolutePosition(align_left_text, 170);
|
|
|
|
+ cb.AddImage(down_text);
|
|
|
|
+ }
|
|
|
|
+ //||第7页
|
|
|
|
+ templateName = Constants.template_custom + "\\page7.pdf";
|
|
|
|
+ if (File.Exists(templateName))
|
|
|
|
+ {
|
|
|
|
+ document.NewPage();
|
|
|
|
+ PdfReader readerTemp = new PdfReader(templateName);
|
|
|
|
+ PdfImportedPage newPage = writer.GetImportedPage(readerTemp, 1);
|
|
|
|
+ PdfContentByte cb = writer.DirectContent;
|
|
|
|
+ cb.AddTemplate(newPage, 0, 0);
|
|
|
|
+ string 腹部无力 = "page7_down_fig";
|
|
|
|
+ string 腹部无力文字 = "page7_down_text";
|
|
|
|
+ string 腹直肌分离 = "page7_up_fig";
|
|
|
|
+ string 腹直肌分离文字 = "page7_up_text";
|
|
|
|
+ Image up_fig = null;
|
|
|
|
+ Image up_text;
|
|
|
|
+ Image down_fig = null;
|
|
|
|
+ Image down_text;
|
|
|
|
+ if (all_values["左侧俯卧支撑"] == 0 && all_values["右侧俯卧支撑"] == 0)
|
|
|
|
+ {
|
|
|
|
+ up_fig = Image.GetInstance(Constants.template_custom_element + "\\" + 腹直肌分离 + "2.jpg");
|
|
|
|
+ up_text = Image.GetInstance(Constants.template_custom_element + "\\" + 腹直肌分离文字 + "5.jpg");
|
|
|
|
+ down_fig = Image.GetInstance(Constants.template_custom_element + "\\" + 腹部无力 + "3.jpg");
|
|
|
|
+ down_text = Image.GetInstance(Constants.template_custom_element + "\\" + 腹部无力文字 + "5.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧俯卧支撑"] == 0 || all_values["右侧俯卧支撑"] == 0)
|
|
|
|
+ {
|
|
|
|
+ up_fig = Image.GetInstance(Constants.template_custom_element + "\\" + 腹直肌分离 + "2.jpg");
|
|
|
|
+ up_text = Image.GetInstance(Constants.template_custom_element + "\\" + 腹直肌分离文字 + "4.jpg");
|
|
|
|
+ down_fig = Image.GetInstance(Constants.template_custom_element + "\\" + 腹部无力 + "3.jpg");
|
|
|
|
+ down_text = Image.GetInstance(Constants.template_custom_element + "\\" + 腹部无力文字 + "4.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧俯卧支撑"] == 1 || all_values["右侧俯卧支撑"] == 1)
|
|
|
|
+ {
|
|
|
|
+ up_fig = Image.GetInstance(Constants.template_custom_element + "\\" + 腹直肌分离 + "1.jpg");
|
|
|
|
+ up_text = Image.GetInstance(Constants.template_custom_element + "\\" + 腹直肌分离文字 + "3.jpg");
|
|
|
|
+ down_fig = Image.GetInstance(Constants.template_custom_element + "\\" + 腹部无力 + "2.jpg");
|
|
|
|
+ down_text = Image.GetInstance(Constants.template_custom_element + "\\" + 腹部无力文字 + "3.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧俯卧支撑"] == 2 || all_values["右侧俯卧支撑"] == 2)
|
|
|
|
+ {
|
|
|
|
+ up_fig = Image.GetInstance(Constants.template_custom_element + "\\" + 腹直肌分离 + "1.jpg");
|
|
|
|
+ up_text = Image.GetInstance(Constants.template_custom_element + "\\" + 腹直肌分离文字 + "2.jpg");
|
|
|
|
+ down_fig = Image.GetInstance(Constants.template_custom_element + "\\" + 腹部无力 + "1.jpg");
|
|
|
|
+ down_text = Image.GetInstance(Constants.template_custom_element + "\\" + 腹部无力文字 + "2.jpg");
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ up_text = Image.GetInstance(Constants.template_custom_element + "\\" + 腹直肌分离文字 + "1.jpg");
|
|
|
|
+ down_text = Image.GetInstance(Constants.template_custom_element + "\\" + 腹部无力文字 + "1.jpg");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ int fig_zoom = 25;
|
|
|
|
+ int text_zoom = 25;
|
|
|
|
+ int align_left_fig = 270;
|
|
|
|
+ int align_left_text = 190;
|
|
|
|
+ int down_fig_height = 375;
|
|
|
|
+ if (up_fig != null)
|
|
|
|
+ {
|
|
|
|
+ up_fig.ScalePercent(fig_zoom);
|
|
|
|
+ up_fig.SetAbsolutePosition(align_left_fig, 585);
|
|
|
|
+ cb.AddImage(up_fig);
|
|
|
|
+ }
|
|
|
|
+ if (down_fig != null)
|
|
|
|
+ {
|
|
|
|
+ down_fig.ScalePercent(fig_zoom);
|
|
|
|
+ down_fig.SetAbsolutePosition(align_left_fig, PageSize.A4.Height - (int)(down_fig.Height * fig_zoom * 0.01) - 305);
|
|
|
|
+ cb.AddImage(down_fig);
|
|
|
|
+ down_fig_height = (int)down_fig.Height;
|
|
|
|
+ }
|
|
|
|
+ up_text.ScalePercent(text_zoom);
|
|
|
|
+ up_text.SetAbsolutePosition(align_left_text, 550);
|
|
|
|
+ cb.AddImage(up_text);
|
|
|
|
+ down_text.ScalePercent(text_zoom);
|
|
|
|
+ down_text.SetAbsolutePosition(align_left_text, PageSize.A4.Height - (int)(down_fig_height * fig_zoom * 0.01) - 370);
|
|
|
|
+ cb.AddImage(down_text);
|
|
|
|
+ }
|
|
|
|
+ //||第8页
|
|
|
|
+ templateName = Constants.template_custom + "\\page8.pdf";
|
|
|
|
+ if (File.Exists(templateName))
|
|
|
|
+ {
|
|
|
|
+ document.NewPage();
|
|
|
|
+ PdfReader readerTemp = new PdfReader(templateName);
|
|
|
|
+ PdfImportedPage newPage = writer.GetImportedPage(readerTemp, 1);
|
|
|
|
+ PdfContentByte cb = writer.DirectContent;
|
|
|
|
+ cb.AddTemplate(newPage, 0, 0);
|
|
|
|
+ string 精神_ = "page8_up_jingshen";
|
|
|
|
+ string 精神详解_ = "page8_down_jinshenxiajiang";
|
|
|
|
+ string 盆底_ = "page8_up_pengdi";
|
|
|
|
+ string 盆底详解_ = "page8_down_bianmi";
|
|
|
|
+ string 膝部_ = "page8_up_xibu";
|
|
|
|
+ string 膝部详解_ = "page8_down_zouluxitong";
|
|
|
|
+ string 颈肩_ = "page8_up_jinjian";
|
|
|
|
+ string 腰部_ = "page8_up_yaobu";
|
|
|
|
+ Image 精神;
|
|
|
|
+ Image 精神详解 = null;
|
|
|
|
+ Image 盆底;
|
|
|
|
+ Image 盆底详解 = null;
|
|
|
|
+ Image 膝部;
|
|
|
|
+ Image 膝部详解 = null;
|
|
|
|
+ Image 颈肩;
|
|
|
|
+ Image 腰部 = null;
|
|
|
|
+ if (all_values["左侧仰卧骨盆上抬"] == 0 && all_values["右侧仰卧骨盆上抬"] == 0)
|
|
|
|
+ {
|
|
|
|
+ 精神 = Image.GetInstance(Constants.template_custom_element + "\\" + 精神_ + "5.jpg");
|
|
|
|
+ 精神详解 = Image.GetInstance(Constants.template_custom_element + "\\" + 精神详解_ + "2.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧仰卧骨盆上抬"] == 0 || all_values["右侧仰卧骨盆上抬"] == 0)
|
|
|
|
+ {
|
|
|
|
+ 精神 = Image.GetInstance(Constants.template_custom_element + "\\" + 精神_ + "4.jpg");
|
|
|
|
+ 精神详解 = Image.GetInstance(Constants.template_custom_element + "\\" + 精神详解_ + "2.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧仰卧骨盆上抬"] == 1 || all_values["右侧仰卧骨盆上抬"] == 1)
|
|
|
|
+ {
|
|
|
|
+ 精神 = Image.GetInstance(Constants.template_custom_element + "\\" + 精神_ + "3.jpg");
|
|
|
|
+ 精神详解 = Image.GetInstance(Constants.template_custom_element + "\\" + 精神详解_ + "2.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧仰卧骨盆上抬"] == 2 || all_values["右侧仰卧骨盆上抬"] == 2)
|
|
|
|
+ {
|
|
|
|
+ 精神 = Image.GetInstance(Constants.template_custom_element + "\\" + 精神_ + "2.jpg");
|
|
|
|
+ 精神详解 = Image.GetInstance(Constants.template_custom_element + "\\" + 精神详解_ + "1.jpg");
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ 精神 = Image.GetInstance(Constants.template_custom_element + "\\" + 精神_ + "1.jpg");
|
|
|
|
+ }
|
|
|
|
+ //
|
|
|
|
+ if (all_values["左侧仰卧骨盆上抬"] <= 1 || all_values["右侧仰卧骨盆上抬"] <= 1 || all_values["左侧侧卧髋外展"] <= 1 || all_values["右侧侧卧髋外展"] <= 1)
|
|
|
|
+ {
|
|
|
|
+ 颈肩 = Image.GetInstance(Constants.template_custom_element + "\\" + 颈肩_ + "3.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧仰卧骨盆上抬"] == 2 || all_values["右侧仰卧骨盆上抬"] == 2 || all_values["左侧侧卧髋外展"] == 2 || all_values["右侧侧卧髋外展"] == 2)
|
|
|
|
+ {
|
|
|
|
+ 颈肩 = Image.GetInstance(Constants.template_custom_element + "\\" + 颈肩_ + "2.jpg");
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ 颈肩 = Image.GetInstance(Constants.template_custom_element + "\\" + 颈肩_ + "1.jpg");
|
|
|
|
+ }
|
|
|
|
+ //
|
|
|
|
+ if (all_values["左侧仰卧骨盆上抬"] <= 1 || all_values["右侧仰卧骨盆上抬"] <= 1 || all_values["左侧侧卧髋外展"] <= 1 || all_values["右侧侧卧髋外展"] <= 1 || all_values["左侧俯卧支撑"] <= 1 || all_values["右侧俯卧支撑"] <= 1)
|
|
|
|
+ {
|
|
|
|
+ 腰部 = Image.GetInstance(Constants.template_custom_element + "\\" + 腰部_ + "3.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧仰卧骨盆上抬"] <= 2 || all_values["右侧仰卧骨盆上抬"] <= 2 || all_values["左侧侧卧髋外展"] <= 2 || all_values["右侧侧卧髋外展"] <= 2 || all_values["左侧俯卧支撑"] <= 2 || all_values["右侧俯卧支撑"] <= 2)
|
|
|
|
+ {
|
|
|
|
+ 腰部 = Image.GetInstance(Constants.template_custom_element + "\\" + 腰部_ + "2.jpg");
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ 腰部 = Image.GetInstance(Constants.template_custom_element + "\\" + 腰部_ + "1.jpg");
|
|
|
|
+ }
|
|
|
|
+ //
|
|
|
|
+ if (all_values["左侧俯卧支撑"] == 0 && all_values["右侧俯卧支撑"] == 0 && all_values["左侧侧卧髋外展"] == 0 && all_values["右侧侧卧髋外展"] == 0)
|
|
|
|
+ {
|
|
|
|
+ 膝部 = Image.GetInstance(Constants.template_custom_element + "\\" + 膝部_ + "5.jpg");
|
|
|
|
+ 膝部详解 = Image.GetInstance(Constants.template_custom_element + "\\" + 膝部详解_ + ".jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧俯卧支撑"] == 0 || all_values["右侧俯卧支撑"] == 0 || all_values["左侧侧卧髋外展"] == 0 || all_values["右侧侧卧髋外展"] == 0)
|
|
|
|
+ {
|
|
|
|
+ 膝部 = Image.GetInstance(Constants.template_custom_element + "\\" + 膝部_ + "4.jpg");
|
|
|
|
+ 膝部详解 = Image.GetInstance(Constants.template_custom_element + "\\" + 膝部详解_ + ".jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧俯卧支撑"] == 1 || all_values["左侧俯卧支撑"] == 1 || all_values["左侧侧卧髋外展"] == 1 || all_values["右侧侧卧髋外展"] == 1)
|
|
|
|
+ {
|
|
|
|
+ 膝部 = Image.GetInstance(Constants.template_custom_element + "\\" + 膝部_ + "3.jpg");
|
|
|
|
+ 膝部详解 = Image.GetInstance(Constants.template_custom_element + "\\" + 膝部详解_ + ".jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧俯卧支撑"] == 2 || all_values["左侧俯卧支撑"] == 2 || all_values["左侧侧卧髋外展"] == 2 || all_values["右侧侧卧髋外展"] == 2)
|
|
|
|
+ {
|
|
|
|
+ 膝部 = Image.GetInstance(Constants.template_custom_element + "\\" + 膝部_ + "2.jpg");
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ 膝部 = Image.GetInstance(Constants.template_custom_element + "\\" + 膝部_ + "1.jpg");
|
|
|
|
+ }
|
|
|
|
+ //
|
|
|
|
+ if (all_values["左侧俯卧支撑"] == 0 && all_values["右侧俯卧支撑"] == 0)
|
|
|
|
+ {
|
|
|
|
+ 盆底 = Image.GetInstance(Constants.template_custom_element + "\\" + 盆底_ + "5.jpg");
|
|
|
|
+ 盆底详解 = Image.GetInstance(Constants.template_custom_element + "\\" + 盆底详解_ + ".jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧俯卧支撑"] == 0 || all_values["右侧俯卧支撑"] == 0)
|
|
|
|
+ {
|
|
|
|
+ 盆底 = Image.GetInstance(Constants.template_custom_element + "\\" + 盆底_ + "4.jpg");
|
|
|
|
+ 盆底详解 = Image.GetInstance(Constants.template_custom_element + "\\" + 盆底详解_ + ".jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧俯卧支撑"] == 1 || all_values["左侧俯卧支撑"] == 1)
|
|
|
|
+ {
|
|
|
|
+ 盆底 = Image.GetInstance(Constants.template_custom_element + "\\" + 盆底_ + "3.jpg");
|
|
|
|
+ 盆底详解 = Image.GetInstance(Constants.template_custom_element + "\\" + 盆底详解_ + ".jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧俯卧支撑"] == 2 || all_values["左侧俯卧支撑"] == 2)
|
|
|
|
+ {
|
|
|
|
+ 盆底 = Image.GetInstance(Constants.template_custom_element + "\\" + 盆底_ + "2.jpg");
|
|
|
|
+ 盆底详解 = Image.GetInstance(Constants.template_custom_element + "\\" + 盆底详解_ + ".jpg");
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ 盆底 = Image.GetInstance(Constants.template_custom_element + "\\" + 盆底_ + "1.jpg");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ int fig_zoom_up = 20;
|
|
|
|
+ int fig_zoom_down = 23;
|
|
|
|
+ int up_align_right = 453;
|
|
|
|
+ int up_align_left = 333;
|
|
|
|
+ int up_align_buttom = 629;
|
|
|
|
+ int up_diff = 87;
|
|
|
|
+ int down_align_left = 280;
|
|
|
|
+ int down_align_buttom = 184;
|
|
|
|
+ int down_diff = 56;
|
|
|
|
+
|
|
|
|
+ 颈肩.ScalePercent(fig_zoom_up);
|
|
|
|
+ 颈肩.SetAbsolutePosition(PageSize.A4.Width - (int)(颈肩.Width * fig_zoom_up * 0.01) - up_align_right, up_align_buttom);
|
|
|
|
+ cb.AddImage(颈肩);
|
|
|
|
+ 腰部.ScalePercent(fig_zoom_up);
|
|
|
|
+ 腰部.SetAbsolutePosition(PageSize.A4.Width - (int)(腰部.Width * fig_zoom_up * 0.01) - up_align_right, up_align_buttom - up_diff);
|
|
|
|
+ cb.AddImage(腰部);
|
|
|
|
+ 盆底.ScalePercent(fig_zoom_up);
|
|
|
|
+ 盆底.SetAbsolutePosition(PageSize.A4.Width - (int)(盆底.Width * fig_zoom_up * 0.01) - up_align_right, up_align_buttom - up_diff * 2);
|
|
|
|
+ cb.AddImage(盆底);
|
|
|
|
+ 精神.ScalePercent(fig_zoom_up);
|
|
|
|
+ 精神.SetAbsolutePosition(up_align_left, up_align_buttom);
|
|
|
|
+ cb.AddImage(精神);
|
|
|
|
+ 膝部.ScalePercent(fig_zoom_up);
|
|
|
|
+ 膝部.SetAbsolutePosition(up_align_left, up_align_buttom - up_diff * 2);
|
|
|
|
+ cb.AddImage(膝部);
|
|
|
|
+ if (膝部详解 != null)
|
|
|
|
+ {
|
|
|
|
+ 膝部详解.ScalePercent(fig_zoom_down);
|
|
|
|
+ 膝部详解.SetAbsolutePosition(down_align_left, down_align_buttom);
|
|
|
|
+ cb.AddImage(膝部详解);
|
|
|
|
+ }
|
|
|
|
+ if (盆底详解 != null)
|
|
|
|
+ {
|
|
|
|
+ 盆底详解.ScalePercent(fig_zoom_down);
|
|
|
|
+ 盆底详解.SetAbsolutePosition(down_align_left, down_align_buttom - down_diff);
|
|
|
|
+ cb.AddImage(盆底详解);
|
|
|
|
+ }
|
|
|
|
+ if (精神详解 != null)
|
|
|
|
+ {
|
|
|
|
+ 精神详解.ScalePercent(fig_zoom_down);
|
|
|
|
+ 精神详解.SetAbsolutePosition(down_align_left, down_align_buttom - down_diff * 2);
|
|
|
|
+ cb.AddImage(精神详解);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //||第9页
|
|
|
|
+ templateName = Constants.template_custom + "\\page9.pdf";
|
|
|
|
+ if (File.Exists(templateName))
|
|
|
|
+ {
|
|
|
|
+ document.NewPage();
|
|
|
|
+ PdfReader readerTemp = new PdfReader(templateName);
|
|
|
|
+ PdfImportedPage newPage = writer.GetImportedPage(readerTemp, 1);
|
|
|
|
+ PdfContentByte cb = writer.DirectContent;
|
|
|
|
+ cb.AddTemplate(newPage, 0, 0);
|
|
|
|
+ string 精神图片 = "page9_up_jinshen";
|
|
|
|
+ string 精神文字 = "page9_up_jinshenxiajiangtext";
|
|
|
|
+ string 颈肩文字 = "page9_up_jinjiantong";
|
|
|
|
+ string 腰部文字 = "page9_up_yaotong";
|
|
|
|
+ string 便秘图片 = "page9_down_bianmi_fig";
|
|
|
|
+ string 便秘文字 = "page9_down_bianmi";
|
|
|
|
+ string 膝部图片 = "page9_down_xibu_fig";
|
|
|
|
+ string 膝部文字 = "page9_down_xibu";
|
|
|
|
+ Image 精神下降文字;
|
|
|
|
+ Image 精神下降图片 = null;
|
|
|
|
+ Image 颈肩痛文字;
|
|
|
|
+ Image 腰痛文字;
|
|
|
|
+ Image 便秘尿频文字;
|
|
|
|
+ Image 便秘尿频图片 = null;
|
|
|
|
+ Image 就站久坐疼文字;
|
|
|
|
+ Image 就站久坐疼图片 = null;
|
|
|
|
+ if (all_values["左侧仰卧骨盆上抬"] == 0 && all_values["右侧仰卧骨盆上抬"] == 0)
|
|
|
|
+ {
|
|
|
|
+ 精神下降文字 = Image.GetInstance(Constants.template_custom_element + "\\" + 精神文字 + "5.jpg");
|
|
|
|
+ 精神下降图片 = Image.GetInstance(Constants.template_custom_element + "\\" + 精神图片 + "2.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧仰卧骨盆上抬"] == 0 || all_values["右侧仰卧骨盆上抬"] == 0)
|
|
|
|
+ {
|
|
|
|
+ 精神下降文字 = Image.GetInstance(Constants.template_custom_element + "\\" + 精神文字 + "4.jpg");
|
|
|
|
+ 精神下降图片 = Image.GetInstance(Constants.template_custom_element + "\\" + 精神图片 + "2.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧仰卧骨盆上抬"] == 1 || all_values["右侧仰卧骨盆上抬"] == 1)
|
|
|
|
+ {
|
|
|
|
+ 精神下降文字 = Image.GetInstance(Constants.template_custom_element + "\\" + 精神文字 + "3.jpg");
|
|
|
|
+ 精神下降图片 = Image.GetInstance(Constants.template_custom_element + "\\" + 精神图片 + "2.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧仰卧骨盆上抬"] == 2 || all_values["右侧仰卧骨盆上抬"] == 2)
|
|
|
|
+ {
|
|
|
|
+ 精神下降文字 = Image.GetInstance(Constants.template_custom_element + "\\" + 精神文字 + "2.jpg");
|
|
|
|
+ 精神下降图片 = Image.GetInstance(Constants.template_custom_element + "\\" + 精神图片 + "1.jpg");
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ 精神下降文字 = Image.GetInstance(Constants.template_custom_element + "\\" + 精神文字 + "1.jpg");
|
|
|
|
+ }
|
|
|
|
+ //
|
|
|
|
+ if (all_values["左侧仰卧骨盆上抬"] <= 1 || all_values["右侧仰卧骨盆上抬"] <= 1 || all_values["左侧侧卧髋外展"] <= 1 || all_values["右侧侧卧髋外展"] <= 1)
|
|
|
|
+ {
|
|
|
|
+ 颈肩痛文字 = Image.GetInstance(Constants.template_custom_element + "\\" + 颈肩文字 + "3.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧仰卧骨盆上抬"] == 2 || all_values["右侧仰卧骨盆上抬"] == 2 || all_values["左侧侧卧髋外展"] == 2 || all_values["右侧侧卧髋外展"] == 2)
|
|
|
|
+ {
|
|
|
|
+ 颈肩痛文字 = Image.GetInstance(Constants.template_custom_element + "\\" + 颈肩文字 + "2.jpg");
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ 颈肩痛文字 = Image.GetInstance(Constants.template_custom_element + "\\" + 颈肩文字 + "1.jpg");
|
|
|
|
+ }
|
|
|
|
+ //
|
|
|
|
+ if (all_values["左侧仰卧骨盆上抬"] <= 1 || all_values["右侧仰卧骨盆上抬"] <= 1 || all_values["左侧侧卧髋外展"] <= 1 || all_values["右侧侧卧髋外展"] <= 1 || all_values["左侧俯卧支撑"] <= 1 || all_values["右侧俯卧支撑"] <= 1)
|
|
|
|
+ {
|
|
|
|
+ 腰痛文字 = Image.GetInstance(Constants.template_custom_element + "\\" + 腰部文字 + "3.jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧仰卧骨盆上抬"] <= 2 || all_values["右侧仰卧骨盆上抬"] <= 2 || all_values["左侧侧卧髋外展"] <= 2 || all_values["右侧侧卧髋外展"] <= 2 || all_values["左侧俯卧支撑"] <= 2 || all_values["右侧俯卧支撑"] <= 2)
|
|
|
|
+ {
|
|
|
|
+ 腰痛文字 = Image.GetInstance(Constants.template_custom_element + "\\" + 腰部文字 + "2.jpg");
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ 腰痛文字 = Image.GetInstance(Constants.template_custom_element + "\\" + 腰部文字 + "1.jpg");
|
|
|
|
+ }
|
|
|
|
+ //
|
|
|
|
+ if (all_values["左侧俯卧支撑"] == 0 && all_values["右侧俯卧支撑"] == 0 && all_values["左侧侧卧髋外展"] == 0 && all_values["右侧侧卧髋外展"] == 0)
|
|
|
|
+ {
|
|
|
|
+ 就站久坐疼文字 = Image.GetInstance(Constants.template_custom_element + "\\" + 膝部文字 + "5.jpg");
|
|
|
|
+ 就站久坐疼图片 = Image.GetInstance(Constants.template_custom_element + "\\" + 膝部图片 + ".jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧俯卧支撑"] == 0 || all_values["右侧俯卧支撑"] == 0 || all_values["左侧侧卧髋外展"] == 0 || all_values["右侧侧卧髋外展"] == 0)
|
|
|
|
+ {
|
|
|
|
+ 就站久坐疼文字 = Image.GetInstance(Constants.template_custom_element + "\\" + 膝部文字 + "4.jpg");
|
|
|
|
+ 就站久坐疼图片 = Image.GetInstance(Constants.template_custom_element + "\\" + 膝部图片 + ".jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧俯卧支撑"] == 1 || all_values["左侧俯卧支撑"] == 1 || all_values["左侧侧卧髋外展"] == 1 || all_values["右侧侧卧髋外展"] == 1)
|
|
|
|
+ {
|
|
|
|
+ 就站久坐疼文字 = Image.GetInstance(Constants.template_custom_element + "\\" + 膝部文字 + "3.jpg");
|
|
|
|
+ 就站久坐疼图片 = Image.GetInstance(Constants.template_custom_element + "\\" + 膝部图片 + ".jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧俯卧支撑"] == 2 || all_values["左侧俯卧支撑"] == 2 || all_values["左侧侧卧髋外展"] == 2 || all_values["右侧侧卧髋外展"] == 2)
|
|
|
|
+ {
|
|
|
|
+ 就站久坐疼文字 = Image.GetInstance(Constants.template_custom_element + "\\" + 膝部文字 + "2.jpg");
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ 就站久坐疼文字 = Image.GetInstance(Constants.template_custom_element + "\\" + 膝部文字 + "1.jpg");
|
|
|
|
+ }
|
|
|
|
+ //
|
|
|
|
+ if (all_values["左侧俯卧支撑"] == 0 && all_values["右侧俯卧支撑"] == 0)
|
|
|
|
+ {
|
|
|
|
+ 便秘尿频文字 = Image.GetInstance(Constants.template_custom_element + "\\" + 便秘文字 + "5.jpg");
|
|
|
|
+ 便秘尿频图片 = Image.GetInstance(Constants.template_custom_element + "\\" + 便秘图片 + ".jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧俯卧支撑"] == 0 || all_values["右侧俯卧支撑"] == 0)
|
|
|
|
+ {
|
|
|
|
+ 便秘尿频文字 = Image.GetInstance(Constants.template_custom_element + "\\" + 便秘文字 + "4.jpg");
|
|
|
|
+ 便秘尿频图片 = Image.GetInstance(Constants.template_custom_element + "\\" + 便秘图片 + ".jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧俯卧支撑"] == 1 || all_values["左侧俯卧支撑"] == 1)
|
|
|
|
+ {
|
|
|
|
+ 便秘尿频文字 = Image.GetInstance(Constants.template_custom_element + "\\" + 便秘文字 + "3.jpg");
|
|
|
|
+ 便秘尿频图片 = Image.GetInstance(Constants.template_custom_element + "\\" + 便秘图片 + ".jpg");
|
|
|
|
+ }
|
|
|
|
+ else if (all_values["左侧俯卧支撑"] == 2 || all_values["左侧俯卧支撑"] == 2)
|
|
|
|
+ {
|
|
|
|
+ 便秘尿频文字 = Image.GetInstance(Constants.template_custom_element + "\\" + 便秘文字 + "2.jpg");
|
|
|
|
+ 便秘尿频图片 = Image.GetInstance(Constants.template_custom_element + "\\" + 便秘图片 + ".jpg");
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ 便秘尿频文字 = Image.GetInstance(Constants.template_custom_element + "\\" + 便秘文字 + "1.jpg");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ int fig_zoom = 23;
|
|
|
|
+ int text_zoom = 25;
|
|
|
|
+ int fig_align_left = 310;
|
|
|
|
+ int text_align_left = 310;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ 腰痛文字.ScalePercent(text_zoom);
|
|
|
|
+ 腰痛文字.SetAbsolutePosition(text_align_left, 645);
|
|
|
|
+ cb.AddImage(腰痛文字);
|
|
|
|
+ 颈肩痛文字.ScalePercent(text_zoom);
|
|
|
|
+ 颈肩痛文字.SetAbsolutePosition(text_align_left, 550);
|
|
|
|
+ cb.AddImage(颈肩痛文字);
|
|
|
|
+ if (精神下降图片 != null)
|
|
|
|
+ {
|
|
|
|
+ 精神下降图片.ScalePercent(fig_zoom);
|
|
|
|
+ 精神下降图片.SetAbsolutePosition(fig_align_left, 435);
|
|
|
|
+ cb.AddImage(精神下降图片);
|
|
|
|
+ }
|
|
|
|
+ 精神下降文字.ScalePercent(text_zoom);
|
|
|
|
+ 精神下降文字.SetAbsolutePosition(text_align_left-70, 400);
|
|
|
|
+ cb.AddImage(精神下降文字);
|
|
|
|
+
|
|
|
|
+ if (就站久坐疼图片 != null)
|
|
|
|
+ {
|
|
|
|
+ 就站久坐疼图片.ScalePercent(fig_zoom);
|
|
|
|
+ 就站久坐疼图片.SetAbsolutePosition(fig_align_left, 290);
|
|
|
|
+ cb.AddImage(就站久坐疼图片);
|
|
|
|
+ }
|
|
|
|
+ 就站久坐疼文字.ScalePercent(text_zoom);
|
|
|
|
+ 就站久坐疼文字.SetAbsolutePosition(text_align_left-70, 235);
|
|
|
|
+ cb.AddImage(就站久坐疼文字);
|
|
|
|
+ if (便秘尿频图片 != null)
|
|
|
|
+ {
|
|
|
|
+ 便秘尿频图片.ScalePercent(fig_zoom);
|
|
|
|
+ 便秘尿频图片.SetAbsolutePosition(fig_align_left, 136);
|
|
|
|
+ cb.AddImage(便秘尿频图片);
|
|
|
|
+ }
|
|
|
|
+ 便秘尿频文字.ScalePercent(text_zoom);
|
|
|
|
+ 便秘尿频文字.SetAbsolutePosition(text_align_left-70, 100);
|
|
|
|
+ cb.AddImage(便秘尿频文字);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ //||第10页
|
|
|
|
+ templateName = Constants.template_custom + "\\page10.pdf";
|
|
|
|
+ if (all_values["左侧仰卧骨盆上抬"] <= 1 || all_values["右侧仰卧骨盆上抬"] <= 1 || all_values["左侧侧卧髋外展"] <= 1 || all_values["右侧侧卧髋外展"] <= 1 || all_values["左侧俯卧支撑"] <= 1 || all_values["右侧俯卧支撑"] <= 1)
|
|
|
|
+ {
|
|
|
|
+ if (File.Exists(templateName))
|
|
|
|
+ {
|
|
|
|
+ document.NewPage();
|
|
|
|
+ PdfReader readerTemp = new PdfReader(templateName);
|
|
|
|
+ PdfImportedPage newPage = writer.GetImportedPage(readerTemp, 1);
|
|
|
|
+ PdfContentByte cb = writer.DirectContent;
|
|
|
|
+ cb.AddTemplate(newPage, 0, 0);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //||第11页
|
|
|
|
+ templateName = Constants.template_custom + "\\page11.pdf";
|
|
|
|
+ if (true)
|
|
|
|
+ {
|
|
|
|
+ if (File.Exists(templateName))
|
|
|
|
+ {
|
|
|
|
+ document.NewPage();
|
|
|
|
+ PdfReader readerTemp = new PdfReader(templateName);
|
|
|
|
+ PdfImportedPage newPage = writer.GetImportedPage(readerTemp, 1);
|
|
|
|
+ PdfContentByte cb = writer.DirectContent;
|
|
|
|
+ cb.AddTemplate(newPage, 0, 0);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //||第12页
|
|
|
|
+ //从这页开始就要写运动频率了
|
|
|
|
+ string 每周练习35天 = "每周练习3-5天";
|
|
|
|
+ string 每天35组 = "每天3-5组";
|
|
|
|
+ string 每组1520次 = "每组15-20次";
|
|
|
|
+ string 每组1015次 = "每组10-15次";
|
|
|
|
+ string 每天练习35次 = "每天练习3-5次";
|
|
|
|
+ string 每次练习35分钟 = "每次练习3-5分钟";
|
|
|
|
+ string 每次保持30秒休息30秒 = "每次保持30秒,休息30秒";
|
|
|
|
+ string 每次保持1分钟休息30秒 = "每次保持1分钟,休息30秒";
|
|
|
|
+ int fequency_align_left = 320;
|
|
|
|
+ int fequency_align_buttom = 250;
|
|
|
|
+ int fequency_diff = 15;
|
|
|
|
+ int fequency_diff_horzion = 5;
|
|
|
|
+ templateName = Constants.template_custom + "\\page12.pdf";
|
|
|
|
+ if (all_values["左侧仰卧骨盆上抬"] <= 2 || all_values["右侧仰卧骨盆上抬"] <= 2)
|
|
|
|
+ {
|
|
|
|
+ if (File.Exists(templateName))
|
|
|
|
+ {
|
|
|
|
+ document.NewPage();
|
|
|
|
+ PdfReader readerTemp = new PdfReader(templateName);
|
|
|
|
+ PdfImportedPage newPage = writer.GetImportedPage(readerTemp, 1);
|
|
|
|
+ PdfContentByte cb = writer.DirectContent;
|
|
|
|
+ cb.AddTemplate(newPage, 0, 0);
|
|
|
|
+ cb.BeginText();
|
|
|
|
+ cb.SetTextRenderingMode(0);
|
|
|
|
+ cb.SetRGBColorFill(39, 64, 90);
|
|
|
|
+ cb.SetFontAndSize(baseFont, 10);
|
|
|
|
+ if (all_values["左侧仰卧骨盆上抬"] <= 1 || all_values["右侧仰卧骨盆上抬"] <= 1)
|
|
|
|
+ {
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left+ fequency_diff_horzion, fequency_align_buttom);
|
|
|
|
+ cb.ShowText(每天35组);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left, fequency_align_buttom - fequency_diff * 1);
|
|
|
|
+ cb.ShowText(每组1520次);
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left, fequency_align_buttom);
|
|
|
|
+ cb.ShowText(每周练习35天);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left+ fequency_diff_horzion*2, fequency_align_buttom - fequency_diff * 1);
|
|
|
|
+ cb.ShowText(每天35组);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left+ fequency_diff_horzion, fequency_align_buttom - fequency_diff * 2);
|
|
|
|
+ cb.ShowText(每组1520次);
|
|
|
|
+ }
|
|
|
|
+ cb.EndText();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //||page13
|
|
|
|
+ templateName = Constants.template_custom + "\\page13.pdf";
|
|
|
|
+ if (all_values["左侧仰卧骨盆上抬"] <= 2 || all_values["右侧仰卧骨盆上抬"] <= 2)
|
|
|
|
+ {
|
|
|
|
+ if (File.Exists(templateName))
|
|
|
|
+ {
|
|
|
|
+ document.NewPage();
|
|
|
|
+ PdfReader readerTemp = new PdfReader(templateName);
|
|
|
|
+ PdfImportedPage newPage = writer.GetImportedPage(readerTemp, 1);
|
|
|
|
+ PdfContentByte cb = writer.DirectContent;
|
|
|
|
+ cb.AddTemplate(newPage, 0, 0);
|
|
|
|
+ cb.BeginText();
|
|
|
|
+ cb.SetTextRenderingMode(0);
|
|
|
|
+ cb.SetRGBColorFill(39, 64, 90);
|
|
|
|
+ cb.SetFontAndSize(baseFont, 10);
|
|
|
|
+ if (all_values["左侧仰卧骨盆上抬"] <= 1 || all_values["右侧仰卧骨盆上抬"] <= 1)
|
|
|
|
+ {
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left + fequency_diff_horzion, fequency_align_buttom);
|
|
|
|
+ cb.ShowText(每天35组);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left, fequency_align_buttom - fequency_diff * 1);
|
|
|
|
+ cb.ShowText(每组1520次);
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left, fequency_align_buttom);
|
|
|
|
+ cb.ShowText(每周练习35天);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left + fequency_diff_horzion * 2, fequency_align_buttom - fequency_diff * 1);
|
|
|
|
+ cb.ShowText(每天35组);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left + fequency_diff_horzion, fequency_align_buttom - fequency_diff * 2);
|
|
|
|
+ cb.ShowText(每组1520次);
|
|
|
|
+ }
|
|
|
|
+ cb.EndText();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //||page14
|
|
|
|
+ templateName = Constants.template_custom + "\\page14.pdf";
|
|
|
|
+ if (all_values["左侧仰卧骨盆上抬"] <= 0 || all_values["右侧仰卧骨盆上抬"] <= 0)
|
|
|
|
+ {
|
|
|
|
+ if (File.Exists(templateName))
|
|
|
|
+ {
|
|
|
|
+ document.NewPage();
|
|
|
|
+ PdfReader readerTemp = new PdfReader(templateName);
|
|
|
|
+ PdfImportedPage newPage = writer.GetImportedPage(readerTemp, 1);
|
|
|
|
+ PdfContentByte cb = writer.DirectContent;
|
|
|
|
+ cb.AddTemplate(newPage, 0, 0);
|
|
|
|
+ cb.BeginText();
|
|
|
|
+ cb.SetTextRenderingMode(0);
|
|
|
|
+ cb.SetRGBColorFill(39, 64, 90);
|
|
|
|
+ cb.SetFontAndSize(baseFont, 10);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left + fequency_diff_horzion, fequency_align_buttom);
|
|
|
|
+ cb.ShowText(每天35组);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left, fequency_align_buttom - fequency_diff * 1);
|
|
|
|
+ cb.ShowText(每组1015次);
|
|
|
|
+ cb.EndText();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //||page15
|
|
|
|
+ templateName = Constants.template_custom + "\\page15.pdf";
|
|
|
|
+ if (all_values["左侧仰卧骨盆上抬"] <= 0 || all_values["右侧仰卧骨盆上抬"] <= 0)
|
|
|
|
+ {
|
|
|
|
+ if (File.Exists(templateName))
|
|
|
|
+ {
|
|
|
|
+ document.NewPage();
|
|
|
|
+ PdfReader readerTemp = new PdfReader(templateName);
|
|
|
|
+ PdfImportedPage newPage = writer.GetImportedPage(readerTemp, 1);
|
|
|
|
+ PdfContentByte cb = writer.DirectContent;
|
|
|
|
+ cb.AddTemplate(newPage, 0, 0);
|
|
|
|
+ cb.BeginText();
|
|
|
|
+ cb.SetTextRenderingMode(0);
|
|
|
|
+ cb.SetRGBColorFill(39, 64, 90);
|
|
|
|
+ cb.SetFontAndSize(baseFont, 10);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left + fequency_diff_horzion, fequency_align_buttom);
|
|
|
|
+ cb.ShowText(每天35组);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left, fequency_align_buttom - fequency_diff * 1);
|
|
|
|
+ cb.ShowText(每组1015次);
|
|
|
|
+ cb.EndText();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //||page16
|
|
|
|
+ templateName = Constants.template_custom + "\\page16.pdf";
|
|
|
|
+ if (all_values["左侧仰卧骨盆上抬"] <= 2 || all_values["右侧仰卧骨盆上抬"] <= 2)
|
|
|
|
+ {
|
|
|
|
+ if (File.Exists(templateName))
|
|
|
|
+ {
|
|
|
|
+ document.NewPage();
|
|
|
|
+ PdfReader readerTemp = new PdfReader(templateName);
|
|
|
|
+ PdfImportedPage newPage = writer.GetImportedPage(readerTemp, 1);
|
|
|
|
+ PdfContentByte cb = writer.DirectContent;
|
|
|
|
+ cb.AddTemplate(newPage, 0, 0);
|
|
|
|
+ cb.BeginText();
|
|
|
|
+ cb.SetTextRenderingMode(0);
|
|
|
|
+ cb.SetRGBColorFill(39, 64, 90);
|
|
|
|
+ cb.SetFontAndSize(baseFont, 10);
|
|
|
|
+ if (all_values["左侧仰卧骨盆上抬"] <= 1 || all_values["右侧仰卧骨盆上抬"] <= 1)
|
|
|
|
+ {
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left + fequency_diff_horzion, fequency_align_buttom);
|
|
|
|
+ cb.ShowText(每天35组);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left, fequency_align_buttom - fequency_diff * 1);
|
|
|
|
+ cb.ShowText(每组1520次);
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left, fequency_align_buttom);
|
|
|
|
+ cb.ShowText(每周练习35天);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left + fequency_diff_horzion * 2, fequency_align_buttom - fequency_diff * 1);
|
|
|
|
+ cb.ShowText(每天35组);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left + fequency_diff_horzion, fequency_align_buttom - fequency_diff * 2);
|
|
|
|
+ cb.ShowText(每组1520次);
|
|
|
|
+ }
|
|
|
|
+ cb.EndText();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //||page17
|
|
|
|
+ templateName = Constants.template_custom + "\\page17.pdf";
|
|
|
|
+ if (all_values["左侧侧卧髋外展"] <= 2 || all_values["右侧侧卧髋外展"] <= 2)
|
|
|
|
+ {
|
|
|
|
+ if (File.Exists(templateName))
|
|
|
|
+ {
|
|
|
|
+ document.NewPage();
|
|
|
|
+ PdfReader readerTemp = new PdfReader(templateName);
|
|
|
|
+ PdfImportedPage newPage = writer.GetImportedPage(readerTemp, 1);
|
|
|
|
+ PdfContentByte cb = writer.DirectContent;
|
|
|
|
+ cb.AddTemplate(newPage, 0, 0);
|
|
|
|
+ cb.BeginText();
|
|
|
|
+ cb.SetTextRenderingMode(0);
|
|
|
|
+ cb.SetRGBColorFill(39, 64, 90);
|
|
|
|
+ cb.SetFontAndSize(baseFont, 10);
|
|
|
|
+ if (all_values["左侧侧卧髋外展"] <= 1 || all_values["右侧侧卧髋外展"] <= 1)
|
|
|
|
+ {
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left + fequency_diff_horzion, fequency_align_buttom);
|
|
|
|
+ cb.ShowText(每天35组);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left, fequency_align_buttom - fequency_diff * 1);
|
|
|
|
+ cb.ShowText(每组1015次);
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left, fequency_align_buttom);
|
|
|
|
+ cb.ShowText(每周练习35天);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left + fequency_diff_horzion * 2, fequency_align_buttom - fequency_diff * 1);
|
|
|
|
+ cb.ShowText(每天35组);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left + fequency_diff_horzion, fequency_align_buttom - fequency_diff * 2);
|
|
|
|
+ cb.ShowText(每组1520次);
|
|
|
|
+ }
|
|
|
|
+ cb.EndText();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //||page18
|
|
|
|
+ templateName = Constants.template_custom + "\\page18.pdf";
|
|
|
|
+ if (all_values["左侧侧卧髋外展"] <= 0 || all_values["右侧侧卧髋外展"] <= 0)
|
|
|
|
+ {
|
|
|
|
+ if (File.Exists(templateName))
|
|
|
|
+ {
|
|
|
|
+ document.NewPage();
|
|
|
|
+ PdfReader readerTemp = new PdfReader(templateName);
|
|
|
|
+ PdfImportedPage newPage = writer.GetImportedPage(readerTemp, 1);
|
|
|
|
+ PdfContentByte cb = writer.DirectContent;
|
|
|
|
+ cb.AddTemplate(newPage, 0, 0);
|
|
|
|
+ cb.BeginText();
|
|
|
|
+ cb.SetTextRenderingMode(0);
|
|
|
|
+ cb.SetRGBColorFill(39, 64, 90);
|
|
|
|
+ cb.SetFontAndSize(baseFont, 10);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left + fequency_diff_horzion, fequency_align_buttom);
|
|
|
|
+ cb.ShowText(每天35组);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left, fequency_align_buttom - fequency_diff * 1);
|
|
|
|
+ cb.ShowText(每组1015次);
|
|
|
|
+ cb.EndText();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //||page19
|
|
|
|
+ templateName = Constants.template_custom + "\\page19.pdf";
|
|
|
|
+ if (all_values["左侧侧卧髋外展"] <= 2 || all_values["右侧侧卧髋外展"] <= 2)
|
|
|
|
+ {
|
|
|
|
+ if (File.Exists(templateName))
|
|
|
|
+ {
|
|
|
|
+ document.NewPage();
|
|
|
|
+ PdfReader readerTemp = new PdfReader(templateName);
|
|
|
|
+ PdfImportedPage newPage = writer.GetImportedPage(readerTemp, 1);
|
|
|
|
+ PdfContentByte cb = writer.DirectContent;
|
|
|
|
+ cb.AddTemplate(newPage, 0, 0);
|
|
|
|
+ cb.BeginText();
|
|
|
|
+ cb.SetTextRenderingMode(0);
|
|
|
|
+ cb.SetRGBColorFill(39, 64, 90);
|
|
|
|
+ cb.SetFontAndSize(baseFont, 10);
|
|
|
|
+ if (all_values["左侧侧卧髋外展"] <= 1 || all_values["右侧侧卧髋外展"] <= 1)
|
|
|
|
+ {
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left + fequency_diff_horzion, fequency_align_buttom);
|
|
|
|
+ cb.ShowText(每天35组);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left, fequency_align_buttom - fequency_diff * 1);
|
|
|
|
+ cb.ShowText(每组1015次);
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left, fequency_align_buttom);
|
|
|
|
+ cb.ShowText(每周练习35天);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left + fequency_diff_horzion * 2, fequency_align_buttom - fequency_diff * 1);
|
|
|
|
+ cb.ShowText(每天35组);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left + fequency_diff_horzion, fequency_align_buttom - fequency_diff * 2);
|
|
|
|
+ cb.ShowText(每组1520次);
|
|
|
|
+ }
|
|
|
|
+ cb.EndText();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //||page20
|
|
|
|
+ templateName = Constants.template_custom + "\\page20.pdf";
|
|
|
|
+ if (all_values["左侧侧卧髋外展"] <= 0 || all_values["右侧侧卧髋外展"] <= 0)
|
|
|
|
+ {
|
|
|
|
+ if (File.Exists(templateName))
|
|
|
|
+ {
|
|
|
|
+ document.NewPage();
|
|
|
|
+ PdfReader readerTemp = new PdfReader(templateName);
|
|
|
|
+ PdfImportedPage newPage = writer.GetImportedPage(readerTemp, 1);
|
|
|
|
+ PdfContentByte cb = writer.DirectContent;
|
|
|
|
+ cb.AddTemplate(newPage, 0, 0);
|
|
|
|
+ cb.BeginText();
|
|
|
|
+ cb.SetTextRenderingMode(0);
|
|
|
|
+ cb.SetRGBColorFill(39, 64, 90);
|
|
|
|
+ cb.SetFontAndSize(baseFont, 10);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left, fequency_align_buttom);
|
|
|
|
+ cb.ShowText(每天练习35次);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left- fequency_diff_horzion * 4, fequency_align_buttom - fequency_diff * 1);
|
|
|
|
+ cb.ShowText(每次保持30秒休息30秒);
|
|
|
|
+ cb.EndText();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //||page21
|
|
|
|
+ templateName = Constants.template_custom + "\\page21.pdf";
|
|
|
|
+ if (all_values["左侧侧卧髋外展"] <= 0 || all_values["右侧侧卧髋外展"] <= 0)
|
|
|
|
+ {
|
|
|
|
+ if (File.Exists(templateName))
|
|
|
|
+ {
|
|
|
|
+ document.NewPage();
|
|
|
|
+ PdfReader readerTemp = new PdfReader(templateName);
|
|
|
|
+ PdfImportedPage newPage = writer.GetImportedPage(readerTemp, 1);
|
|
|
|
+ PdfContentByte cb = writer.DirectContent;
|
|
|
|
+ cb.AddTemplate(newPage, 0, 0);
|
|
|
|
+ cb.BeginText();
|
|
|
|
+ cb.SetTextRenderingMode(0);
|
|
|
|
+ cb.SetRGBColorFill(39, 64, 90);
|
|
|
|
+ cb.SetFontAndSize(baseFont, 10);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left, fequency_align_buttom);
|
|
|
|
+ cb.ShowText(每天练习35次);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left - fequency_diff_horzion*4, fequency_align_buttom - fequency_diff * 1);
|
|
|
|
+ cb.ShowText(每次保持30秒休息30秒);
|
|
|
|
+ cb.EndText();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //||page22
|
|
|
|
+ templateName = Constants.template_custom + "\\page22.pdf";
|
|
|
|
+ if (all_values["左侧侧卧髋外展"] <= 2 || all_values["右侧侧卧髋外展"] <= 2)
|
|
|
|
+ {
|
|
|
|
+ if (File.Exists(templateName))
|
|
|
|
+ {
|
|
|
|
+ document.NewPage();
|
|
|
|
+ PdfReader readerTemp = new PdfReader(templateName);
|
|
|
|
+ PdfImportedPage newPage = writer.GetImportedPage(readerTemp, 1);
|
|
|
|
+ PdfContentByte cb = writer.DirectContent;
|
|
|
|
+ cb.AddTemplate(newPage, 0, 0);
|
|
|
|
+ cb.BeginText();
|
|
|
|
+ cb.SetTextRenderingMode(0);
|
|
|
|
+ cb.SetRGBColorFill(39, 64, 90);
|
|
|
|
+ cb.SetFontAndSize(baseFont, 10);
|
|
|
|
+ if (all_values["左侧侧卧髋外展"] <= 1 || all_values["右侧侧卧髋外展"] <= 1)
|
|
|
|
+ {
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left + fequency_diff_horzion, fequency_align_buttom);
|
|
|
|
+ cb.ShowText(每天35组);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left, fequency_align_buttom - fequency_diff * 1);
|
|
|
|
+ cb.ShowText(每组1015次);
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left, fequency_align_buttom);
|
|
|
|
+ cb.ShowText(每周练习35天);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left + fequency_diff_horzion * 2, fequency_align_buttom - fequency_diff * 1);
|
|
|
|
+ cb.ShowText(每天35组);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left + fequency_diff_horzion, fequency_align_buttom - fequency_diff * 2);
|
|
|
|
+ cb.ShowText(每组1520次);
|
|
|
|
+ }
|
|
|
|
+ cb.EndText();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //||page23
|
|
|
|
+ templateName = Constants.template_custom + "\\page23.pdf";
|
|
|
|
+ if (all_values["左侧俯卧支撑"] <= 2 || all_values["右侧俯卧支撑"] <= 2)
|
|
|
|
+ {
|
|
|
|
+ if (File.Exists(templateName))
|
|
|
|
+ {
|
|
|
|
+ document.NewPage();
|
|
|
|
+ PdfReader readerTemp = new PdfReader(templateName);
|
|
|
|
+ PdfImportedPage newPage = writer.GetImportedPage(readerTemp, 1);
|
|
|
|
+ PdfContentByte cb = writer.DirectContent;
|
|
|
|
+ cb.AddTemplate(newPage, 0, 0);
|
|
|
|
+ cb.BeginText();
|
|
|
|
+ cb.SetTextRenderingMode(0);
|
|
|
|
+ cb.SetRGBColorFill(39, 64, 90);
|
|
|
|
+ cb.SetFontAndSize(baseFont, 10);
|
|
|
|
+ if (all_values["左侧俯卧支撑"] <= 1 || all_values["右侧俯卧支撑"] <= 1)
|
|
|
|
+ {
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left + fequency_diff_horzion, fequency_align_buttom);
|
|
|
|
+ cb.ShowText(每天练习35次);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left, fequency_align_buttom - fequency_diff * 1);
|
|
|
|
+ cb.ShowText(每次练习35分钟);
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left, fequency_align_buttom);
|
|
|
|
+ cb.ShowText(每周练习35天);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left, fequency_align_buttom - fequency_diff * 1);
|
|
|
|
+ cb.ShowText(每天练习35次);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left - fequency_diff_horzion, fequency_align_buttom - fequency_diff * 2);
|
|
|
|
+ cb.ShowText(每次练习35分钟);
|
|
|
|
+ }
|
|
|
|
+ cb.EndText();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //||page24
|
|
|
|
+ templateName = Constants.template_custom + "\\page24.pdf";
|
|
|
|
+ if (all_values["左侧俯卧支撑"] <= 0 || all_values["右侧俯卧支撑"] <= 0)
|
|
|
|
+ {
|
|
|
|
+ if (File.Exists(templateName))
|
|
|
|
+ {
|
|
|
|
+ document.NewPage();
|
|
|
|
+ PdfReader readerTemp = new PdfReader(templateName);
|
|
|
|
+ PdfImportedPage newPage = writer.GetImportedPage(readerTemp, 1);
|
|
|
|
+ PdfContentByte cb = writer.DirectContent;
|
|
|
|
+ cb.AddTemplate(newPage, 0, 0);
|
|
|
|
+ cb.BeginText();
|
|
|
|
+ cb.SetTextRenderingMode(0);
|
|
|
|
+ cb.SetRGBColorFill(39, 64, 90);
|
|
|
|
+ cb.SetFontAndSize(baseFont, 10);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left + fequency_diff_horzion, fequency_align_buttom);
|
|
|
|
+ cb.ShowText(每天35组);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left, fequency_align_buttom - fequency_diff * 1);
|
|
|
|
+ cb.ShowText(每组1015次);
|
|
|
|
+ cb.EndText();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //||page25
|
|
|
|
+ templateName = Constants.template_custom + "\\page25.pdf";
|
|
|
|
+ if (all_values["左侧俯卧支撑"] <= 2 || all_values["右侧俯卧支撑"] <= 2)
|
|
|
|
+ {
|
|
|
|
+ if (File.Exists(templateName))
|
|
|
|
+ {
|
|
|
|
+ document.NewPage();
|
|
|
|
+ PdfReader readerTemp = new PdfReader(templateName);
|
|
|
|
+ PdfImportedPage newPage = writer.GetImportedPage(readerTemp, 1);
|
|
|
|
+ PdfContentByte cb = writer.DirectContent;
|
|
|
|
+ cb.AddTemplate(newPage, 0, 0);
|
|
|
|
+ cb.BeginText();
|
|
|
|
+ cb.SetTextRenderingMode(0);
|
|
|
|
+ cb.SetRGBColorFill(39, 64, 90);
|
|
|
|
+ cb.SetFontAndSize(baseFont, 10);
|
|
|
|
+ if (all_values["左侧俯卧支撑"] <= 1 || all_values["右侧俯卧支撑"] <= 1)
|
|
|
|
+ {
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left , fequency_align_buttom);
|
|
|
|
+ cb.ShowText(每天练习35次);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left - fequency_diff_horzion*4, fequency_align_buttom - fequency_diff * 1);
|
|
|
|
+ cb.ShowText(每次保持1分钟休息30秒);
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left, fequency_align_buttom);
|
|
|
|
+ cb.ShowText(每周练习35天);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left, fequency_align_buttom);
|
|
|
|
+ cb.ShowText(每天练习35次);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left - fequency_diff_horzion*4, fequency_align_buttom - fequency_diff * 2);
|
|
|
|
+ cb.ShowText(每次保持1分钟休息30秒);
|
|
|
|
+ }
|
|
|
|
+ cb.EndText();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //||page26
|
|
|
|
+ templateName = Constants.template_custom + "\\page26.pdf";
|
|
|
|
+ if (all_values["左侧俯卧支撑"] <= 0 || all_values["右侧俯卧支撑"] <= 0)
|
|
|
|
+ {
|
|
|
|
+ if (File.Exists(templateName))
|
|
|
|
+ {
|
|
|
|
+ document.NewPage();
|
|
|
|
+ PdfReader readerTemp = new PdfReader(templateName);
|
|
|
|
+ PdfImportedPage newPage = writer.GetImportedPage(readerTemp, 1);
|
|
|
|
+ PdfContentByte cb = writer.DirectContent;
|
|
|
|
+ cb.AddTemplate(newPage, 0, 0);
|
|
|
|
+ cb.BeginText();
|
|
|
|
+ cb.SetTextRenderingMode(0);
|
|
|
|
+ cb.SetRGBColorFill(39, 64, 90);
|
|
|
|
+ cb.SetFontAndSize(baseFont, 10);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left + fequency_diff_horzion, fequency_align_buttom);
|
|
|
|
+ cb.ShowText(每天35组);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left, fequency_align_buttom - fequency_diff * 1);
|
|
|
|
+ cb.ShowText(每组1015次);
|
|
|
|
+ cb.EndText();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //||page27
|
|
|
|
+ templateName = Constants.template_custom + "\\page27.pdf";
|
|
|
|
+ if (all_values["左侧俯卧支撑"] <= 2 || all_values["右侧俯卧支撑"] <= 2)
|
|
|
|
+ {
|
|
|
|
+ if (File.Exists(templateName))
|
|
|
|
+ {
|
|
|
|
+ document.NewPage();
|
|
|
|
+ PdfReader readerTemp = new PdfReader(templateName);
|
|
|
|
+ PdfImportedPage newPage = writer.GetImportedPage(readerTemp, 1);
|
|
|
|
+ PdfContentByte cb = writer.DirectContent;
|
|
|
|
+ cb.AddTemplate(newPage, 0, 0);
|
|
|
|
+ cb.BeginText();
|
|
|
|
+ cb.SetTextRenderingMode(0);
|
|
|
|
+ cb.SetRGBColorFill(39, 64, 90);
|
|
|
|
+ cb.SetFontAndSize(baseFont, 10);
|
|
|
|
+ if (all_values["左侧俯卧支撑"] <= 1 || all_values["右侧俯卧支撑"] <= 1)
|
|
|
|
+ {
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left, fequency_align_buttom);
|
|
|
|
+ cb.ShowText(每天练习35次);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left - fequency_diff_horzion * 4, fequency_align_buttom - fequency_diff * 1);
|
|
|
|
+ cb.ShowText(每次保持30秒休息30秒);
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left, fequency_align_buttom);
|
|
|
|
+ cb.ShowText(每周练习35天);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left, fequency_align_buttom);
|
|
|
|
+ cb.ShowText(每天练习35次);
|
|
|
|
+ cb.SetTextMatrix(fequency_align_left - fequency_diff_horzion * 4, fequency_align_buttom - fequency_diff * 2);
|
|
|
|
+ cb.ShowText(每次保持30秒休息30秒);
|
|
|
|
+ }
|
|
|
|
+ cb.EndText();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //||page28
|
|
|
|
+ templateName = Constants.template_custom + "\\page28.pdf";
|
|
|
|
+ if (File.Exists(templateName))
|
|
|
|
+ {
|
|
|
|
+ document.NewPage();
|
|
|
|
+ PdfReader readerTemp = new PdfReader(templateName);
|
|
|
|
+ PdfImportedPage newPage = writer.GetImportedPage(readerTemp, 1);
|
|
|
|
+ PdfContentByte cb = writer.DirectContent;
|
|
|
|
+ cb.AddTemplate(newPage, 0, 0);
|
|
|
|
+ }
|
|
|
|
+ //||page29
|
|
|
|
+ templateName = Constants.template_custom + "\\page29.pdf";
|
|
|
|
+ if (File.Exists(templateName))
|
|
|
|
+ {
|
|
|
|
+ document.NewPage();
|
|
|
|
+ PdfReader readerTemp = new PdfReader(templateName);
|
|
|
|
+ PdfImportedPage newPage = writer.GetImportedPage(readerTemp, 1);
|
|
|
|
+ PdfContentByte cb = writer.DirectContent;
|
|
|
|
+ cb.AddTemplate(newPage, 0, 0);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //全文结束,打开文件
|
|
|
|
+ document.Close();
|
|
|
|
+ System.Diagnostics.Process.Start(fileName);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ public static int search_a_value(List<SQLite.UserSelection> selections, int key_value)
|
|
|
|
+ {
|
|
|
|
+ foreach(SQLite.UserSelection us in selections)
|
|
|
|
+ {
|
|
|
|
+ if (us.q_id == key_value)
|
|
|
|
+ {
|
|
|
|
+ SQLite.Answer aTemp = SQLite.SQLiteModel.getAnswerById(us.a_id);
|
|
|
|
+ return aTemp.a_value;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return -1;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public static int search_a_pain(List<SQLite.UserSelection> selections, int key_value)
|
|
|
|
+ {
|
|
|
|
+ foreach (SQLite.UserSelection us in selections)
|
|
|
|
+ {
|
|
|
|
+ if (us.q_id == key_value)
|
|
|
|
+ {
|
|
|
|
+ SQLite.Answer aTemp = SQLite.SQLiteModel.getAnswerById(us.a_id);
|
|
|
|
+ return aTemp.a_pain;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return -1;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public static Dictionary<string, int> get_all_values(List<SQLite.UserSelection> selections)
|
|
|
|
+ {
|
|
|
|
+ Dictionary<string, int> results = new Dictionary<string, int>();
|
|
|
|
+ //左侧仰卧骨盆上抬
|
|
|
|
+ int temp_value = -1;
|
|
|
|
+ temp_value = search_a_value(selections, 11);
|
|
|
|
+ if (temp_value < 0)
|
|
|
|
+ {
|
|
|
|
+ temp_value = search_a_value(selections, 10);
|
|
|
|
+ if (temp_value < 0)
|
|
|
|
+ {
|
|
|
|
+ temp_value = search_a_value(selections, 9);
|
|
|
|
+ if (temp_value < 0)
|
|
|
|
+ {
|
|
|
|
+ temp_value = search_a_value(selections, 1);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ results.Add("左侧仰卧骨盆上抬", temp_value);
|
|
|
|
+ //右侧仰卧骨盆上抬
|
|
|
|
+ temp_value = -1;
|
|
|
|
+ temp_value = search_a_value(selections, 14);
|
|
|
|
+ if (temp_value < 0)
|
|
|
|
+ {
|
|
|
|
+ temp_value = search_a_value(selections, 13);
|
|
|
|
+ if (temp_value < 0)
|
|
|
|
+ {
|
|
|
|
+ temp_value = search_a_value(selections, 12);
|
|
|
|
+ if (temp_value < 0)
|
|
|
|
+ {
|
|
|
|
+ temp_value = search_a_value(selections, 2);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ results.Add("右侧仰卧骨盆上抬", temp_value);
|
|
|
|
+ //左侧侧卧髋外展
|
|
|
|
+ temp_value = -1;
|
|
|
|
+ temp_value = search_a_value(selections, 17);
|
|
|
|
+ if (temp_value < 0)
|
|
|
|
+ {
|
|
|
|
+ temp_value = search_a_value(selections, 16);
|
|
|
|
+ if (temp_value < 0)
|
|
|
|
+ {
|
|
|
|
+ temp_value = search_a_value(selections, 15);
|
|
|
|
+ if (temp_value < 0)
|
|
|
|
+ {
|
|
|
|
+ temp_value = search_a_value(selections, 3);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ results.Add("左侧侧卧髋外展", temp_value);
|
|
|
|
+ //右侧侧卧髋外展
|
|
|
|
+ temp_value = -1;
|
|
|
|
+ temp_value = search_a_value(selections, 20);
|
|
|
|
+ if (temp_value < 0)
|
|
|
|
+ {
|
|
|
|
+ temp_value = search_a_value(selections, 19);
|
|
|
|
+ if (temp_value < 0)
|
|
|
|
+ {
|
|
|
|
+ temp_value = search_a_value(selections, 18);
|
|
|
|
+ if (temp_value < 0)
|
|
|
|
+ {
|
|
|
|
+ temp_value = search_a_value(selections, 4);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ results.Add("右侧侧卧髋外展", temp_value);
|
|
|
|
+ //左侧俯卧支撑
|
|
|
|
+ temp_value = -1;
|
|
|
|
+ temp_value = search_a_value(selections, 23);
|
|
|
|
+ if (temp_value < 0)
|
|
|
|
+ {
|
|
|
|
+ temp_value = search_a_value(selections, 22);
|
|
|
|
+ if (temp_value < 0)
|
|
|
|
+ {
|
|
|
|
+ temp_value = search_a_value(selections, 21);
|
|
|
|
+ if (temp_value < 0)
|
|
|
|
+ {
|
|
|
|
+ temp_value = search_a_value(selections, 5);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ results.Add("左侧俯卧支撑", temp_value);
|
|
|
|
+ //右侧俯卧支撑
|
|
|
|
+ temp_value = -1;
|
|
|
|
+ temp_value = search_a_value(selections, 26);
|
|
|
|
+ if (temp_value < 0)
|
|
|
|
+ {
|
|
|
|
+ temp_value = search_a_value(selections, 25);
|
|
|
|
+ if (temp_value < 0)
|
|
|
|
+ {
|
|
|
|
+ temp_value = search_a_value(selections, 24);
|
|
|
|
+ if (temp_value < 0)
|
|
|
|
+ {
|
|
|
|
+ temp_value = search_a_value(selections, 6);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ results.Add("右侧俯卧支撑", temp_value);
|
|
|
|
+
|
|
|
|
+ return results;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public static Dictionary<string, int> get_all_pains(List<SQLite.UserSelection> selections)
|
|
|
|
+ {
|
|
|
|
+ Dictionary<string, int> results = new Dictionary<string, int>();
|
|
|
|
+ //左侧仰卧骨盆上抬
|
|
|
|
+ int temp_value = -1;
|
|
|
|
+ temp_value = search_a_pain(selections, 11);
|
|
|
|
+ if (temp_value < 0)
|
|
|
|
+ {
|
|
|
|
+ temp_value = search_a_pain(selections, 10);
|
|
|
|
+ if (temp_value < 0)
|
|
|
|
+ {
|
|
|
|
+ temp_value = search_a_pain(selections, 9);
|
|
|
|
+ if (temp_value < 0)
|
|
|
|
+ {
|
|
|
|
+ temp_value = search_a_pain(selections, 1);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ results.Add("左侧仰卧骨盆上抬", temp_value);
|
|
|
|
+ //右侧仰卧骨盆上抬
|
|
|
|
+ temp_value = -1;
|
|
|
|
+ temp_value = search_a_pain(selections, 14);
|
|
|
|
+ if (temp_value < 0)
|
|
|
|
+ {
|
|
|
|
+ temp_value = search_a_pain(selections, 13);
|
|
|
|
+ if (temp_value < 0)
|
|
|
|
+ {
|
|
|
|
+ temp_value = search_a_pain(selections, 12);
|
|
|
|
+ if (temp_value < 0)
|
|
|
|
+ {
|
|
|
|
+ temp_value = search_a_pain(selections, 2);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ results.Add("右侧仰卧骨盆上抬", temp_value);
|
|
|
|
+ //左侧侧卧髋外展
|
|
|
|
+ temp_value = -1;
|
|
|
|
+ temp_value = search_a_pain(selections, 17);
|
|
|
|
+ if (temp_value < 0)
|
|
|
|
+ {
|
|
|
|
+ temp_value = search_a_pain(selections, 16);
|
|
|
|
+ if (temp_value < 0)
|
|
|
|
+ {
|
|
|
|
+ temp_value = search_a_pain(selections, 15);
|
|
|
|
+ if (temp_value < 0)
|
|
|
|
+ {
|
|
|
|
+ temp_value = search_a_pain(selections, 3);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ results.Add("左侧侧卧髋外展", temp_value);
|
|
|
|
+ //右侧侧卧髋外展
|
|
|
|
+ temp_value = -1;
|
|
|
|
+ temp_value = search_a_pain(selections, 20);
|
|
|
|
+ if (temp_value < 0)
|
|
|
|
+ {
|
|
|
|
+ temp_value = search_a_pain(selections, 19);
|
|
|
|
+ if (temp_value < 0)
|
|
|
|
+ {
|
|
|
|
+ temp_value = search_a_pain(selections, 18);
|
|
|
|
+ if (temp_value < 0)
|
|
|
|
+ {
|
|
|
|
+ temp_value = search_a_pain(selections, 4);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ results.Add("右侧侧卧髋外展", temp_value);
|
|
|
|
+ //左侧俯卧支撑
|
|
|
|
+ temp_value = -1;
|
|
|
|
+ temp_value = search_a_pain(selections, 23);
|
|
|
|
+ if (temp_value < 0)
|
|
|
|
+ {
|
|
|
|
+ temp_value = search_a_pain(selections, 22);
|
|
|
|
+ if (temp_value < 0)
|
|
|
|
+ {
|
|
|
|
+ temp_value = search_a_pain(selections, 21);
|
|
|
|
+ if (temp_value < 0)
|
|
|
|
+ {
|
|
|
|
+ temp_value = search_a_pain(selections, 5);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ results.Add("左侧俯卧支撑", temp_value);
|
|
|
|
+ //右侧俯卧支撑
|
|
|
|
+ temp_value = -1;
|
|
|
|
+ temp_value = search_a_pain(selections, 26);
|
|
|
|
+ if (temp_value < 0)
|
|
|
|
+ {
|
|
|
|
+ temp_value = search_a_pain(selections, 25);
|
|
|
|
+ if (temp_value < 0)
|
|
|
|
+ {
|
|
|
|
+ temp_value = search_a_pain(selections, 24);
|
|
|
|
+ if (temp_value < 0)
|
|
|
|
+ {
|
|
|
|
+ temp_value = search_a_pain(selections, 6);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ results.Add("右侧俯卧支撑", temp_value);
|
|
|
|
+
|
|
|
|
+ return results;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|