示例#1
0
        public GraphicDrawer_Main()
        {
            this.IsVertical = false;

            graphicDrawer_Left  = new GraphicDrawer_Switch_CandleReal();
            graphicDrawer_Right = new GraphicDrawer_CurrentInfo();

            this.AddGraph(graphicDrawer_Left, 100);
            this.AddGraph(graphicDrawer_Right, 100, true);
        }
示例#2
0
 private void Clear()
 {
     if (this.drawer != null)
     {
         this.drawer.UnBindControl();
         this.drawer.DataProvider = null;
         this.drawer = null;
     }
     this.graphicData_CurrentInfo = null;
     if (this.chartComponentController != null)
     {
         this.chartComponentController.OnDataChanged -= ChartComponentController_OnDataChanged;
     }
 }
示例#3
0
        public void Init(ChartComponentController value)
        {
            if (value == null)
            {
                return;
            }
            this.Clear();
            this.chartComponentController = value;
            ITickData   tickData    = GetTickData();
            CurrentInfo currentInfo = GetCurrentInfo(tickData);

            this.graphicData_CurrentInfo = new GraphicData_CurrentInfo(currentInfo, tickData);
            this.drawer = new GraphicDrawer_CurrentInfo();
            this.drawer.DataProvider = this.graphicData_CurrentInfo;
            this.drawer.BindControl(this);
            this.chartComponentController.OnDataChanged += ChartComponentController_OnDataChanged;
        }