Ejemplo n.º 1
0
        public void SetSelectedObject(object selectedObject)
        {
            if (selectedObject == m_SelectedObject)
            {
                return;
            }

            if (m_SelectedObject is LogGraphCurveItem oldCurve)
            {
                oldCurve.Color = m_SelectedObjectOriginalColor;
            }

            m_SelectedObject = selectedObject;

            if (m_SelectedObject is LogGraphCurveItem curve)
            {
                m_SelectedObjectOriginalColor = curve.Color;
                curve.Color = Color.Red;

                var index    = CurveList.IndexOf(curve);
                var newIndex = CurveList.Move(index, -index);
            }

            OnCurveItemSelected?.Invoke(this, EventArgs.Empty);

            m_Parent.UpdateGraph();
        }
Ejemplo n.º 2
0
        public void moveBarsToBack()
        {
            CurveList.Move(0, 999);
            var points = new PointPairList();

            Objects.each(Objects.sort(dateParent.dates()), time => points.Add(new XDate(time).XLDate, 0.0));
            var line = new LineItem("", points, Color.Black, SymbolType.None)
            {
                Line   = { IsVisible = false },
                Symbol = { IsVisible = false },
                Label  = { IsVisible = false }
            };

            CurveList.Insert(0, line);
        }