public override void Draw(IDrawingGraphics drawingGraphics) { //drawingGraphics.Color(Color.FromArgb(100,100,100)); //drawingGraphics.DrawRectangle(0, 0, width, height); //drawingGraphics.Style(this.Style); //drawingGraphics.MoveTo(2,2).Color(Color.FromArgb(64, 64, 64)).DrawText(this.Text); //if (homePage != null) { if (this.Name != null) { drawingGraphics .MoveTo(0, 0) .Style(HOBD.theme.PhoneTextSensorDescrStyle) .DrawCenterText(this.Name, width, 20); } if (this.TUnits != null && this.TUnits.Length > 0) { drawingGraphics .MoveTo(0, height - 30) .Style(HOBD.theme.PhoneTextSensorDescrStyle) .DrawCenterText(this.TUnits, width, 20); } } if (this.Text != null) { drawingGraphics .MoveTo(0, 0) .Style(this.Style) .DrawCenterText(this.Text, width, height); } //drawingGraphics.MoveTo(0, height-20).Style(HOBD.theme.PhoneTextNormalStyle).DrawText(this.Units); }
public override void Draw(IDrawingGraphics drawingGraphics) { //drawingGraphics.Color(Color.FromArgb(100,100,100)); //drawingGraphics.DrawRectangle(0, 0, width, height); //drawingGraphics.Style(this.Style); //drawingGraphics.MoveTo(2,2).Color(Color.FromArgb(64, 64, 64)).DrawText(this.Text); //if (homePage != null) { if (this.Name != null) drawingGraphics .MoveTo(0, 0) .Style(HOBD.theme.PhoneTextSensorDescrStyle) .DrawCenterText(this.Name, width, 20); if (this.TUnits != null && this.TUnits.Length > 0) { drawingGraphics .MoveTo(0, height-30) .Style(HOBD.theme.PhoneTextSensorDescrStyle) .DrawCenterText(this.TUnits, width, 20); } } if (this.Text != null) drawingGraphics .MoveTo(0, 0) .Style(this.Style) .DrawCenterText(this.Text, width, height); //drawingGraphics.MoveTo(0, height-20).Style(HOBD.theme.PhoneTextNormalStyle).DrawText(this.Units); }