protected override void OnPaint(ChartGraphics g)
            {
                g.SelectBrush(this.Owner.BackColor);
                GdiFont gdiFont = g.SelectFont(this.Owner.ScaleFont);
                int     fh      = (int)gdiFont.Font.GetHeight();

                this.Owner.Area.SelectGridPen(g);
                g.SetTextColor(this.Owner.ForeColor);
                for (int i = 0; i < _gridLines.Count; i++)
                {
                    GridLine gl = _gridLines[i];
                    g.DrawLine(0, gl.Y, 2, gl.Y);
                    g.TextOut(gl.Desc, 7, gl.Y - fh / 2);
                }
            }
Esempio n. 2
0
            protected override void OnPaint(ChartGraphics g)
            {
                g.SelectBrush(this.Owner.BackColor);
                GdiFont gdiFont = g.SelectFont(this.Owner.ScaleFont);

                this.Owner.Area.SelectGridPen(g);
                g.SetTextColor(this.Owner.ForeColor);

                for (int i = 0; i < _gridLines.Count; i++)
                {
                    GridLine gl = _gridLines[i];
                    g.DrawLine(gl.X, 0, gl.X, 2);
                    g.TextOut(gl.Desc, gl.X, 3);
                }

                //for (int i = 0; i < _viewCountBar; i++) {
                //  int x = i * this.DeltaX;
                //  int barindex = i + this.Position;
                //  if (Multiple(x, 32)) {
                //    //if (this.HorizontalScaleVisible && this.ChartManager.Bars != null && barindex < barcount) {

                //    //  string sc = "";
                //    //  DateTime dtm = this.ChartManager.Bars[barindex].Time;
                //    //  if (l) {
                //    //    sc = dtm.ToString("d MMM yyyy");
                //    //    l = false;
                //    //  } else
                //    //    sc = dtm.ToString("d MMM ") + dtm.ToShortTimeString();

                //    //  ghscale.DrawLine(_borderPen, _map[i], 0, _map[i], 2);
                //    //  ghscale.DrawString(sc, Manager.Style.ScaleFont, _scaleForeBrush, _map[i], 2);
                //    //}

                //  }
                //}
            }