Пример #1
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;
     }
 }
Пример #2
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;
        }