public override float InitBody() { float height = 0; float heightunit = ((ThreeItemConstValue.MaxTemp - ThreeItemConstValue.MinTemp) / ThreeItemConstValue.TempuUnit) * ThreeItemConstValue.RowsPerTempUnit; //脉搏刻度 DrawingGridColumnCell rowPulse = new DrawingGridColumnCell(this); rowPulse.TopUnit = this.HeaderHeightUnit; rowPulse.WidthUnit = PulseDimWidthUnit; rowPulse.HeightUnit = heightunit; rowPulse.Border.TopBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowPulse.Border.BottomBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowPulse.Border.LeftBorderWidth = ThreeItemConstValue.OuterBorderWidth; Cells.Add(rowPulse); //温度刻度 DrawingGridColumnCell rowTempu = new DrawingGridColumnCell(this); rowTempu.TopUnit = this.HeaderHeightUnit; rowTempu.WidthUnit = TempuDimWidthUnit; rowTempu.LeftUnit = PulseDimWidthUnit; rowTempu.HeightUnit = heightunit; rowTempu.Border.TopBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowTempu.Border.BottomBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowTempu.Border.RightBorderWidth = ThreeItemConstValue.OuterBorderWidth; Cells.Add(rowTempu); height = rowTempu.HeightUnit; return(height); }
public override float InitHeader() { float height = 0; float fontScale = 0.55f; DrawingGridColumnCell rowDate = new DrawingGridColumnCell(this); rowDate.HeightUnit = ThreeItemConstValue.HeaderHeight_Date; rowDate.WidthUnit = WidthUnit; rowDate.Border.LeftBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowDate.Border.TopBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowDate.Border.RightBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowDate.TextProperty.Font = new Font(ThreeItemConstValue.DefaultFontFamilyName, rowDate.HeightUnit * this.SizePerUnit * fontScale); rowDate.TextProperty.Text = "日 期"; this.Cells.Add(rowDate); height += rowDate.HeightUnit; DrawingGridColumnCell rowIndays = new DrawingGridColumnCell(this); rowIndays.HeightUnit = ThreeItemConstValue.HeaderHeight_InDays; rowIndays.WidthUnit = WidthUnit; rowIndays.Border.LeftBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowIndays.Border.RightBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowIndays.TopUnit = Cells[Cells.Count - 1].HeightUnit + Cells[Cells.Count - 1].TopUnit; rowIndays.TextProperty.Font = new Font(ThreeItemConstValue.DefaultFontFamilyName, rowIndays.HeightUnit * this.SizePerUnit * fontScale); rowIndays.TextProperty.Text = "住院日数"; Cells.Add(rowIndays); height += rowIndays.HeightUnit; DrawingGridColumnCell rowDaysAfOp = new DrawingGridColumnCell(this); rowDaysAfOp.HeightUnit = ThreeItemConstValue.Height_DaysAfOperation; rowDaysAfOp.WidthUnit = WidthUnit; rowDaysAfOp.Border.LeftBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowDaysAfOp.Border.RightBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowDaysAfOp.TopUnit = Cells[Cells.Count - 1].HeightUnit + Cells[Cells.Count - 1].TopUnit; rowDaysAfOp.TextProperty.Font = new Font(ThreeItemConstValue.DefaultFontFamilyName, rowDaysAfOp.HeightUnit * this.SizePerUnit * fontScale); rowDaysAfOp.TextProperty.Text = " 手术或产后日数"; Cells.Add(rowDaysAfOp); height += rowDaysAfOp.HeightUnit; DrawingGridColumnCell rowTime = new DrawingGridColumnCell(this); rowTime.HeightUnit = ThreeItemConstValue.HeaderHeight_Time; rowTime.WidthUnit = WidthUnit; rowTime.Border.LeftBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowTime.Border.RightBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowTime.Border.BottomBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowTime.TopUnit = Cells[Cells.Count - 1].HeightUnit + Cells[Cells.Count - 1].TopUnit; rowTime.TextProperty.Font = new Font(ThreeItemConstValue.DefaultFontFamilyName, rowDate.HeightUnit * this.SizePerUnit * fontScale); // new Font(TreeItemConstValue.DefaultFontFamilyName, rowTime.HeightUnit * this.SizePerUnit * fontScale); rowTime.TextProperty.Text = "时 间"; Cells.Add(rowTime); height += rowTime.HeightUnit; return(height); }
public override float InitFooter(string registerId, int pageIndex) { float height = 0; //呼吸 for (int i = 0; i < 6; i++) { DrawingGridColumnCell cellBreath = new DrawingGridColumnCell(this); cellBreath.LeftUnit = i; cellBreath.TopUnit = this.HeaderHeightUnit + this.BodyHeightUnit; cellBreath.HeightUnit = ThreeItemConstValue.FooterHeight_Breath; cellBreath.Border.TopBorderWidth = ThreeItemConstValue.OuterBorderWidth; cellBreath.Border.BottomBorderWidth = ThreeItemConstValue.OuterBorderWidth; if (i == 5) { cellBreath.Border.RightBorderWidth = ThreeItemConstValue.OuterBorderWidth; } else if (i == 0) { cellBreath.Border.LeftBorderWidth = ThreeItemConstValue.OuterBorderWidth; } this.Cells.Add(cellBreath); } height += ThreeItemConstValue.FooterHeight_Breath; //血压 for (int i = 0; i < 2; i++) { DrawingGridColumnCell cellPressure = new DrawingGridColumnCell(this); cellPressure.LeftUnit = 0; cellPressure.WidthUnit = 6; cellPressure.HeightUnit = ThreeItemConstValue.FooterHeight_Blood; cellPressure.TopUnit = this.HeaderHeightUnit + this.BodyHeightUnit + height; cellPressure.Border.BottomBorderWidth = ThreeItemConstValue.OuterBorderWidth; //if (i == 1) //{ // cellPressure.Border.RightBorderWidth = TreeItemConstValue.OuterBorderWidth; //} //else if (i == 0) //{ // cellPressure.Border.LeftBorderWidth = TreeItemConstValue.OuterBorderWidth; //} this.Cells.Add(cellPressure); } height += ThreeItemConstValue.FooterHeight_Blood; //总入液量 DrawingGridColumnCell cellLiq = new DrawingGridColumnCell(this); cellLiq.WidthUnit = this.WidthUnit; cellLiq.TopUnit = this.HeaderHeightUnit + this.BodyHeightUnit + height; cellLiq.HeightUnit = ThreeItemConstValue.FooterHeight_Liq; cellLiq.Border.BottomBorderWidth = ThreeItemConstValue.OuterBorderWidth; cellLiq.Border.TopBorderWidth = ThreeItemConstValue.OuterBorderWidth; cellLiq.Border.LeftBorderWidth = ThreeItemConstValue.OuterBorderWidth; cellLiq.Border.RightBorderWidth = ThreeItemConstValue.OuterBorderWidth; height += cellLiq.HeightUnit; this.Cells.Add(cellLiq); //大便 DrawingGridColumnCell cellEx1 = new DrawingGridColumnCell(this); cellEx1.WidthUnit = this.WidthUnit; cellEx1.TopUnit = this.HeaderHeightUnit + this.BodyHeightUnit + height; cellEx1.HeightUnit = ThreeItemConstValue.FooterHeight_DaBian; cellEx1.Border.BottomBorderWidth = ThreeItemConstValue.OuterBorderWidth; cellEx1.Border.TopBorderWidth = ThreeItemConstValue.OuterBorderWidth; cellEx1.Border.LeftBorderWidth = ThreeItemConstValue.OuterBorderWidth; cellEx1.Border.RightBorderWidth = ThreeItemConstValue.OuterBorderWidth; height += cellEx1.HeightUnit; this.Cells.Add(cellEx1); //尿量 DrawingGridColumnCell cellEx2 = new DrawingGridColumnCell(this); cellEx2.WidthUnit = this.WidthUnit; cellEx2.TopUnit = this.HeaderHeightUnit + this.BodyHeightUnit + height; cellEx2.HeightUnit = ThreeItemConstValue.FooterHeight_NiaoLiang; cellEx2.Border.BottomBorderWidth = ThreeItemConstValue.OuterBorderWidth; cellEx2.Border.TopBorderWidth = ThreeItemConstValue.OuterBorderWidth; cellEx2.Border.LeftBorderWidth = ThreeItemConstValue.OuterBorderWidth; cellEx2.Border.RightBorderWidth = ThreeItemConstValue.OuterBorderWidth; height += cellEx2.HeightUnit; this.Cells.Add(cellEx2); //其他1 DrawingGridColumnCell cellEx3 = new DrawingGridColumnCell(this); cellEx3.WidthUnit = this.WidthUnit; cellEx3.TopUnit = this.HeaderHeightUnit + this.BodyHeightUnit + height; cellEx3.HeightUnit = ThreeItemConstValue.FooterHeight_Other1; cellEx3.Border.BottomBorderWidth = ThreeItemConstValue.OuterBorderWidth; cellEx3.Border.TopBorderWidth = ThreeItemConstValue.OuterBorderWidth; cellEx3.Border.LeftBorderWidth = ThreeItemConstValue.OuterBorderWidth; cellEx3.Border.RightBorderWidth = ThreeItemConstValue.OuterBorderWidth; height += cellEx3.HeightUnit; this.Cells.Add(cellEx3); //体重 DrawingGridColumnCell cellWeight = new DrawingGridColumnCell(this); cellWeight.WidthUnit = this.WidthUnit; cellWeight.TopUnit = this.HeaderHeightUnit + this.BodyHeightUnit + height; cellWeight.HeightUnit = ThreeItemConstValue.FooterHeight_Weight; cellWeight.Border.BottomBorderWidth = ThreeItemConstValue.OuterBorderWidth; cellWeight.Border.TopBorderWidth = ThreeItemConstValue.OuterBorderWidth; cellWeight.Border.LeftBorderWidth = ThreeItemConstValue.OuterBorderWidth; cellWeight.Border.RightBorderWidth = ThreeItemConstValue.OuterBorderWidth; height += cellWeight.HeightUnit; this.Cells.Add(cellWeight); //皮试 DrawingGridColumnCell cellPeau = new DrawingGridColumnCell(this); cellPeau.WidthUnit = this.WidthUnit; cellPeau.TopUnit = this.HeaderHeightUnit + this.BodyHeightUnit + height; cellPeau.HeightUnit = this.ParentGrid.FooterHeight_PiShi; cellPeau.Border.BottomBorderWidth = ThreeItemConstValue.OuterBorderWidth; cellPeau.Border.TopBorderWidth = ThreeItemConstValue.OuterBorderWidth; cellPeau.Border.LeftBorderWidth = ThreeItemConstValue.OuterBorderWidth; cellPeau.Border.RightBorderWidth = ThreeItemConstValue.OuterBorderWidth; height += cellPeau.HeightUnit; this.Cells.Add(cellPeau); //其他2 DrawingGridColumnCell cellOther = new DrawingGridColumnCell(this); cellOther.WidthUnit = this.WidthUnit; cellOther.TopUnit = this.HeaderHeightUnit + this.BodyHeightUnit + height; cellOther.HeightUnit = this.ParentGrid.m_fltOtherFooterHeigth; cellOther.Border.BottomBorderWidth = ThreeItemConstValue.OuterBorderWidth; cellOther.Border.TopBorderWidth = ThreeItemConstValue.OuterBorderWidth; cellOther.Border.LeftBorderWidth = ThreeItemConstValue.OuterBorderWidth; cellOther.Border.RightBorderWidth = ThreeItemConstValue.OuterBorderWidth; height += cellOther.HeightUnit; this.Cells.Add(cellOther); return(height); }
public override float InitFooter(string registerId, int pageIndex) { float height = 0; float fontScale = 0.38f; //东华自定义其他 DataTable dtResult = null; string strOther1 = "其他"; string strOther2 = "其 他"; if (dtResult != null) { DataRow[] drSelArr = dtResult.Select("colcode_vchr = 'Other1'"); if (drSelArr != null && drSelArr.Length > 0) { strOther1 = drSelArr[0]["coldesc_vchr"].ToString(); } drSelArr = dtResult.Select("colcode_vchr = 'Other2'"); if (drSelArr != null && drSelArr.Length > 0) { strOther2 = drSelArr[0]["coldesc_vchr"].ToString(); } } DrawingGridColumnCell rowBreath = new DrawingGridColumnCell(this); rowBreath.HeightUnit = ThreeItemConstValue.FooterHeight_Breath; rowBreath.TopUnit = this.HeaderHeightUnit + this.BodyHeightUnit; rowBreath.WidthUnit = WidthUnit; rowBreath.Border.LeftBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowBreath.Border.TopBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowBreath.Border.RightBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowBreath.Border.BottomBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowBreath.TextProperty.Font = new Font(ThreeItemConstValue.DefaultFontFamilyName, ThreeItemConstValue.FooterHeight_Breath * this.SizePerUnit * fontScale * 0.8f); rowBreath.TextProperty.Text = "呼 吸(次/分)"; rowBreath.TextProperty.AlignHort = 1; height += rowBreath.HeightUnit; this.Cells.Add(rowBreath); DrawingGridColumnCell rowPressure = new DrawingGridColumnCell(this); rowPressure.HeightUnit = ThreeItemConstValue.FooterHeight_Blood; rowPressure.TopUnit = rowBreath.TopUnit + rowBreath.HeightUnit; rowPressure.WidthUnit = WidthUnit; rowPressure.Border.LeftBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowPressure.Border.TopBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowPressure.Border.RightBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowPressure.Border.BottomBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowPressure.TextProperty.Font = new Font(ThreeItemConstValue.DefaultFontFamilyName, ThreeItemConstValue.FooterHeight_Blood * this.SizePerUnit * fontScale * 0.8f); rowPressure.TextProperty.Text = "血 压(mmHg)"; rowPressure.TextProperty.AlignHort = 1; height += rowPressure.HeightUnit; this.Cells.Add(rowPressure); DrawingGridColumnCell rowLiq = new DrawingGridColumnCell(this); rowLiq.HeightUnit = ThreeItemConstValue.FooterHeight_Liq; rowLiq.TopUnit = rowPressure.TopUnit + rowPressure.HeightUnit; rowLiq.WidthUnit = WidthUnit; rowLiq.Border.LeftBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowLiq.Border.TopBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowLiq.Border.RightBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowLiq.Border.BottomBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowLiq.TextProperty.Font = new Font(ThreeItemConstValue.DefaultFontFamilyName, ThreeItemConstValue.FooterHeight_Liq * this.SizePerUnit * fontScale * 0.8f); rowLiq.TextProperty.Text = "总入液量(ml)"; rowLiq.TextProperty.AlignHort = 1; height += rowLiq.HeightUnit; this.Cells.Add(rowLiq); float width1 = this.WidthUnit * 0.33f; DrawingGridColumnCell rowEx = new DrawingGridColumnCell(this); rowEx.HeightUnit = ThreeItemConstValue.FooterHeight_DaBian * ThreeItemConstValue.FooterHeight_NiaoLiang + ThreeItemConstValue.FooterHeight_Other1; rowEx.TopUnit = rowLiq.TopUnit + rowLiq.HeightUnit; rowEx.WidthUnit = width1; rowEx.Border.LeftBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowEx.Border.TopBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowEx.Border.RightBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowEx.Border.BottomBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowEx.TextProperty.Font = new Font(ThreeItemConstValue.DefaultFontFamilyName, ThreeItemConstValue.FooterHeight_DaBian * this.SizePerUnit * fontScale); rowEx.TextProperty.IsVerticalText = true; rowEx.TextProperty.Text = "排出量"; height += rowEx.HeightUnit; this.Cells.Add(rowEx); DrawingGridColumnCell rowEx1 = new DrawingGridColumnCell(this); rowEx1.HeightUnit = ThreeItemConstValue.FooterHeight_DaBian; rowEx1.TopUnit = rowLiq.TopUnit + rowLiq.HeightUnit; rowEx1.WidthUnit = this.WidthUnit - width1; rowEx1.LeftUnit = width1; rowEx1.Border.LeftBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowEx1.Border.TopBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowEx1.Border.RightBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowEx1.Border.BottomBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowEx1.TextProperty.Font = new Font(ThreeItemConstValue.DefaultFontFamilyName, ThreeItemConstValue.FooterHeight_DaBian * this.SizePerUnit * fontScale); rowEx1.TextProperty.Text = "大便(次)"; height += rowEx1.HeightUnit; this.Cells.Add(rowEx1); DrawingGridColumnCell rowEx2 = new DrawingGridColumnCell(this); rowEx2.HeightUnit = ThreeItemConstValue.FooterHeight_NiaoLiang; rowEx2.TopUnit = rowLiq.TopUnit + rowLiq.HeightUnit + rowEx1.HeightUnit; rowEx2.WidthUnit = this.WidthUnit - width1; rowEx2.LeftUnit = width1; rowEx2.Border.LeftBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowEx2.Border.TopBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowEx2.Border.RightBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowEx2.Border.BottomBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowEx2.TextProperty.Font = new Font(ThreeItemConstValue.DefaultFontFamilyName, ThreeItemConstValue.FooterHeight_NiaoLiang * this.SizePerUnit * fontScale); rowEx2.TextProperty.Text = "尿量(ml)"; height += rowEx2.HeightUnit; this.Cells.Add(rowEx2); this.ParentGrid.CellDate = new List <DrawingGridColumnCell>(); DrawingGridColumnCell rowEx3 = new DrawingGridColumnCell(this); rowEx3.HeightUnit = ThreeItemConstValue.FooterHeight_Other1; rowEx3.TopUnit = rowLiq.TopUnit + rowLiq.HeightUnit + rowEx1.HeightUnit + rowEx2.HeightUnit; rowEx3.WidthUnit = this.WidthUnit - width1; rowEx3.LeftUnit = width1; rowEx3.Border.LeftBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowEx3.Border.TopBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowEx3.Border.RightBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowEx3.Border.BottomBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowEx3.TextProperty.Font = new Font(ThreeItemConstValue.DefaultFontFamilyName, ThreeItemConstValue.FooterHeight_Other1 * this.SizePerUnit * fontScale); rowEx3.TextProperty.Text = strOther1; rowEx3.Name = "Other1"; height += rowEx3.HeightUnit; this.Cells.Add(rowEx3); this.ParentGrid.CellDate.Add(rowEx3); if (this.ParentGrid != null) { this.ParentGrid.m_mthTextChanged(1, strOther1); } DrawingGridColumnCell rowWeight = new DrawingGridColumnCell(this); rowWeight.HeightUnit = ThreeItemConstValue.FooterHeight_Weight; rowWeight.TopUnit = rowEx.TopUnit + rowEx.HeightUnit; rowWeight.WidthUnit = this.WidthUnit; rowWeight.Border.LeftBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowWeight.Border.TopBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowWeight.Border.RightBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowWeight.Border.BottomBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowWeight.TextProperty.Font = new Font(ThreeItemConstValue.DefaultFontFamilyName, ThreeItemConstValue.FooterHeight_Weight * this.SizePerUnit * fontScale); rowWeight.TextProperty.Text = "体重(kg)"; height += rowWeight.HeightUnit; this.Cells.Add(rowWeight); DrawingGridColumnCell rowPeau = new DrawingGridColumnCell(this); rowPeau.HeightUnit = this.ParentGrid.FooterHeight_PiShi; rowPeau.TopUnit = rowWeight.TopUnit + rowWeight.HeightUnit; rowPeau.WidthUnit = this.WidthUnit; rowPeau.Border.LeftBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowPeau.Border.TopBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowPeau.Border.RightBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowPeau.Border.BottomBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowPeau.TextProperty.Font = new Font(ThreeItemConstValue.DefaultFontFamilyName, ThreeItemConstValue.FooterHeight_Weight * this.SizePerUnit * fontScale); rowPeau.TextProperty.Text = "皮 试"; height += rowPeau.HeightUnit; this.Cells.Add(rowPeau); DrawingGridColumnCell rowOther = new DrawingGridColumnCell(this); rowOther.HeightUnit = this.ParentGrid.m_fltOtherFooterHeigth; rowOther.TopUnit = rowPeau.TopUnit + rowPeau.HeightUnit; rowOther.WidthUnit = this.WidthUnit; rowOther.Border.LeftBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowOther.Border.TopBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowOther.Border.RightBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowOther.Border.BottomBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowOther.TextProperty.Font = new Font(ThreeItemConstValue.DefaultFontFamilyName, ThreeItemConstValue.FooterHeight_Other2 * this.SizePerUnit * fontScale); rowOther.TextProperty.Text = strOther2; rowOther.Name = "Other2"; height += rowOther.HeightUnit; this.Cells.Add(rowOther); this.ParentGrid.CellDate.Add(rowOther); if (this.ParentGrid != null) { this.ParentGrid.m_mthTextChanged(2, strOther2); } return(height); }
public override float InitHeader() { float height = 0; float fontScale = 0.5f; DrawingGridColumnCell rowDate = new DrawingGridColumnCell(this); rowDate.HeightUnit = ThreeItemConstValue.HeaderHeight_Date; rowDate.WidthUnit = this.WidthUnit; string dateText = string.Empty; if (this.Date != null) { if (this.IsFirstVisibleColumn) { dateText = this.Date.Value.ToString("yyyy-MM-dd"); } else { if (PrevVisibleColumn.Date.Value.Year != this.Date.Value.Year) { dateText = this.Date.Value.ToString("yyyy-MM-dd"); } else if (PrevVisibleColumn.Date.Value.Month != this.Date.Value.Month) { dateText = this.Date.Value.ToString("MM-dd"); } else { dateText = this.Date.Value.ToString("dd"); } } } if (this.Value != null) { rowDate.TextProperty.Text = dateText; } rowDate.TextProperty.Font = new Font(ThreeItemConstValue.DefaultFontFamilyName, rowDate.HeightUnit * this.SizePerUnit * fontScale); rowDate.Border.TopBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowDate.Border.LeftBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowDate.Border.RightBorderWidth = ThreeItemConstValue.OuterBorderWidth; if (!this.IsFirstVisibleColumn) { rowDate.Border.LeftBorderColor = Color.Red; } if (!this.IsLastVisibleColumn) { rowDate.Border.RightBorderColor = Color.Red; } Cells.Add(rowDate); height += rowDate.HeightUnit; //住院天数 rowInDays = new DrawingGridColumnCell(this); rowInDays.HeightUnit = ThreeItemConstValue.HeaderHeight_Date; rowInDays.WidthUnit = this.WidthUnit; rowInDays.TopUnit = Cells[Cells.Count - 1].HeightUnit + Cells[Cells.Count - 1].TopUnit; //rowInDays.TextProperty.Text = this.InDays; rowInDays.TextProperty.Font = new Font(ThreeItemConstValue.DefaultFontFamilyName, rowInDays.HeightUnit * this.SizePerUnit * fontScale); rowInDays.Border.LeftBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowInDays.Border.RightBorderWidth = ThreeItemConstValue.OuterBorderWidth; if (!this.IsFirstVisibleColumn) { rowInDays.Border.LeftBorderColor = Color.Red; } if (!this.IsLastVisibleColumn) { rowInDays.Border.RightBorderColor = Color.Red; } Cells.Add(rowInDays); height += rowInDays.HeightUnit; //手术或产后日数 rowDaysAfOperation = new DrawingGridColumnCell(this); rowDaysAfOperation.HeightUnit = ThreeItemConstValue.HeaderHeight_Date; rowDaysAfOperation.WidthUnit = this.WidthUnit; rowDaysAfOperation.TopUnit = Cells[Cells.Count - 1].HeightUnit + Cells[Cells.Count - 1].TopUnit; //rowDaysAfOperation.TextProperty.Text = this.DaysAfOperation; rowDaysAfOperation.TextProperty.Font = new Font("Times New Roman", rowDaysAfOperation.HeightUnit * this.SizePerUnit * fontScale); rowDaysAfOperation.TextProperty.ForeColor = Color.Red; rowDaysAfOperation.Border.LeftBorderWidth = ThreeItemConstValue.OuterBorderWidth; rowDaysAfOperation.Border.RightBorderWidth = ThreeItemConstValue.OuterBorderWidth; if (!this.IsFirstVisibleColumn) { rowDaysAfOperation.Border.LeftBorderColor = Color.Red; } if (!this.IsLastVisibleColumn) { rowDaysAfOperation.Border.RightBorderColor = Color.Red; } Cells.Add(rowDaysAfOperation); height += rowDaysAfOperation.HeightUnit; //上午 DrawingGridColumnCell rowMoning = new DrawingGridColumnCell(this); rowMoning.HeightUnit = 1;// TreeItemConstValue.HeaderHeight_Date / 2; rowMoning.WidthUnit = this.WidthUnit / 2; rowMoning.TextProperty.Font = new Font(ThreeItemConstValue.DefaultFontFamilyName, rowMoning.HeightUnit * this.SizePerUnit * 0.7f); rowMoning.TextProperty.Text = "上午"; rowMoning.TopUnit = Cells[Cells.Count - 1].HeightUnit + Cells[Cells.Count - 1].TopUnit; rowMoning.Border.LeftBorderWidth = ThreeItemConstValue.OuterBorderWidth; if (!this.IsFirstVisibleColumn) { rowMoning.Border.LeftBorderColor = Color.Red; } Cells.Add(rowMoning); height += rowMoning.HeightUnit; ////下午 DrawingGridColumnCell rowAFTN = new DrawingGridColumnCell(this); rowAFTN.HeightUnit = 1;// TreeItemConstValue.HeaderHeight_Date / 2; rowAFTN.WidthUnit = this.WidthUnit / 2; rowAFTN.LeftUnit = this.WidthUnit / 2; rowAFTN.TopUnit = rowMoning.TopUnit; rowAFTN.TextProperty.Font = new Font(ThreeItemConstValue.DefaultFontFamilyName, rowAFTN.HeightUnit * this.SizePerUnit * 0.7f); rowAFTN.TextProperty.Text = "下午"; rowAFTN.Border.RightBorderWidth = ThreeItemConstValue.OuterBorderWidth; if (!this.IsLastVisibleColumn) { rowAFTN.Border.RightBorderColor = Color.Red; } Cells.Add(rowAFTN); #region 时间刻度 Font fontDigit = new Font(ThreeItemConstValue.DefaultFontFamilyName, this.SizePerUnit * 0.6f); string strTime1 = string.Empty; string strTime2 = string.Empty; string strTime3 = string.Empty; if (Common.Entity.GlobalParm.dicSysParameter[33] == "1")// || clsGlobalHospitalCode.Code == "0002" || clsGlobalHospitalCode.Code == "0003") { strTime1 = "2"; strTime2 = "6"; strTime3 = "10"; } else { strTime1 = "4"; strTime2 = "8"; strTime3 = "12"; } //4 2:00----5:59 DrawingGridColumnCell rowTime4 = new DrawingGridColumnCell(this); rowTime4.TopUnit = rowMoning.TopUnit + rowMoning.HeightUnit; rowTime4.TextProperty.Text = strTime1; rowTime4.TextProperty.Font = fontDigit; rowTime4.TextProperty.ForeColor = Color.Red; rowTime4.Border.LeftBorderWidth = ThreeItemConstValue.OuterBorderWidth; if (!this.IsFirstVisibleColumn) { rowTime4.Border.LeftBorderColor = Color.Red; } rowTime4.Border.BottomBorderWidth = ThreeItemConstValue.OuterBorderWidth; Cells.Add(rowTime4); //8 6:00—9:59 DrawingGridColumnCell rowTime8 = new DrawingGridColumnCell(this); rowTime8.TopUnit = rowMoning.TopUnit + rowMoning.HeightUnit; rowTime8.LeftUnit = rowTime4.LeftUnit + rowTime4.WidthUnit; rowTime8.TextProperty.Text = strTime2; rowTime8.TextProperty.Font = fontDigit; rowTime8.Border.BottomBorderWidth = ThreeItemConstValue.OuterBorderWidth; Cells.Add(rowTime8); //12 10:00—13:58 DrawingGridColumnCell rowTime12 = new DrawingGridColumnCell(this); rowTime12.TopUnit = rowMoning.TopUnit + rowMoning.HeightUnit; rowTime12.LeftUnit = rowTime8.LeftUnit + rowTime8.WidthUnit; rowTime12.TextProperty.Text = strTime3; rowTime12.TextProperty.Font = fontDigit; rowTime12.Border.BottomBorderWidth = ThreeItemConstValue.OuterBorderWidth; Cells.Add(rowTime12); //4 14:00—17:59 DrawingGridColumnCell rowTime16 = new DrawingGridColumnCell(this); rowTime16.TopUnit = rowMoning.TopUnit + rowMoning.HeightUnit; rowTime16.LeftUnit = rowTime12.LeftUnit + rowTime12.WidthUnit; rowTime16.TextProperty.Text = strTime1; rowTime16.TextProperty.Font = fontDigit; rowTime16.Border.BottomBorderWidth = ThreeItemConstValue.OuterBorderWidth; Cells.Add(rowTime16); //8 18:00----21:59 DrawingGridColumnCell rowTime20 = new DrawingGridColumnCell(this); rowTime20.TopUnit = rowMoning.TopUnit + rowMoning.HeightUnit; rowTime20.LeftUnit = rowTime16.LeftUnit + rowTime16.WidthUnit; rowTime20.TextProperty.Text = strTime2; rowTime20.TextProperty.Font = fontDigit; rowTime20.TextProperty.ForeColor = Color.Red; rowTime20.Border.BottomBorderWidth = ThreeItemConstValue.OuterBorderWidth; Cells.Add(rowTime20); //12 22:00—1:29 DrawingGridColumnCell rowTime24 = new DrawingGridColumnCell(this); rowTime24.TopUnit = rowMoning.TopUnit + rowMoning.HeightUnit; rowTime24.LeftUnit = rowTime20.LeftUnit + rowTime20.WidthUnit; rowTime24.TextProperty.Text = strTime3; rowTime24.TextProperty.Font = fontDigit; rowTime24.TextProperty.ForeColor = Color.Red; rowTime24.Border.RightBorderWidth = ThreeItemConstValue.OuterBorderWidth; if (!this.IsLastVisibleColumn) { rowTime24.Border.RightBorderColor = Color.Red; } rowTime24.Border.BottomBorderWidth = ThreeItemConstValue.OuterBorderWidth; Cells.Add(rowTime24); height += rowTime4.HeightUnit; #endregion return(height); }