public HMIBarLevel() { this.sfCenter = new StringFormat(); this.sfCenterTop = new StringFormat(); this.sfLeftCenter = new StringFormat(); this.sfRightCenter = new StringFormat(); this.m_FillStyle = BarStyle.Hatch; this.m_BorderPen = new Pen(Color.Wheat, 1.0F); this.m_FillDirection = FillDirectionEnum.Up; this.ForeColor = Color.WhiteSmoke; this.sfCenterTop = new StringFormat() { Alignment = StringAlignment.Center, LineAlignment = StringAlignment.Near }; this.sfCenter = new StringFormat() { Alignment = StringAlignment.Center, LineAlignment = StringAlignment.Center }; this.sfLeftCenter = new StringFormat() { Alignment = StringAlignment.Near, LineAlignment = StringAlignment.Center }; this.sfRightCenter = new StringFormat() { Alignment = StringAlignment.Far, LineAlignment = StringAlignment.Center }; this.m_BarContentColor = Color.Red; this.m_BarFillBrush = new HatchBrush(HatchStyle.DarkDownwardDiagonal, Color.Black, Color.Red); this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); this.CreateStaticImage(); }
public HMILinearMeter() { this.sfCenter = new StringFormat(); this.sfCenterTop = new StringFormat(); this.m_BarContentColor = new HatchBrush(HatchStyle.DarkDownwardDiagonal, Color.Red, Color.DarkOrange); this.m_BorderPen = new Pen(Color.Wheat, 1.0F); this.m_FillDirection = FillDirectionEnum.Up; this.ForeColor = Color.WhiteSmoke; this.sfCenter = new StringFormat(); this.sfCenterTop = new StringFormat(); this.CreateStaticImage(); }