示例#1
0
        public Volume(Instrument instrument, ChartControl chart)
        {
            Chart      = chart;
            Instrument = instrument;
            Cache      = new ChartGfxCache(CreatePiece);

            Label = new TextBlock
            {
                Text             = string.Empty,
                FontSize         = 10.0,
                IsHitTestVisible = false,
            };
            Icon = new Polygon
            {
                Points = PointCollection.Parse("0,0 5,5 5,-5"),
                Stroke = Brushes.Black,
                Fill   = Brushes.Black,
                Cursor = Cursors.SizeNS,
            };
            Icon.MouseLeftButtonDown += delegate
            {
                chart.MouseOperations.Pending[MouseButton.Left] = new DragVolumeSizeScaler(this)
                {
                    StartOnMouseDown = false
                };
            };

            Scale             = 1.0;
            IndicatorPosition = 0.25;
        }
示例#2
0
 public Candles(Instrument instrument)
 {
     Cache      = new ChartGfxCache(CreatePiece);
     Instrument = instrument;
 }