Exemple #1
0
//		public List<EventTest3> Ev2List { get; private set; } = null;

        public EventTestMgr()
        {
            Root      = new EventTest3(0, 0, 0, 0, 0, true);
            Root.Name = "Root (" + Root.Name + ")";

            MakeChildren(Root, 1, 0, Root.childList);

            First      = new EventTest4(0, 0, 0, 0, 0, true);
            First.Name = "First  (" + First.Name + ")";

            MakeChildren(First, 1, 0, First.childList);

            Origin = new TreeNode5();
            Origin.Configure(null, 0, 0, true, true);
            Origin.Name = "Origin";

            TreeNode5 Top = new TreeNode5();

            Top.Configure(Origin, 1, 1, true, true);
            Top.Name = "First Element";

            Origin.AddChild(Top);

            MakeChildren(Top, 1, Top.Children);

            Trunk = new Branch();

            Tests();
        }
Exemple #2
0
        private void ListItem(EventTest3 et3, string title)
        {
            int offset = 4;

            MainWin.AppendMessageTbk2(nl);

            DebugPrint(CheckedStateSymbol(et3.SelectState) + " " +
                       et3.NodeType.ToString().PadRight(7) + "| " + title, "chk count| " + et3.CheckedCount +
                       (et3.NodeType == NodeType.BRANCH ? " :: children| " + et3.childList?.Count ?? "none" : "")
                       , 0, offset);
            DebugPrint("", et3.SelectState + " :: orig| "
                       + et3.SelectStateOriginal, offset, 0);
        }
Exemple #3
0
        private void ListTree(EventTest3 et3)
        {
            ListItem(et3, et3.Name);
            depth++;

            foreach (EventTest3 ev3 in et3.childList)
            {
                ListItem(ev3, ev3.Name);
            }

            foreach (EventTest3 ev3 in et3.childList)
            {
                if (ev3.NodeType == NodeType.BRANCH)
                {
                    depth++;
                    ListTree(ev3);
                    depth--;
                }
            }

            depth--;
        }