Ejemplo n.º 1
0
        private static PriceShape_Label GetLabel()
        {
            PriceShape_Label label = new PriceShape_Label();

            label.Color = Color.Red;
            label.Point = new PricePoint(12, 12);
            label.Text  = "test";
            return(label);
        }
Ejemplo n.º 2
0
        public void Paint(Graphics g, PriceGraphicMapping priceGraphic, IPriceShape shape)
        {
            PriceShape_Label label = (PriceShape_Label)shape;
            float            x1    = priceGraphic.CalcX(label.Point.X);
            float            y1    = priceGraphic.CalcY(label.Point.Y);
            Font             font  = label.Font != null ? label.Font : new Font("宋体", 14.2f, FontStyle.Regular);
            StringFormat     sf    = label.StringFormat != null ? label.StringFormat : new StringFormat(StringFormatFlags.DirectionVertical);

            g.DrawString(label.Text, font, new SolidBrush(label.Color), new PointF(x1, y1), sf);
        }
Ejemplo n.º 3
0
        public void DrawLabel(PriceShape_Label label)
        {
            PriceShape_Label shape = new PriceShape_Label();

            shape.Color = label.Color;
            shape.Text  = label.Text;
            shape.Point = GetPoint(label.Point.X, label.Point.Y);
            if (shape.Point == null)
            {
                return;
            }
            RecordShape(label);
        }
Ejemplo n.º 4
0
        public void DrawLabels(List <float> positions, List <string> txts, Color color)
        {
            PriceShape_Label shape = new PriceShape_Label();

            //shape.Color = label.Color;
            //shape.Text = label.Text;
            //shape.Point = GetPoint(label.Time, label.Price);
            if (shape.Point == null)
            {
                return;
            }
            drawer.DrawPriceShape(shape);
        }
Ejemplo n.º 5
0
        public void DrawLabel(PriceLabel label)
        {
            PriceShape_Label shape = new PriceShape_Label();

            shape.Color = label.Color;
            shape.Text  = label.Text;
            shape.Point = GetPoint(label.Time, label.Price);
            if (shape.Point == null)
            {
                return;
            }
            drawer.DrawPriceShape(shape);
        }
Ejemplo n.º 6
0
 public void DrawLabel(PriceShape_Label label)
 {
 }
Ejemplo n.º 7
0
 /// <summary>
 /// 写文字
 /// </summary>
 /// <param name="label"></param>
 public void DrawLabel(PriceShape_Label label)
 {
     this.strategyGraphic.Shapes.AddPriceShape(label);
 }