Exemple #1
0
        public new TripleTreeNode Clone()
        {
            TripleTreeNode n = null;

            switch (this.NodeType)
            {
            case TripleTreeNodeType.YearDateTimeNode:
                n = TripleTreeNode.CreateYearNode(this.Text, this.Value, this.checkState);
                break;

            case TripleTreeNodeType.MonthDateTimeNode:
                n = TripleTreeNode.CreateMonthNode(this.Text, this.Value, this.checkState);
                break;

            case TripleTreeNodeType.DayDateTimeNode:
                n = TripleTreeNode.CreateDayNode(this.Text, this.Value, this.checkState);
                break;

            case TripleTreeNodeType.HourDateTimeNode:
                n = TripleTreeNode.CreateHourNode(this.Text, this.Value, this.checkState);
                break;

            case TripleTreeNodeType.MinDateTimeNode:
                n = TripleTreeNode.CreateMinNode(this.Text, this.Value, this.checkState);
                break;

            case TripleTreeNodeType.SecDateTimeNode:
                n = TripleTreeNode.CreateSecNode(this.Text, this.Value, this.checkState);
                break;

            case TripleTreeNodeType.MSecDateTimeNode:
                n = TripleTreeNode.CreateMSecNode(this.Text, this.Value, this.checkState);
                break;

            case TripleTreeNodeType.EmptysNode:
                n = TripleTreeNode.CreateEmptysNode(this.Text, this.checkState);
                break;

            case TripleTreeNodeType.AllsNode:
                n = TripleTreeNode.CreateAllsNode(this.Text, this.checkState);
                break;

            default:
                n = TripleTreeNode.CreateNode(this.Text, this.Value, this.checkState);
                break;
            }

            n.NodeFont = this.NodeFont;

            if (this.GetNodeCount(false) > 0)
            {
                foreach (TripleTreeNode child in this.Nodes)
                {
                    n.AddChild(child.Clone());
                }
            }

            return(n);
        }
Exemple #2
0
        public TripleTreeNode CreateChildNode(String Text, object Value, CheckState State = CheckState.Checked)
        {
            TripleTreeNode n = null;

            switch (this.NodeType)
            {
            case TripleTreeNodeType.YearDateTimeNode:
                n = TripleTreeNode.CreateMonthNode(Text, Value, State);
                break;

            case TripleTreeNodeType.MonthDateTimeNode:
                n = TripleTreeNode.CreateDayNode(Text, Value, State);
                break;

            case TripleTreeNodeType.DayDateTimeNode:
                n = TripleTreeNode.CreateHourNode(Text, Value, State);
                break;

            case TripleTreeNodeType.HourDateTimeNode:
                n = TripleTreeNode.CreateMinNode(Text, Value, State);
                break;

            case TripleTreeNodeType.MinDateTimeNode:
                n = TripleTreeNode.CreateSecNode(Text, Value, State);
                break;

            case TripleTreeNodeType.SecDateTimeNode:
                n = TripleTreeNode.CreateMSecNode(Text, Value, State);
                break;

            default:
                n = null;
                break;
            }

            if (n != null)
            {
                this.AddChild(n);
            }

            return(n);
        }
Exemple #3
0
 private void AddChild(TripleTreeNode child)
 {
     child.Parent = this;
     this.Nodes.Add(child);
 }