Esempio n. 1
0
        void ExamplesTreeView_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs <object> e)
        {
            NExampleTreeNode treeNode = ExamplesTreeView.SelectedItem as NExampleTreeNode;

            nChartControl.Document.Clear();
            nChartControl.BackgroundStyle.FrameStyle.Visible = false;
            nChartControl.Controller.Tools.Clear();
            nChartControl.Controller.Selection.Clear();
            ExampleUCPlaceHolder.Children.Clear();
            DescriptionPlaceHolder.Children.Clear();

            if (m_PrevExample != null)
            {
                m_PrevExample.Destroy();
                m_PrevExample = null;
            }

            if (treeNode == null || treeNode.UserControlType == null)
            {
                return;
            }

            NExampleBaseUC exampleUC = (NExampleBaseUC)Activator.CreateInstance(treeNode.UserControlType);

            ExampleUCPlaceHolder.Children.Add(exampleUC);

            exampleUC.nChartControl1 = nChartControl;
//			exampleUC.Create();
            m_PrevExample = exampleUC;

            CreateDescriptionTextBox(exampleUC.Title, Color.FromArgb(255, 255, 158, 0), 16);
            CreateDescriptionTextBox(exampleUC.Description, Color.FromArgb(255, 255, 255, 255), 14);
        }
Esempio n. 2
0
 /// <summary>
 /// Initializer constructor
 /// </summary>
 /// <param name="name"></param>
 /// <param name="node"></param>
 public NExampleLinkTreeNode(string name, NExampleTreeNode node)
     : base(name)
 {
     m_ExampleNode = node;
     UpdateImage();
 }