상속: System.Windows.Forms.TreeNode
예제 #1
0
        private void ChangeParent(SmartQuant.Portfolio portfolio)
        {
            if (!this.nodes.ContainsKey(portfolio.Name))
            {
                return;
            }
            PortfolioNode portfolioNode = this.nodes[portfolio.Name];

            portfolioNode.Remove();
            this.nodes[portfolio.Parent.Name].Nodes.Add((TreeNode)portfolioNode);
        }
예제 #2
0
        private void AddPortfolio(SmartQuant.Portfolio portfolio)
        {
            if (this.nodes.ContainsKey(portfolio.Name))
            {
                return;
            }
            PortfolioNode portfolioNode = new PortfolioNode(portfolio.Name);

            this.nodes[portfolio.Name] = portfolioNode;
            if (portfolio.Parent == null)
            {
                this.trvPortfolios.Nodes.Add((TreeNode)portfolioNode);
            }
            else
            {
                this.nodes[portfolio.Parent.Name].Nodes.Add((TreeNode)portfolioNode);
            }
        }
예제 #3
0
 private void AddPortfolio(SmartQuant.Portfolio portfolio)
 {
   if (this.nodes.ContainsKey(portfolio.Name))
     return;
   PortfolioNode portfolioNode = new PortfolioNode(portfolio.Name);
   this.nodes[portfolio.Name] = portfolioNode;
   if (portfolio.Parent == null)
     this.trvPortfolios.Nodes.Add((TreeNode) portfolioNode);
   else
     this.nodes[portfolio.Parent.Name].Nodes.Add((TreeNode) portfolioNode);
 }