Exemplo n.º 1
0
        private void AddToTreeList(IVehicleComponent vehicleComponent)
        {
            DesignTreeListView.BeginUnboundLoad();

            TreeListNode ParentNodeForRoot = null;

            if (BodyNeedsToAdd)
            {
                ParentNodeForRoot = DesignTreeListView.Nodes[0].Nodes[0].Nodes[0];
            }
            else if (SpringNeedsToAdd)
            {
                ParentNodeForRoot = DesignTreeListView.Nodes[0].Nodes[0].Nodes[1];
            }
            else if (DamperNeedsToAdd)
            {
                ParentNodeForRoot = DesignTreeListView.Nodes[0].Nodes[0].Nodes[2];
            }

            TreeListNode NewBody = DesignTreeListView.AppendNode(new object[] { null }, ParentNodeForRoot, vehicleComponent);

            ParentNodeForRoot.LastNode.SetValue(DesignTreeListColumn, vehicleComponent.Name);

            DesignTreeListView.EndUnboundLoad();

            DesignTreeListView.ExpandAll();

            BodyNeedsToAdd   = false;
            SpringNeedsToAdd = false;
            DamperNeedsToAdd = false;
        }
Exemplo n.º 2
0
 public MainForm()
 {
     InitializeComponent();
     ShowHomePage();
     DesignTreeListView.ExpandAll();
 }