Ejemplo n.º 1
0
        void Init(object key)
        {
            ZedGraphDemo demo = (ZedGraphDemo)this.demos[key];

            if (demo == null)
            {
                return;
            }

            m_ZedGraphPanel.DeleteAllChildren(false);

            demo.Initialize(m_ZedGraphPanel);

            demo.ZedGraphControl.Parent = null;
            demo.ZedGraphControl.Parent = m_ZedGraphPanel;

            demo.ZedGraphControl.Size = m_ZedGraphPanel.InnerBounds.Size;
            demo.ZedGraphControl.Dock = Pos.Fill;

            m_Caption.Text = TitlePrefix + demo.Title;

            m_InfoBox.Text     = demo.Description;
            m_InfoBox.IsHidden = string.IsNullOrEmpty(m_InfoBox.Text);

            // tell the control to rescale itself
            demo.ZedGraphControl.AxisChange();
        }