填充控件的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# 画一个报告的更多相关文章

  1. Effective前端3:用CSS画一个三角形

    p { text-indent: 2em } .triangle-container p { text-indent: 0 } img { margin: 15px 0 } 三角形的场景很常见,打开一 ...

  2. canvas游戏小试:画一个按方向键移动的圆点

    canvas游戏小试:画一个按方向键移动的圆点   自己对canvas,但又有一颗做游戏的心TT.然后记录一下对canvas的学习吧,用一个按方向键控制的小圆点来做练习.(编程时用了一些es6的语法) ...

  3. PostScript的简单例子-用粗线画一个圆

    一 近期需要用到PostScript,查询资料学习PS的语法 简单的画一个圆的例子 %!PS-Adobe-3.0 /inch{72 mul} def 4.25 inch 5.5 inch 1.5 in ...

  4. 自己画一个ActivityIndicatorView-b

    苹果的UI控件中有一个UIActivityIndicatorView,俗称菊花.→_→现在我们仿照它来制作一个其它样式的指示器,如下: ActivityView.png 自定义指示器 首先画一个白色的 ...

  5. Android画一个随意拖动的圆形

    import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactor ...

  6. 用PS画一个齿轮

    以前只会画圆画方,这没技术含量.今天学了一个稍难一点的,画一个齿轮.图形有圆也有方.以下描述如何画出来的. 一.打开PS准备一画布,画一矩形并且填充颜色. 二.编辑->自由变换(CTRL+T), ...

  7. 深夜,用canvas画一个时钟

    深夜,用canvas画一个时钟 查看demo 这几天准备阿里巴巴的笔试,可以说已经是心力交瘁,自从阿里和蘑菇街的内推被刷掉之后,开始越来越怀疑起自己的能力来,虽然这点打击应该是微不足道的.毕竟校招在刚 ...

  8. Directx11学习笔记【十二】 画一个旋转的彩色立方体

    上一次我们学习了如何画一个2D三角形,现在让我们进一步学习如何画一个旋转的彩色立方体吧. 具体流程同画三角形类似,因此不再给出完整代码了,不同的部分会再说明. 由于我们要画彩色的立方体,所以顶点结构体 ...

  9. Directx11学习笔记【十一】 画一个简单的三角形--effect框架的使用

    这里不再介绍effect框架的具体使用,有关effect框架使用可参考http://www.cnblogs.com/zhangbaochong/p/5475961.html 实现的功能依然是画一个简单 ...

随机推荐

  1. Redis 单机和多实例部署

    作者:北京运维 1. 安装环境说明 OS 版本:CentOS 7.5.1804 Redis 版本:redis-3.2.12 Redis 下载页面:http://download.redis.io/re ...

  2. tomcat 远程debug配置,教你远程调试代码,解决线上故障

      IDEA远程DEBUG Tomcat很简单,配置如下: 1.修改tomcat服务器配置 打开tomcat/bin/catalina.sh 在空白处添加如下参数 CATALINA_OPTS=&quo ...

  3. 17个C语言可以做的小案例项目

    C语言是我们大多数人的编程入门语言,对其也再熟悉不过了,不过很多初学者在学习的过程中难免会出现迷茫,比如:不知道C语言可以开发哪些项目,可以应用在哪些实际的开发中……,这些迷茫也导致了我们在学习的过程 ...

  4. 20155209林虹宇虚拟机的安装及一点Linux的学习

    预备作业3 虚拟机的安装 首先,我先了解了一下Linux和安装虚拟机的有关常识. Linux:Linux是一套免费使用和自由传播的类Unix操作系统,是一个基于POSIX和UNIX的多用户.多任务.支 ...

  5. 20155224聂小益的Linux学习

    20155224聂小益的虚拟机安装 虚拟机安装 一开始,我在下载VirtulBox及Ubuntu遇到了一些困难,老实说点进去看到一大堆英文界面的时候真的是有点吓到.不过几秒钟之后就发现这并没有什么哈哈 ...

  6. 20155310 2016-2017-2 《Java程序设计》第一周学习总结

    20155310 2016-2017-2 <Java程序设计>第一周学习总结 教材学习内容总结 通过对第一章第二章的学习我了解到了JVM.JRE与JDK的重要性,并且下载.安装并测试了JD ...

  7. 20155334 实验五 Java网络编程及安全

    20155334 实验五 Java网络编程及安全 实验内容 1.掌握Socket程序的编写: 2.掌握密码技术的使用: 3.设计安全传输系统. 实验步骤 实验1: 参考 结对实现中缀表达式转后缀表达式 ...

  8. 【转】odoo学习之:开发字段解析

    odoo新API中,字段类型不变,继承改变 1.旧的API定义模型: from openerp.osv import osv,fields class oldmodel(osv.osv): #模型名称 ...

  9. day 4 继承

    1.继承引入,减少代码量 1)版本1: class Animal: '''定义一个动物类''' def eat(self): print("----吃----") def drin ...

  10. 【LG3244】[HNOI2015]落忆枫音

    题面 洛谷 题解 20pts 枚举每一条边是否在树中即可. 另10pts 我们考虑一张\(DAG\)中构成树的方法数,每个点选一个父亲即可,那么有 \[Ans=\prod_{i=1}^{n} deg_ ...