示例#1
0
        virtual public void Berecne()
        {
            if (null == TabAst)
            {
                return;
            }

            if (!(true == TabAst.VisibleIncludingInheritance))
            {
                return;
            }

            LabelAst = TabAst.LargestLabelInSubtree(3);

            if (null == LabelAst)
            {
                return;
            }

            LabelColor = ColorORGB.VonVal(LabelAst.Color);
            LabelText  = LabelAst.LabelText();

            if (null == LabelText || null == LabelColor)
            {
                return;
            }

            var LabelColorOpazitäätMili = LabelColor.OMilli;

            var Label = new UIElementText(LabelAst.AsUIElementIfVisible(), LabelText);

            Ergeebnis = new Tab(TabAst.AsUIElementIfVisible())
            {
                Label = Label,
                LabelColorOpacityMilli = LabelColorOpazitäätMili,
            };
        }
        public void Berecne()
        {
            var TreeViewEntryAst = this.TreeViewEntryAst;

            if (null == TreeViewEntryAst)
            {
                return;
            }

            TopContAst =
                Optimat.EveOnline.AuswertGbs.Extension.FirstMatchingNodeFromSubtreeBreadthFirst(
                    TreeViewEntryAst, (Kandidaat) =>
                    Kandidaat.PyObjTypNameIsContainer() &&
                    string.Equals("topCont", Kandidaat.Name, StringComparison.InvariantCultureIgnoreCase),
                    2, 1);

            TopContLabelAst =
                Optimat.EveOnline.AuswertGbs.Extension.FirstMatchingNodeFromSubtreeBreadthFirst(
                    TopContAst, (Kandidaat) => AuswertGbs.Glob.GbsAstTypeIstLabel(Kandidaat));

            ChildContAst =
                Optimat.EveOnline.AuswertGbs.Extension.FirstMatchingNodeFromSubtreeBreadthFirst(
                    TreeViewEntryAst, (Kandidaat) =>
                    Kandidaat.PyObjTypNameIsContainer() &&
                    string.Equals("childCont", Kandidaat.Name, StringComparison.InvariantCultureIgnoreCase),
                    2, 1);

            MengeChildAst =
                Optimat.EveOnline.AuswertGbs.Extension.MatchingNodesFromSubtreeBreadthFirst(
                    ChildContAst, (Kandidaat) =>
                    Regex.Match(Kandidaat.PyObjTypName ?? "", "TreeViewEntry", RegexOptions.IgnoreCase).Success,
                    null, 2, 1);

            TopContIconAst =
                Optimat.EveOnline.AuswertGbs.Extension.FirstMatchingNodeFromSubtreeBreadthFirst(
                    TopContAst, (Kandidaat) =>
                    (string.Equals("Icon", Kandidaat.PyObjTypName, StringComparison.InvariantCultureIgnoreCase) ||
                     string.Equals("EveIcon", Kandidaat.PyObjTypName, StringComparison.InvariantCultureIgnoreCase)),
                    2, 1);

            var TopContSpacerAst =
                Optimat.EveOnline.AuswertGbs.Extension.FirstMatchingNodeFromSubtreeBreadthFirst(
                    TopContAst, (Kandidaat) =>
                    Kandidaat.PyObjTypNameIsContainer() &&
                    string.Equals("spacerCont", Kandidaat.Name, StringComparison.InvariantCultureIgnoreCase),
                    2, 1);

            var ExpandCollapseToggleFläce = TopContSpacerAst.AsUIElementIfVisible();

            LabelAst = TopContLabelAst;

            if (null != MengeChildAst)
            {
                MengeChildAuswert =
                    MengeChildAst
                    .Select((Ast) =>
                {
                    var Auswert = new SictAuswertTreeViewEntry(Ast);
                    Auswert.Berecne();
                    return(Auswert);
                }).ToArray();
            }

            IUIElement TopContFläce =
                (null == TopContAst) ? null : new UIElement(
                    TopContAst.AsUIElementIfVisible());

            var TopContLabel =
                (null == TopContLabelAst) ? null : new UIElementText(
                    TopContLabelAst.AsUIElementIfVisible(), TopContLabelAst.LabelText());

            var TopContIconTyp =
                (null == TopContIconAst) ? null : TopContIconAst.TextureIdent0;

            var TopContIconColor =
                (null == TopContIconAst) ? null : TopContIconAst.Color;

            var LabelText =
                (null == LabelAst) ? null : LabelAst.LabelText();

            var MengeChild =
                (null == MengeChildAuswert) ? null :
                MengeChildAuswert
                .Select((Auswert) => Auswert.Ergeebnis)
                .Where((Kandidaat) => null != Kandidaat)
                .ToArray();

            var Ergeebnis = new TreeViewEntry(TreeViewEntryAst.AlsContainer())
            {
                ExpandToggleButton = ExpandCollapseToggleFläce,
                Child      = MengeChild,
                IsSelected = TreeViewEntryAst?.isSelected,
            };

            this.Ergeebnis = Ergeebnis;
        }