填充控件的grafics属性:
private void printReportPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
printWidth = e.PageBounds.Width;
sideMargin = printWidth / ;
topMargin = printWidth / ;
if (currentPrintReport == )
{
if (langText[] == "zh-CN")
{
if (printReportPage_C(currentPrintPage, e.Graphics, true))
{
e.HasMorePages = true;
currentPrintPage++;
}
else
{
currentPrintReport = ;
currentPrintPage = ;
if (multiLang)
{
e.HasMorePages = true;
}
else
{
e.HasMorePages = false;
}
}
}
else if (langText[] == "EN")
{
//if (printReportPage_E(currentPrintPage, e.Graphics, true))
if (printReportPage_E(currentPrintPage, e.Graphics, false))
{
e.HasMorePages = true;
currentPrintPage++;
}
else
{
currentPrintReport = ;
currentPrintPage = ;
if (multiLang)
{
e.HasMorePages = true;
}
else
{
e.HasMorePages = false;
}
}
} }
else if (currentPrintReport == )
{
if (langText[] == "zh-CN")
{
if (printReportPage_C(currentPrintPage, e.Graphics, false))
{
e.HasMorePages = true;
currentPrintPage++;
}
else
{
e.HasMorePages = false;
}
}
else if (langText[] == "EN")
{
if (printReportPage_E(currentPrintPage, e.Graphics, false))
{
e.HasMorePages = true;
currentPrintPage++;
}
else
{ e.HasMorePages = false;
}
} }
////Graphics g = e.Graphics; //获得绘图对象
//float leftMargin = e.MarginBounds.Left; //左边距
//float topMargin = e.MarginBounds.Top; //上边距
//float x1 = leftMargin;
//float x2 = e.MarginBounds.Right;
//float y = topMargin;
//Rectangle rect1;
}
private Boolean printReportPage_C(int page, Graphics g, Boolean primary)//中文报告模板
{
// Graphics g = e.Graphics;
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
int x1 = sideMargin;
int x2 = printWidth - sideMargin;
int y = topMargin;
float right = printWidth;
Rectangle rect1;
Boolean ifPrintNum = true;
Boolean ifPrintNum2 = true;
ifConvert = checkBox_Fanti.Checked;
switch (page)
{
case : //首页
#region 首页
#region Log
y = topMargin;
y += ;
g.DrawImage(Properties.Resources.logo, x1 + , y, , );
#endregion #region 人体代谢热层像
y += ;
rect1 = new Rectangle((int)x1, (int)y, (int)(x2 - x1), (int)(font_22r.GetHeight(g)));
g.DrawString(convertToTradition("人体代谢热层像", ifConvert), font_22r, myBrush, rect1, stringFormat);
y += ;
rect1 = new Rectangle((int)x1, (int)y, (int)(x2 - x1), (int)(font_10r.GetHeight(g)));
g.DrawString("Thermal Metabolic Imaging , TMI", font_10r, myBrush, rect1, stringFormat);
y += ;
rect1 = new Rectangle((int)x1, (int)y, (int)(x2 - x1), (int)(font_36b.GetHeight(g)));
//g.DrawString(convertToTradition("健康" + (checkBox_linchuang.Checked ? "检测" : "评估") + "报告", ifConvert), font_36b, myBrush, rect1, stringFormat);
g.DrawString(convertToTradition("健康评估报告", ifConvert), font_36b, myBrush, rect1, stringFormat);
y += ;
rect1 = new Rectangle((int)x1, (int)y, (int)(x2 - x1), (int)(font_10r.GetHeight(g)));
g.DrawString("Health Evaluation Report in Medical Infrared", font_10r, myBrush, rect1, stringFormat);
y += ;
y -= ; Point p1 = new Point((int)x1, (int)y);
Point p2 = new Point((int)x2, (int)y);
g.DrawLine(Pens.Gray, p1, p2); #endregion #region 姓名、采图站点、日期、报告单位
y += ;
rect1 = new Rectangle((int)x1 + , (int)y, (int)(x2 - x1), (int)(font_12r.GetHeight(g)));
g.DrawString(convertToTradition("姓名:" + textBox_name.Text, ifConvert), font_12r, myBrush, rect1, stringFormat_left);
rect1 = new Rectangle((int)x1 + , (int)y, (int)(x2 - x1), (int)(font_12r.GetHeight(g)));
g.DrawString(convertToTradition("采图站点:" + textBox_site.Text, ifConvert), font_12r, myBrush, rect1, stringFormat_left);
y += ;
rect1 = new Rectangle((int)x1 + , (int)y, (int)(x2 - x1), (int)(font_12r.GetHeight(g))); g.DrawString(convertToTradition("日期:" + DateTime.Parse(label_create_date_inside.Text).ToShortDateString(), ifConvert), font_12r, myBrush, rect1, stringFormat_left);
rect1 = new Rectangle((int)x1 + , (int)y, (int)(x2 - x1), (int)(font_12r.GetHeight(g)));
g.DrawString(convertToTradition("报告单位:" + sitename, ifConvert), font_12r, myBrush, rect1, stringFormat_left);
y += ; p1 = new Point((int)x1, (int)y);
p2 = new Point((int)x2, (int)y);
g.DrawLine(Pens.Gray, p1, p2); y += ;
p1 = new Point((int)x1, (int)y);
p2 = new Point((int)x2, (int)y);
g.DrawLine(Pens.Gray, p1, p2);
#endregion #region 地址、电话、手机:
string m_showAddress = inifile.ReadString("Config", "ShowAddress", "F");
if (m_showAddress == "T")
{
y += ;
rect1 = new Rectangle((int)x1 + , (int)y, (int)(x2 - x1), (int)(font_10r.GetHeight(g)));
g.DrawString(convertToTradition("地址:" + m_Address, ifConvert), Address_Font, myBrush, rect1, stringFormat_left);
rect1 = new Rectangle((int)x1 + , (int)y, (int)(x2 - x1), (int)(font_12r.GetHeight(g)));
g.DrawString(convertToTradition("电话:" + m_Telephone, ifConvert), Address_Font, myBrush, rect1, stringFormat_left);
}
#endregion
#endregion
return true;
case : //第1页
#region 循环系统
printHeader(g);
y = topMargin + ;
printSysHeader(g, "", "循环系统", (int)y, true); if (pictureBox1.Image != null && pictureBox2.Image != null)
{
// 插值算法的质量
g.InterpolationMode = InterpolationMode.HighQualityBicubic; y += ; g.DrawImage(pictureBox1.Image, new Rectangle((int)x1 + , (int)y, , ), new Rectangle(, , pictureBox1.Image.Width, pictureBox1.Image.Height), GraphicsUnit.Pixel);
y += ;
rect1 = new Rectangle((int)x1 + , (int)y - , , (int)( * font_7r.GetHeight(g))); //画矩形框
Pen rect_temperature = (Pen)Pens.LightGray.Clone();
rect_temperature.Width = ;
g.DrawRectangle(rect_temperature, rect1); rect1 = new Rectangle((int)x1 + , (int)y - , , (int)( * font_7r.GetHeight(g)));
g.DrawString(convertToTradition(lab_temperature1.Text, ifConvert), font_7r, myBrush, rect1, stringFormat_left); //g.DrawString(convertToTradition(lab_temperature1.Text, ifConvert), font_7r, myBrush, rect1, stringFormat_left);
y += ;
rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_8r.GetHeight(g)));
if (primary)
{
g.DrawString(convertToTradition("● " + cmb1.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
else
{
g.DrawString(convertToTradition("● " + E_cmb1.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
y += ;
rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_8r.GetHeight(g)));
if (primary)
{
g.DrawString(convertToTradition("● " + cmb2.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
else
{
g.DrawString(convertToTradition("● " + E_cmb2.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
y += ;
rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_8r.GetHeight(g)));
if (primary)
{
g.DrawString(convertToTradition("● " + cmb3.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
else
{
g.DrawString(convertToTradition("● " + E_cmb3.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
} y += ;
p1 = new Point(x1 + , y);
p2 = new Point(x2, y);
g.DrawLine(pen, p1, p2); y += ;
g.DrawImage(pictureBox2.Image, new Rectangle((int)x1 + , (int)y, , ), new Rectangle(, , pictureBox1.Image.Width, pictureBox1.Image.Height), GraphicsUnit.Pixel);
y += ;
rect1 = new Rectangle((int)x1 + , (int)y - , , (int)( * font_7r.GetHeight(g))); //画矩形框
rect_temperature = (Pen)Pens.LightGray.Clone();
rect_temperature.Width = ;
g.DrawRectangle(rect_temperature, rect1); rect1 = new Rectangle((int)x1 + , (int)y - , , (int)( * font_7r.GetHeight(g)));
g.DrawString(convertToTradition(lab_temperature2.Text, ifConvert), font_7r, myBrush, rect1, stringFormat_left);
y += ;
rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_8r.GetHeight(g)));
if (primary)
{
g.DrawString(convertToTradition("● " + cmb4.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
else
{
g.DrawString(convertToTradition("● " + E_cmb4.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
y += ;
rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_8r.GetHeight(g)));
if (primary)
{
g.DrawString(convertToTradition("● " + cmb5.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
else
{
g.DrawString(convertToTradition("● " + E_cmb5.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
y += ;
rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_8r.GetHeight(g)));
if (primary)
{
g.DrawString(convertToTradition("● " + cmb6.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
else
{
g.DrawString(convertToTradition("● " + E_cmb6.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
}
else
{
y += ;
rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_7r.GetHeight(g)));
g.DrawString(convertToTradition(lab_temperature1.Text, ifConvert), font_7r, myBrush, rect1, stringFormat_left);
y += ;
rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_8r.GetHeight(g)));
if (primary)
{
g.DrawString(convertToTradition("● " + cmb1.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
else
{
g.DrawString(convertToTradition("● " + E_cmb1.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
y += ;
rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_8r.GetHeight(g)));
if (primary)
{
g.DrawString(convertToTradition("● " + cmb2.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
else
{
g.DrawString(convertToTradition("● " + E_cmb2.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
y += ;
rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_8r.GetHeight(g)));
if (primary)
{
g.DrawString(convertToTradition("● " + cmb3.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
else
{
g.DrawString(convertToTradition("● " + E_cmb3.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
} y += ;
p1 = new Point(x1 + , y);
p2 = new Point(x2, y);
g.DrawLine(pen, p1, p2); y += ; y += ;
rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_7r.GetHeight(g)));
g.DrawString(convertToTradition(lab_temperature2.Text, ifConvert), font_7r, myBrush, rect1, stringFormat_left);
y += ;
rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_8r.GetHeight(g)));
if (primary)
{
g.DrawString(convertToTradition("● " + cmb4.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
else
{
g.DrawString(convertToTradition("● " + E_cmb4.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
y += ;
rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_8r.GetHeight(g)));
if (primary)
{
g.DrawString(convertToTradition("● " + cmb5.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
else
{
g.DrawString(convertToTradition("● " + E_cmb5.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
y += ;
rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_8r.GetHeight(g)));
if (primary)
{
g.DrawString(convertToTradition("● " + cmb6.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
else
{
g.DrawString(convertToTradition("● " + E_cmb6.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
} } y -= ;
y += ;
if (primary)
{
for (int i = ; i < GridView_xunhuan.Rows.Count; i++)
{
y += ;
printLine(g, (int)y, "1." + (i + ), GridView_xunhuan.Rows[i].Cells[].Value.ToString(), subSystems[][i].reyuanbiaoxian, getSubString(subSystems[][i].tishi, primary), true);
}
}
else
{
for (int i = ; i < E_GridView_xunhuan.Rows.Count; i++)
{
y += ;
printLine(g, (int)y, "1." + (i + ), E_GridView_xunhuan.Rows[i].Cells[].Value.ToString(), subSystems[][i].reyuanbiaoxian, getSubString(subSystems[][i].tishi, primary), true);
}
}
y += ;
printSysHeader(g, "", "呼吸系统", (int)y, true);
y += ;
if (primary)
{
for (int i = ; i < GridView_huxi.Rows.Count; i++)
{
y += ;
printLine(g, (int)y, "2." + (i + ), GridView_huxi.Rows[i].Cells[].Value.ToString(), subSystems[][i].reyuanbiaoxian, getSubString(subSystems[][i].tishi, primary), true);
}
}
else
{
for (int i = ; i < E_GridView_huxi.Rows.Count; i++)
{
y += ;
printLine(g, (int)y, "2." + (i + ), E_GridView_huxi.Rows[i].Cells[].Value.ToString(), subSystems[][i].reyuanbiaoxian, getSubString(subSystems[][i].tishi, primary), true);
}
} y += ;
printSysHeader(g, "", "消化系统", (int)y, true);
y += ;
if (primary)
{
for (int i = ; i < GridView_xiaohua.Rows.Count; i++)
{
y += ;
printLine(g, (int)y, "3." + (i + ), GridView_xiaohua.Rows[i].Cells[].Value.ToString(), subSystems[][i].reyuanbiaoxian, getSubString(subSystems[][i].tishi, primary), true);
}
}
else
{
for (int i = ; i < E_GridView_xiaohua.Rows.Count; i++)
{
y += ;
printLine(g, (int)y, "3." + (i + ), E_GridView_xiaohua.Rows[i].Cells[].Value.ToString(), subSystems[][i].reyuanbiaoxian, getSubString(subSystems[][i].tishi, primary), true);
}
} y += ;
printSysHeader(g, "", "内分泌、代谢", (int)y, true);
y += ;
if (primary)
{
for (int i = ; i < GridView_neifenmi.Rows.Count; i++)
{
y += ;
printLine(g, (int)y, "4." + (i + ), GridView_neifenmi.Rows[i].Cells[].Value.ToString(), subSystems[][i].reyuanbiaoxian, getSubString(subSystems[][i].tishi, primary), true);
}
}
else
{
for (int i = ; i < E_GridView_neifenmi.Rows.Count; i++)
{
y += ;
printLine(g, (int)y, "4." + (i + ), E_GridView_neifenmi.Rows[i].Cells[].Value.ToString(), subSystems[][i].reyuanbiaoxian, getSubString(subSystems[][i].tishi, primary), true);
}
} y += ;
p1 = new Point((int)x1, (int)y);
p2 = new Point((int)x2, (int)y);
g.DrawLine(pen, p1, p2); y = ;
rect1 = new Rectangle((int)x1, (int)y, (int)(x2 - x1), (int)(font_10b.GetHeight(g)));
g.DrawString(convertToTradition("第 1 页", ifConvert), font_8r, myBrush, rect1, stringFormat); #endregion
return true;
case : //第2页 #region 运动系统
printHeader(g);
y = topMargin + ;
printSysHeader(g, "", "运动系统", (int)y, true); if (pictureBox1.Image != null && pictureBox2.Image != null)
{
// 插值算法的质量
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
y += ; g.DrawImage(pictureBox3.Image, new Rectangle((int)x1 + , (int)y, , ), new Rectangle(, , pictureBox3.Image.Width, pictureBox3.Image.Height), GraphicsUnit.Pixel);
y += ;
rect1 = new Rectangle((int)x1 + , (int)y - , , (int)( * font_7r.GetHeight(g))); //画矩形框
Pen rect_temperature = (Pen)Pens.LightGray.Clone();
rect_temperature.Width = ;
g.DrawRectangle(rect_temperature, rect1); rect1 = new Rectangle((int)x1 + , (int)y - , , (int)( * font_7r.GetHeight(g)));
g.DrawString(convertToTradition(lab_temperature3.Text, ifConvert), font_7r, myBrush, rect1, stringFormat_left);
y += ;
rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_8r.GetHeight(g)));
if (primary)
{
g.DrawString(convertToTradition("● " + cmb7.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
else
{
g.DrawString(convertToTradition("● " + E_cmb7.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
y += ;
rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_8r.GetHeight(g)));
if (primary)
{
g.DrawString(convertToTradition("● " + cmb8.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
else
{
g.DrawString(convertToTradition("● " + E_cmb8.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
y += ;
rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_8r.GetHeight(g)));
if (primary)
{
g.DrawString(convertToTradition("● " + cmb9.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
else
{
g.DrawString(convertToTradition("● " + E_cmb9.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
} y += ;
p1 = new Point(x1 + , y);
p2 = new Point(x2, y);
g.DrawLine(pen, p1, p2); y += ;
g.DrawImage(pictureBox4.Image, new Rectangle((int)x1 + , (int)y, , ), new Rectangle(, , pictureBox4.Image.Width, pictureBox4.Image.Height), GraphicsUnit.Pixel);
y += ;
rect1 = new Rectangle((int)x1 + , (int)y - , , (int)( * font_7r.GetHeight(g))); //画矩形框
rect_temperature = (Pen)Pens.LightGray.Clone();
rect_temperature.Width = ;
g.DrawRectangle(rect_temperature, rect1); rect1 = new Rectangle((int)x1 + , (int)y - , , (int)( * font_7r.GetHeight(g)));
g.DrawString(convertToTradition(lab_temperature4.Text, ifConvert), font_7r, myBrush, rect1, stringFormat_left);
y += ;
rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_8r.GetHeight(g)));
if (primary)
{
g.DrawString(convertToTradition("● " + cmb10.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
else
{
g.DrawString(convertToTradition("● " + E_cmb10.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
y += ;
rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_8r.GetHeight(g)));
if (primary)
{
g.DrawString(convertToTradition("● " + cmb11.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
else
{
g.DrawString(convertToTradition("● " + E_cmb11.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
y += ;
rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_8r.GetHeight(g)));
if (primary)
{
g.DrawString(convertToTradition("● " + cmb12.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
else
{
g.DrawString(convertToTradition("● " + E_cmb12.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
}
else
{
y += ;
rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_7r.GetHeight(g)));
g.DrawString(convertToTradition(lab_temperature3.Text, ifConvert), font_7r, myBrush, rect1, stringFormat_left);
y += ;
rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_8r.GetHeight(g)));
if (primary)
{
g.DrawString(convertToTradition("● " + cmb7.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
else
{
g.DrawString(convertToTradition("● " + E_cmb7.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
y += ;
rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_8r.GetHeight(g)));
if (primary)
{
g.DrawString(convertToTradition("● " + cmb8.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
else
{
g.DrawString(convertToTradition("● " + E_cmb8.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
y += ;
rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_8r.GetHeight(g)));
if (primary)
{
g.DrawString(convertToTradition("● " + cmb9.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
else
{
g.DrawString(convertToTradition("● " + E_cmb9.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
} y += ;
p1 = new Point(x1 + , y);
p2 = new Point(x2, y);
g.DrawLine(pen, p1, p2); y += ; y += ;
rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_7r.GetHeight(g)));
g.DrawString(convertToTradition(lab_temperature4.Text, ifConvert), font_7r, myBrush, rect1, stringFormat_left);
y += ;
rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_8r.GetHeight(g)));
if (primary)
{
g.DrawString(convertToTradition("● " + cmb10.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
else
{
g.DrawString(convertToTradition("● " + E_cmb10.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
y += ;
rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_8r.GetHeight(g)));
if (primary)
{
g.DrawString(convertToTradition("● " + cmb11.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
else
{
g.DrawString(convertToTradition("● " + E_cmb11.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
y += ;
rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_8r.GetHeight(g)));
if (primary)
{
g.DrawString(convertToTradition("● " + cmb12.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
else
{
g.DrawString(convertToTradition("● " + E_cmb12.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
} }
y -= ;
y += ;
if (primary)
{
for (int i = ; i < GridView_yundong.Rows.Count; i++)
{
y += ;
printLine(g, (int)y, "5." + (i + ), GridView_yundong.Rows[i].Cells[].Value.ToString(), subSystems[][i].reyuanbiaoxian, getSubString(subSystems[][i].tishi, primary), true);
}
}
else
{
for (int i = ; i < E_GridView_yundong.Rows.Count; i++)
{
y += ;
printLine(g, (int)y, "5." + (i + ), E_GridView_yundong.Rows[i].Cells[].Value.ToString(), subSystems[][i].reyuanbiaoxian, getSubString(subSystems[][i].tishi, primary), true);
}
}
y += ;
printSysHeader(g, "", "生殖、泌尿", (int)y, true);
y += ;
if (primary)
{
for (int i = ; i < GridView_miniao.Rows.Count; i++)
{
y += ;
printLine(g, (int)y, "6." + (i + ), GridView_miniao.Rows[i].Cells[].Value.ToString(), subSystems[][i].reyuanbiaoxian, getSubString(subSystems[][i].tishi, primary), true);
}
}
else
{
for (int i = ; i < E_GridView_miniao.Rows.Count; i++)
{
y += ;
printLine(g, (int)y, "6." + (i + ), E_GridView_miniao.Rows[i].Cells[].Value.ToString(), subSystems[][i].reyuanbiaoxian, getSubString(subSystems[][i].tishi, primary), true);
}
} y += ;
printSysHeader(g, "", "其他", (int)y, true);
y += ;
if (primary)
{
for (int i = ; i < GridView_qita.Rows.Count; i++)
{
y += ;
printLine(g, (int)y, "7." + (i + ), GridView_qita.Rows[i].Cells[].Value.ToString(), subSystems[][i].reyuanbiaoxian, getSubString(subSystems[][i].tishi, primary), true);
}
}
else
{
for (int i = ; i < E_GridView_qita.Rows.Count; i++)
{
y += ;
printLine(g, (int)y, "7." + (i + ), E_GridView_qita.Rows[i].Cells[].Value.ToString(), subSystems[][i].reyuanbiaoxian, getSubString(subSystems[][i].tishi, primary), true);
}
} if (!checkBox_linchuang.Checked)
{
y += ;
g.FillRectangle(printBg, x1, y, x1 + , (int)(font_10b.GetHeight(g) + ));
y += ; rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_10b.GetHeight(g) + ));
g.DrawString("", font_10b, myBrush, rect1, stringFormat_left); rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_10b.GetHeight(g) + ));
g.DrawString(convertToTradition("中医辨证", ifConvert), font_10b, myBrush, rect1, stringFormat_left); y += ; if (primary)
{
ifPrintNum = zhongyibianzheng2_comboBox.Text != ""; if (zhongyibianzheng1_comboBox.Text != "")
{
rect1 = new Rectangle(x1 + , y, printWidth - sideMargin * , (int)(font_10b.GetHeight(g)));
g.DrawString((ifPrintNum ? "1. " : " ") + convertToTradition(zhongyibianzheng1_comboBox.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left); }
y += ;
if (zhongyibianzheng2_comboBox.Text != "")
{
rect1 = new Rectangle(x1 + , y, printWidth - sideMargin * , (int)(font_10b.GetHeight(g)));
g.DrawString((ifPrintNum ? "2. " : " ") + convertToTradition(zhongyibianzheng2_comboBox.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
}
else
{
ifPrintNum = E_zhongyibianzheng2_comboBox.Text != ""; if (E_zhongyibianzheng1_comboBox.Text != "")
{
rect1 = new Rectangle(x1 + , y, printWidth - sideMargin * , (int)(font_10b.GetHeight(g)));
g.DrawString((ifPrintNum ? "1. " : " ") + convertToTradition(E_zhongyibianzheng1_comboBox.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left); }
y += ;
if (E_zhongyibianzheng2_comboBox.Text != "")
{
rect1 = new Rectangle(x1 + , y, printWidth - sideMargin * , (int)(font_10b.GetHeight(g)));
g.DrawString((ifPrintNum ? "2. " : " ") + convertToTradition(E_zhongyibianzheng2_comboBox.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left); }
} y += ; g.FillRectangle(printBg, x1, y, x1 + , (int)(font_10b.GetHeight(g) + )); y += ; rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_10b.GetHeight(g) + ));
g.DrawString("", font_10b, myBrush, rect1, stringFormat_left); rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_10b.GetHeight(g) + ));
g.DrawString(convertToTradition("中医体质 / 亚健康证型", ifConvert), font_10b, myBrush, rect1, stringFormat_left); y += ; if (primary)
{
ifPrintNum2 = zhengxing2_comboBox.Text != ""; if (zhengxing1_comboBox.Text != "")
{
rect1 = new Rectangle(x1 + , y, printWidth - sideMargin * , (int)(font_10b.GetHeight(g)));
g.DrawString((ifPrintNum2 ? "1. " : " ") + convertToTradition(zhengxing1_comboBox.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left); }
y += ; if (zhengxing2_comboBox.Text != "")
{
rect1 = new Rectangle(x1 + , y, printWidth - sideMargin * , (int)(font_10b.GetHeight(g)));
g.DrawString((ifPrintNum2 ? "2. " : " ") + convertToTradition(zhengxing2_comboBox.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
}
else
{
ifPrintNum2 = zhengxing2_comboBox.Text != ""; if (E_zhengxing1_comboBox.Text != "")
{
rect1 = new Rectangle(x1 + , y, printWidth - sideMargin * , (int)(font_10b.GetHeight(g)));
g.DrawString((ifPrintNum2 ? "1. " : " ") + convertToTradition(E_zhengxing1_comboBox.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
}
y += ;
if (E_zhengxing2_comboBox.Text != "")
{
rect1 = new Rectangle(x1 + , y, printWidth - sideMargin * , (int)(font_10b.GetHeight(g)));
g.DrawString((ifPrintNum ? "2. " : " ") + convertToTradition(E_zhengxing2_comboBox.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left); } }
if (sex == "M")
{
y += ; p1 = new Point((int)x1, (int)y);
p2 = new Point((int)x2, (int)y);
g.DrawLine(pen, p1, p2);
}
else
{
y += ; p1 = new Point((int)x1, (int)y);
p2 = new Point((int)x2, (int)y);
g.DrawLine(pen, p1, p2);
}
}
y = ;
rect1 = new Rectangle((int)x1, (int)y, (int)(x2 - x1), (int)(font_10b.GetHeight(g)));
g.DrawString(convertToTradition("第 2 页", ifConvert), font_8r, myBrush, rect1, stringFormat); #endregion
return true;
case ://第3页
#region 总评建议
printHeader(g);
y = topMargin + ;
g.FillRectangle(printBg, x1, y, (int)(x2 - x1), (int)(font_10b.GetHeight(g) + ));
y += ; rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_10b.GetHeight(g) + ));
g.DrawString(convertToTradition("总评建议", ifConvert), font_10b, myBrush, rect1, stringFormat_left); y += ; rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_10b.GetHeight(g) + ));
g.DrawString(convertToTradition("主要问题:", ifConvert), font_9b, myBrush, rect1, stringFormat_left); y += ;
if (primary)
{
ifPrintNum = zhuyaowenti2_comboBox.Text != "";
if (zhuyaowenti1_comboBox.Text != "")
{
rect1 = new Rectangle(x1 + , y, (printWidth - sideMargin * ) / - , (int)(font_10b.GetHeight(g)));
g.DrawString((ifPrintNum ? "1. " : " ") + convertToTradition(zhuyaowenti1_comboBox.Text, ifConvert), font_8r1, myBrush, rect1, stringFormat_left);
}
y += ;
if (zhuyaowenti2_comboBox.Text != "")
{
rect1 = new Rectangle(x1 + , y, (printWidth - sideMargin * ) / - , (int)(font_10b.GetHeight(g)));
g.DrawString((ifPrintNum ? "2. " : " ") + convertToTradition(zhuyaowenti2_comboBox.Text, ifConvert), font_8r1, myBrush, rect1, stringFormat_left);
}
y += ;
if (zhuyaowenti3_comboBox.Text != "")
{
rect1 = new Rectangle(x1 + , y, (printWidth - sideMargin * ) / - , (int)(font_10b.GetHeight(g)));
g.DrawString((ifPrintNum ? "3. " : " ") + convertToTradition(zhuyaowenti3_comboBox.Text, ifConvert), font_8r1, myBrush, rect1, stringFormat_left);
}
}
else
{
ifPrintNum = E_zhuyaowenti2_comboBox.Text != "";
if (E_zhuyaowenti1_comboBox.Text != "")
{
rect1 = new Rectangle(x1 + , y, (printWidth - sideMargin * ) / - , (int)(font_10b.GetHeight(g)));
g.DrawString((ifPrintNum ? "1. " : " ") + convertToTradition(E_zhuyaowenti1_comboBox.Text, ifConvert), font_8r1, myBrush, rect1, stringFormat_left);
}
y += ;
if (E_zhuyaowenti2_comboBox.Text != "")
{
rect1 = new Rectangle(x1 + , y, (printWidth - sideMargin * ) / - , (int)(font_10b.GetHeight(g)));
g.DrawString((ifPrintNum ? "2. " : " ") + convertToTradition(E_zhuyaowenti2_comboBox.Text, ifConvert), font_8r1, myBrush, rect1, stringFormat_left);
}
y += ;
if (E_zhuyaowenti3_comboBox.Text != "")
{
rect1 = new Rectangle(x1 + , y, (printWidth - sideMargin * ) / - , (int)(font_10b.GetHeight(g)));
g.DrawString((ifPrintNum ? "3. " : " ") + convertToTradition(E_zhuyaowenti3_comboBox.Text, ifConvert), font_8r1, myBrush, rect1, stringFormat_left);
} }
y -= ; rect1 = new Rectangle((int)x1 + ((printWidth - sideMargin * ) / ), (int)y, (printWidth - sideMargin * ) / - , (int)(font_10b.GetHeight(g) + ));
g.DrawString(convertToTradition("需要关注:", ifConvert), font_9b, myBrush, rect1, stringFormat_left); y += ; if (primary)
{
ifPrintNum = textBox_xuyaoguanzhu2.Text != ""; if (textBox_xuyaoguanzhu1.Text != "")
{
rect1 = new Rectangle((int)x1 + ((printWidth - sideMargin * ) / ), (int)y, (printWidth - sideMargin * ) / - , (int)(font_10b.GetHeight(g)));
g.DrawString(convertToTradition("— " + textBox_xuyaoguanzhu1.Text, ifConvert), font_8r1, myBrush, rect1, stringFormat_left);
}
y += ;
if (textBox_xuyaoguanzhu2.Text != "")
{
rect1 = new Rectangle((int)x1 + ((printWidth - sideMargin * ) / ), (int)y, (printWidth - sideMargin * ) / - , (int)(font_10b.GetHeight(g)));
g.DrawString(convertToTradition("— " + textBox_xuyaoguanzhu2.Text, ifConvert), font_8r1, myBrush, rect1, stringFormat_left);
}
y += ;
if (textBox_xuyaoguanzhu3.Text != "")
{
rect1 = new Rectangle((int)x1 + ((printWidth - sideMargin * ) / ), (int)y, (printWidth - sideMargin * ) / - , (int)(font_10b.GetHeight(g)));
g.DrawString(convertToTradition("— " + textBox_xuyaoguanzhu3.Text, ifConvert), font_8r1, myBrush, rect1, stringFormat_left);
}
}
else
{ ifPrintNum = E_textBox_xuyaoguanzhu2.Text != ""; if (E_textBox_xuyaoguanzhu1.Text != "")
{
rect1 = new Rectangle((int)x1 + ((printWidth - sideMargin * ) / ), (int)y, (printWidth - sideMargin * ) / - , (int)(font_10b.GetHeight(g)));
g.DrawString(convertToTradition(E_textBox_xuyaoguanzhu1.Text, ifConvert), font_8r1, myBrush, rect1, stringFormat_left);
}
y += ;
if (E_textBox_xuyaoguanzhu2.Text != "")
{
rect1 = new Rectangle((int)x1 + ((printWidth - sideMargin * ) / ), (int)y, (printWidth - sideMargin * ) / - , (int)(font_10b.GetHeight(g)));
g.DrawString(convertToTradition(E_textBox_xuyaoguanzhu2.Text, ifConvert), font_8r1, myBrush, rect1, stringFormat_left);
}
y += ;
if (E_textBox_xuyaoguanzhu3.Text != "")
{
rect1 = new Rectangle((int)x1 + ((printWidth - sideMargin * ) / ), (int)y, (printWidth - sideMargin * ) / - , (int)(font_10b.GetHeight(g)));
g.DrawString(convertToTradition(E_textBox_xuyaoguanzhu3.Text, ifConvert), font_8r1, myBrush, rect1, stringFormat_left);
} } y += ;
p1 = new Point((int)x1, (int)y + );
p2 = new Point((int)x2, (int)y + );
g.DrawLine(Pens.LightGray, p1, p2); y += ; if (!checkBox_linchuang.Checked)
{
rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_10b.GetHeight(g) + ));
g.DrawString(convertToTradition("检查建议:", ifConvert), font_9b, myBrush, rect1, stringFormat_left); if (primary)
{
y += ; ifPrintNum = textBox_jianchajianyi2.Text != "";
if (textBox_jianchajianyi1.Text != "")
{
rect1 = new Rectangle(x1 + , y, printWidth - sideMargin * , (int)(font_10b.GetHeight(g)));
g.DrawString((ifPrintNum ? "1. " : " ") + convertToTradition(textBox_jianchajianyi1.Text, ifConvert), font_8r1, myBrush, rect1, stringFormat_left);
}
y += ;
if (textBox_jianchajianyi2.Text != "")
{
rect1 = new Rectangle(x1 + , y, printWidth - sideMargin * , (int)(font_10b.GetHeight(g)));
g.DrawString((ifPrintNum ? "2. " : " ") + convertToTradition(textBox_jianchajianyi2.Text, ifConvert), font_8r1, myBrush, rect1, stringFormat_left);
}
y += ;
if (textBox_jianchajianyi3.Text != "")
{
rect1 = new Rectangle(x1 + , y, printWidth - sideMargin * , (int)(font_10b.GetHeight(g)));
g.DrawString((ifPrintNum ? "3. " : " ") + convertToTradition(textBox_jianchajianyi3.Text, ifConvert), font_8r1, myBrush, rect1, stringFormat_left);
}
}
else
{
y += ; ifPrintNum = E_textBox_jianchajianyi2.Text != "";
if (E_textBox_jianchajianyi1.Text != "")
{
rect1 = new Rectangle(x1 + , y, printWidth - sideMargin * , (int)(font_10b.GetHeight(g)));
g.DrawString((ifPrintNum ? "1. " : " ") + convertToTradition(E_textBox_jianchajianyi1.Text, ifConvert), font_8r1, myBrush, rect1, stringFormat_left);
}
y += ;
if (E_textBox_jianchajianyi2.Text != "")
{
rect1 = new Rectangle(x1 + , y, printWidth - sideMargin * , (int)(font_10b.GetHeight(g)));
g.DrawString((ifPrintNum ? "2. " : " ") + convertToTradition(E_textBox_jianchajianyi2.Text, ifConvert), font_8r1, myBrush, rect1, stringFormat_left);
}
y += ;
if (E_textBox_jianchajianyi3.Text != "")
{
rect1 = new Rectangle(x1 + , y, printWidth - sideMargin * , (int)(font_10b.GetHeight(g)));
g.DrawString((ifPrintNum ? "3. " : " ") + convertToTradition(E_textBox_jianchajianyi3.Text, ifConvert), font_8r1, myBrush, rect1, stringFormat_left);
} } y += ;
p1 = new Point((int)x1, (int)y + );
p2 = new Point((int)x2, (int)y + );
g.DrawLine(Pens.LightGray, p1, p2); y += ; rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_10b.GetHeight(g) + ));
g.DrawString(convertToTradition("保健建议:", ifConvert), font_9b, myBrush, rect1, stringFormat_left); if (primary)
{
y += ;
ifPrintNum = textBox_baojianjianyi2.Text != "";
if (textBox_baojianjianyi1.Text != "")
{
rect1 = new Rectangle(x1 + , y, printWidth - sideMargin * - , * (int)(font_10b.GetHeight(g)));
g.DrawString((ifPrintNum ? "1. " : " "), font_8r1, myBrush, rect1, stringFormat_left);
rect1 = new Rectangle(x1 + , y, printWidth - sideMargin * - , * (int)(font_10b.GetHeight(g)));
g.DrawString(convertToTradition(textBox_baojianjianyi1.Text, ifConvert), font_8r1, myBrush, rect1, stringFormat_left);
}
y += ;
if (textBox_baojianjianyi2.Text != "")
{
rect1 = new Rectangle(x1 + , y, printWidth - sideMargin * - , * (int)(font_10b.GetHeight(g)));
//g.DrawString((ifPrintNum ? "2. " : " ") + convertToTradition(textBox_baojianjianyi2.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
g.DrawString((ifPrintNum ? "2. " : " "), font_8r1, myBrush, rect1, stringFormat_left);
rect1 = new Rectangle(x1 + , y, printWidth - sideMargin * - , * (int)(font_10b.GetHeight(g)));
g.DrawString(convertToTradition(textBox_baojianjianyi2.Text, ifConvert), font_8r1, myBrush, rect1, stringFormat_left); }
y += ;
if (textBox_baojianjianyi3.Text != "")
{
rect1 = new Rectangle(x1 + , y, printWidth - sideMargin * - , * (int)(font_10b.GetHeight(g)));
//g.DrawString((ifPrintNum ? "3. " : " ") + convertToTradition(textBox_baojianjianyi3.Text, ifConvert), font_8r, myBrush, rect1, stringFormat_left);
g.DrawString((ifPrintNum ? "3. " : " "), font_8r1, myBrush, rect1, stringFormat_left);
rect1 = new Rectangle(x1 + , y, printWidth - sideMargin * - , * (int)(font_10b.GetHeight(g)));
g.DrawString(convertToTradition(textBox_baojianjianyi3.Text, ifConvert), font_8r1, myBrush, rect1, stringFormat_left);
}
}
else
{
y += ;
ifPrintNum = E_textBox_baojianjianyi2.Text != "";
if (E_textBox_baojianjianyi1.Text != "")
{
rect1 = new Rectangle(x1 + , y, printWidth - sideMargin * - , * (int)(font_10b.GetHeight(g)));
g.DrawString((ifPrintNum ? "1. " : " ") + convertToTradition(E_textBox_baojianjianyi1.Text, ifConvert), font_8r1, myBrush, rect1, stringFormat_left);
}
y += ;
if (textBox_baojianjianyi2.Text != "")
{
rect1 = new Rectangle(x1 + , y, printWidth - sideMargin * - , * (int)(font_10b.GetHeight(g)));
g.DrawString((ifPrintNum ? "2. " : " ") + convertToTradition(E_textBox_baojianjianyi2.Text, ifConvert), font_8r1, myBrush, rect1, stringFormat_left);
}
y += ;
if (E_textBox_baojianjianyi3.Text != "")
{
rect1 = new Rectangle(x1 + , y, printWidth - sideMargin * - , * (int)(font_10b.GetHeight(g)));
g.DrawString((ifPrintNum ? "3. " : " ") + convertToTradition(E_textBox_baojianjianyi3.Text, ifConvert), font_8r1, myBrush, rect1, stringFormat_left);
} } y += ;
p1 = new Point((int)x1, (int)y + );
p2 = new Point((int)x2, (int)y + );
g.DrawLine(Pens.LightGray, p1, p2); y += ; if (primary)
{
if (fujian1_comboBox.Text != "" || fujian2_comboBox.Text != "" || fujian3_comboBox.Text != "")
{
rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_10b.GetHeight(g) + ));
g.DrawString(convertToTradition("参考文献:", ifConvert), font_9b, myBrush, rect1, stringFormat_left);
ifPrintNum = fujian2_comboBox.Text != "";
y += ;
if (fujian1_comboBox.Text != "")
{
rect1 = new Rectangle(x1 + , y, printWidth - sideMargin * , (int)(font_10b.GetHeight(g)));
g.DrawString((ifPrintNum ? "1. " : " ") + convertToTradition(fujian1_comboBox.Text, ifConvert), font_8r1, myBrush, rect1, stringFormat_left);
}
y += ;
if (fujian2_comboBox.Text != "")
{
rect1 = new Rectangle(x1 + , y, printWidth - sideMargin * , (int)(font_10b.GetHeight(g)));
g.DrawString((ifPrintNum ? "2. " : " ") + convertToTradition(fujian2_comboBox.Text, ifConvert), font_8r1, myBrush, rect1, stringFormat_left);
}
y += ;
if (fujian3_comboBox.Text != "")
{
rect1 = new Rectangle(x1 + , y, printWidth - sideMargin * , (int)(font_10b.GetHeight(g)));
g.DrawString((ifPrintNum ? "3. " : " ") + convertToTradition(fujian3_comboBox.Text, ifConvert), font_8r1, myBrush, rect1, stringFormat_left);
}
y += ;
p1 = new Point((int)x1, (int)y + );
p2 = new Point((int)x2, (int)y + );
g.DrawLine(Pens.LightGray, p1, p2);
}
else
{
y += ;
y += ;
y += ;
}
}
else
{
if (E_fujian1_comboBox.Text != "" || E_fujian2_comboBox.Text != "" || E_fujian3_comboBox.Text != "")
{
rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_10b.GetHeight(g) + ));
g.DrawString(convertToTradition("参考文献:", ifConvert), font_9b, myBrush, rect1, stringFormat_left);
ifPrintNum = E_fujian2_comboBox.Text != "";
y += ;
if (E_fujian1_comboBox.Text != "")
{
rect1 = new Rectangle(x1 + , y, printWidth - sideMargin * , (int)(font_10b.GetHeight(g)));
g.DrawString((ifPrintNum ? "1. " : " ") + convertToTradition(E_fujian1_comboBox.Text, ifConvert), font_8r1, myBrush, rect1, stringFormat_left);
}
y += ;
if (E_fujian2_comboBox.Text != "")
{
rect1 = new Rectangle(x1 + , y, printWidth - sideMargin * , (int)(font_10b.GetHeight(g)));
g.DrawString((ifPrintNum ? "2. " : " ") + convertToTradition(E_fujian2_comboBox.Text, ifConvert), font_8r1, myBrush, rect1, stringFormat_left);
}
y += ;
if (E_fujian3_comboBox.Text != "")
{
rect1 = new Rectangle(x1 + , y, printWidth - sideMargin * , (int)(font_10b.GetHeight(g)));
g.DrawString((ifPrintNum ? "3. " : " ") + convertToTradition(E_fujian3_comboBox.Text, ifConvert), font_8r1, myBrush, rect1, stringFormat_left);
}
y += ;
p1 = new Point((int)x1, (int)y + );
p2 = new Point((int)x2, (int)y + );
g.DrawLine(Pens.LightGray, p1, p2);
}
else
{
y += ;
y += ;
y += ;
}
} }
else
{
y += ;
} y += ; g.InterpolationMode = InterpolationMode.HighQualityBicubic; rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_10b.GetHeight(g) + ));
g.DrawString(convertToTradition("评估师:", ifConvert), font_10r, myBrush, rect1, stringFormat_left);
rect1 = new Rectangle((int)x1 + , (int)y - signature.Height * / signature.Width / , , signature.Height * / signature.Width);
g.DrawImage(signature, rect1, new Rectangle(, , signature.Width, signature.Height), GraphicsUnit.Pixel);
//g.DrawString(pinggushi_textBox.Text, font_10r, myBrush, rect1, stringFormat_left);
rect1 = new Rectangle((int)x1 + , (int)y, , (int)(font_9r.GetHeight(g) + ));
g.DrawString(dateTimePicker_inside.Value.ToShortDateString(), font_9r, myBrush, rect1, stringFormat_left); y += ;
p1 = new Point((int)x1, (int)y + );
p2 = new Point((int)x2, (int)y + );
g.DrawLine(pen, p1, p2); y += ;
rect1 = new Rectangle(x1 + , y, printWidth - sideMargin * - , * (int)(font_22r.GetHeight(g)));
//g.DrawString(convertToTradition(" TMI 人体热代谢层像技术,以其安全、敏感、全面的独特优势,在细胞热代谢功能水平上对人体健康状态进行动态监测;包括较早期地发现无主诉或临床检测尚未发现的病灶、重大疾病隐患以及亚健康状态的评估分析。本报告不作为临床诊断结果。", ifConvert), font_7r, myBrush, rect1, stringFormat_left);
//
g.DrawString(convertToTradition(" TMI 人体代谢热层像技术,以其安全、敏感、全面的独特优势,在细胞热代谢功能水平上以中西医结合的方式,对人体健康状态", ifConvert), font_7r1, myBrush, rect1, stringFormat_left); y += ;
rect1 = new Rectangle(x1 + , y, printWidth - sideMargin * - , * (int)(font_22r.GetHeight(g)));
g.DrawString(convertToTradition("进行整体性动态检测;可较早发现一些无主诉或临床检查未发现的病灶以及部分重大疾病隐患,包括对亚健康状态的评估分析。", ifConvert), font_7r1, myBrush, rect1, stringFormat_left); y += ; rect1 = new Rectangle(x1 + , y, printWidth - sideMargin * - , * (int)(font_22r.GetHeight(g)));
g.DrawString(convertToTradition(" TMI 作为新一代医学功能影像技术,是对医疗机构与体检中心等临床常规检查的一种极佳补充;但其报告不作为临床诊断结果。", ifConvert), font_7r1, myBrush, rect1, stringFormat_left);
y += ; rect1 = new Rectangle(x1 + , y, printWidth - sideMargin * - , * (int)(font_22r.GetHeight(g)));
g.DrawString(convertToTradition("如本报告分析结果与临床检查结果有所不符,则视具体情况着重参考临床检查结果。本报告对评估项所见问题程度的分级表达:", ifConvert), font_7r1, myBrush, rect1, stringFormat_left);
y += ; //rect1 = new Rectangle(520, y+1, (printWidth - sideMargin * 2), 4 * (int)(font_9r.GetHeight(g)));
//g.DrawString(convertToTradition(" 如需咨询与服务,请登录:", ifConvert), font_7r1, myBrush, rect1, stringFormat_left); pb_code.Visible = true;
Bitmap bp = new Bitmap(, );
rect1 = new Rectangle(, , bp.Width, bp.Height);
pb_code.DrawToBitmap(bp, rect1);
g.DrawImage(bp, , y + , bp.Width, bp.Height);
pb_code.Visible = false; g.DrawImage(Properties.Resources.RED, x1 + , y, , ); rect1 = new Rectangle(x1 + , y + , , (int)(font_8r.GetHeight(g) + ));
g.DrawString(convertToTradition("异常:", ifConvert), font_7b, myBrush, rect1, stringFormat_left);
rect1 = new Rectangle(x1 + , y + , printWidth - sideMargin * - , (int)(font_7r1.GetHeight(g) + ));
g.DrawString(convertToTradition(" 其图像特征很明显、高度疑似评估提示所指病症,相应的临床检查结果多呈阳性;", ifConvert), font_7r01, myBrush, rect1, stringFormat_left); y += ; g.DrawImage(Properties.Resources.Orange, x1 + , y, , ); rect1 = new Rectangle(x1 + , y + , , (int)(font_7r.GetHeight(g) + ));
g.DrawString(convertToTradition("临界:", ifConvert), font_7b, myBrush, rect1, stringFormat_left);
rect1 = new Rectangle(x1 + , y + , printWidth - sideMargin * - , * (int)(font_7r1.GetHeight(g)));
g.DrawString(convertToTradition(" 其图像特征较明显、处于疾病的临界状态,相应的临床检查结果可能阳性或阴性;", ifConvert), font_7r01, myBrush, rect1, stringFormat_left); y += ; g.DrawImage(Properties.Resources.YELLOW, x1 + , y, , ); rect1 = new Rectangle(x1 + , y + , , (int)(font_7r.GetHeight(g) + ));
g.DrawString(convertToTradition("隐患:", ifConvert), font_7b, myBrush, rect1, stringFormat_left);
rect1 = new Rectangle(x1 + , y + , printWidth - sideMargin * - , * (int)(font_7r1.GetHeight(g)));
g.DrawString(convertToTradition(" 其图像特征不明显、但有功能性改变的早期征象,相应的临床检查结果多为阴性;", ifConvert), font_7r01, myBrush, rect1, stringFormat_left); y += ; g.DrawImage(Properties.Resources.GREEN, x1 + , y, , ); rect1 = new Rectangle(x1 + , y + , , (int)(font_7b.GetHeight(g) + ));
g.DrawString(convertToTradition("未见异常:", ifConvert), font_7b, myBrush, rect1, stringFormat_left);
rect1 = new Rectangle(x1 + , y + , printWidth - sideMargin * - , * (int)(font_7r.GetHeight(g)));
g.DrawString(convertToTradition(" 其图像未见明显特征表现,但或许是一过性假象,故不等于正常或没有问题。", ifConvert), font_7r01, myBrush, rect1, stringFormat_left); y += ; //
p1 = new Point((int)x1, (int)y);
p2 = new Point((int)x2, (int)y);
g.DrawLine(pen, p1, p2);
y += ;
p1 = new Point((int)x1, (int)y);
p2 = new Point((int)x2, (int)y);
g.DrawLine(pen, p1, p2); y = ;
rect1 = new Rectangle((int)x1, (int)y, (int)(x2 - x1), (int)(font_10b.GetHeight(g)));
g.DrawString(convertToTradition("第 3 页", ifConvert), font_8r, myBrush, rect1, stringFormat);
#endregion
return false;
}
return false;
}
c# 画一个报告的更多相关文章
-
Effective前端3:用CSS画一个三角形
p { text-indent: 2em } .triangle-container p { text-indent: 0 } img { margin: 15px 0 } 三角形的场景很常见,打开一 ...
-
canvas游戏小试:画一个按方向键移动的圆点
canvas游戏小试:画一个按方向键移动的圆点 自己对canvas,但又有一颗做游戏的心TT.然后记录一下对canvas的学习吧,用一个按方向键控制的小圆点来做练习.(编程时用了一些es6的语法) ...
-
PostScript的简单例子-用粗线画一个圆
一 近期需要用到PostScript,查询资料学习PS的语法 简单的画一个圆的例子 %!PS-Adobe-3.0 /inch{72 mul} def 4.25 inch 5.5 inch 1.5 in ...
-
自己画一个ActivityIndicatorView-b
苹果的UI控件中有一个UIActivityIndicatorView,俗称菊花.→_→现在我们仿照它来制作一个其它样式的指示器,如下: ActivityView.png 自定义指示器 首先画一个白色的 ...
-
Android画一个随意拖动的圆形
import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactor ...
-
用PS画一个齿轮
以前只会画圆画方,这没技术含量.今天学了一个稍难一点的,画一个齿轮.图形有圆也有方.以下描述如何画出来的. 一.打开PS准备一画布,画一矩形并且填充颜色. 二.编辑->*变换(CTRL+T), ...
-
深夜,用canvas画一个时钟
深夜,用canvas画一个时钟 查看demo 这几天准备阿里巴巴的笔试,可以说已经是心力交瘁,自从阿里和蘑菇街的内推被刷掉之后,开始越来越怀疑起自己的能力来,虽然这点打击应该是微不足道的.毕竟校招在刚 ...
-
Directx11学习笔记【十二】 画一个旋转的彩色立方体
上一次我们学习了如何画一个2D三角形,现在让我们进一步学习如何画一个旋转的彩色立方体吧. 具体流程同画三角形类似,因此不再给出完整代码了,不同的部分会再说明. 由于我们要画彩色的立方体,所以顶点结构体 ...
-
Directx11学习笔记【十一】 画一个简单的三角形--effect框架的使用
这里不再介绍effect框架的具体使用,有关effect框架使用可参考http://www.cnblogs.com/zhangbaochong/p/5475961.html 实现的功能依然是画一个简单 ...
随机推荐
-
Linux tar文件打包
tar格式,会打包成一个文件,可以对多个目录,或者多个文件进行打包 tar命令只是打包,不会压缩,打包前后大小是一样的 tar命令 -c //打包 -x //解压 -f //指定文件 ...
-
css响应有media,js响应有这种
比如,我不想在移动端执行某js特效可以参考(function(doc, win) { var screenWidth = 0, size = 'M', root = doc.documentEleme ...
-
OC第二节 —— NSString和NSMutableString
1.为什么需要NSString对象 答:在OC中创建字符串时,一般不使用C的方法, 因为C将字符串作为字符数组,所以在操作时会有很多不方便的地方, 在Cocoa中NSStri ...
-
Excel设置数据有效性实现单元格下拉菜单的3种方法(转)
http://blog.csdn.net/cdefu/article/details/4129136 一.直接输入: 1.选择要设置的单元格,譬如A1单元格: 2.选择菜单栏的“数据”→“有效性”→出 ...
-
2013 ACM区域赛长沙 H zoj 3733 (hdu 4798) Skycity
题意:一个圆台,底面和顶面半径分别为R,r,然后高度为H,一共F层,每层高度一样,然后要在每层的天花板上贴方格玻璃,方格玻璃要满足以下几个条件: 方格玻璃面积不能小于S,且方格玻璃要围成一个正多边形, ...
-
hdoj 2816 I Love You Too
I Love You Too Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)To ...
-
web.xml解析
常用元素及含义 <!-- standalone 定义了外部定义的 DTD 文件的存在性,有效值是 yes和 no --> <?xml version="1.0" ...
-
js,ajax,layer笔记(弹出层,在弹出一个弹框)
整体认识: 因为作用域的问题,js 在页面初次加载时已近加载好了,所以要有第二次弹窗的效果,必须得在第一次成功之后再次让他加载js 代码: /*shaun*/showdetailsPag: funct ...
-
[Usaco2005 Open]Disease Manangement 疾病管理 BZOJ1688
分析: 这个题的状压DP还是比较裸的,考虑将疾病状压,得到DP方程:F[S]为疾病状态为S时的最多奶牛数量,F[S]=max{f[s]+1}; 记得预处理出每个状态下疾病数是多少... 附上代码: # ...
-
Linux设备驱动开发详解
Linux设备驱动开发详解 http://download.csdn.net/detail/wuyouzi067/9581380