Esempio n. 1
0
        private void LeasingChart_Unloaded(object sender, RoutedEventArgs e)
        {
            Unloaded -= LeasingChart_Unloaded;

            Subscribe(false);

            if (m_gridM != null)
            {
                m_gridM.Dispose();
                m_gridM = null;
            }

            if (m_barM != null)
            {
                m_barM.Dispose();
                m_barM = null;
            }

            if (m_textM != null)
            {
                m_textM.Dispose();
                m_textM = null;
            }

            if (m_rowLayoutM != null)
            {
                m_rowLayoutM.Dispose();
                m_rowLayoutM = null;
            }

            if (m_hightlightM != null)
            {
                m_hightlightM.Dispose();
                m_hightlightM = null;
            }

            if (m_rowM != null)
            {
                m_rowM.Dispose();
                m_rowM = null;
            }

            if (m_tooltipM != null)
            {
                m_tooltipM.Dispose();
                m_tooltipM = null;
            }
        }
Esempio n. 2
0
        public LeasingChart()
        {
            InitializeComponent();

            m_gridM      = new CanvasGridDrawManager(this);
            m_barM       = new CanvasBarDrawManager(this);
            m_textM      = new CanvasTextDrawManager(this);
            m_rowLayoutM = new CanvasRowLayoutDrawManager(this);
            //важно!!! подписывать крайним - зависим (подписывается) от других
            m_rowM        = new RowManager(this);
            m_hightlightM = new HightlightManager(this);
            m_tooltipM    = new TooltipManager(this);

            base.Unloaded += LeasingChart_Unloaded;

            m_children = new VisualCollection(this);

            Subscribe(true);
        }