Example #1
0
        static public UINodeInfoInTree LargestLabelInSubtree(
            this UINodeInfoInTree rootNode,
            int?tiifeMax = null)
        {
            var mengeLabelSictbar =
                rootNode.MatchingNodesFromSubtreeBreadthFirst(kandidaat => kandidaat.GbsAstTypeIstLabel(), null, tiifeMax);

            UINodeInfoInTree bisherBeste = null;

            foreach (var LabelAst in mengeLabelSictbar.EmptyIfNull())
            {
                var labelAstGrööse = LabelAst?.Grööse;

                if (!labelAstGrööse.HasValue)
                {
                    continue;
                }

                if ((bisherBeste?.Grööse.Value.BetraagQuadriirt ?? -1) < labelAstGrööse.Value.BetraagQuadriirt)
                {
                    bisherBeste = LabelAst;
                }
            }

            return(bisherBeste);
        }
        static public Menu ReadMenu(UINodeInfoInTree menuNode)
        {
            if (!(menuNode?.VisibleIncludingInheritance ?? false))
            {
                return(null);
            }

            var setEntryNode =
                menuNode.MatchingNodesFromSubtreeBreadthFirst(
                    kandidaat => kandidaat?.PyObjTypNameMatchesRegexPatternIgnoreCase(MenuEntryPyTypeName) ?? false,
                    null, 3, 1);

            var baseElement = menuNode.AsUIElementIfVisible();

            var setEntry =
                setEntryNode
                ?.Select(kandidaatAst => ReadMenuEntry(kandidaatAst, baseElement?.Region ?? RectInt.Empty)).ToArray();

            var listEntry = setEntry?.OrdnungLabel()?.ToArray();

            return(new Menu(baseElement)
            {
                Entry = listEntry,
            });
        }
Example #3
0
        static public Vektor2DSingle?GrööseAusListeChildFürScpezUIRootBerecne(
            this UINodeInfoInTree Ast)
        {
            if (null == Ast)
            {
                return(null);
            }

            var ListeChild = Ast.ListChild;

            if (null != ListeChild)
            {
                foreach (var Child in ListeChild)
                {
                    var ChildGrööse = Child.Grööse;

                    if (ChildGrööse.HasValue)
                    {
                        if (UIRootVorgaabeGrööseListeName.Any((AstNaame) => string.Equals(AstNaame, Child.Name)))
                        {
                            return(ChildGrööse);
                        }
                    }
                }
            }

            return(null);
        }
        static public MarketOrderEntry MarketOrderEntryKonstrukt(
            UINodeInfoInTree entryAst,
            IColumnHeader[] listeScrollHeader,
            RectInt?regionConstraint)
        {
            if (!(entryAst?.VisibleIncludingInheritance ?? false))
            {
                return(null);
            }

            var ChildTransitive = entryAst.MengeChildAstTransitiiveHüle()?.ToArray();

            var ListEntryAuswert = new SictAuswertGbsListEntry(entryAst, listeScrollHeader, regionConstraint, ListEntryTrenungZeleTypEnum.InLabelTab);

            ListEntryAuswert.Berecne();

            var ListEntry = ListEntryAuswert.ErgeebnisListEntry;

            if (null == ListEntry)
            {
                return(null);
            }

            return(new MarketOrderEntry(ListEntry));
        }
Example #5
0
 public SictAuswertGbsPanelGroup(
     UINodeInfoInTree PanelGroupAst,
     string ContainerMengeEntryName = "Container")
 {
     this.PanelGroupAst           = PanelGroupAst;
     this.ContainerMengeEntryName = ContainerMengeEntryName;
 }
Example #6
0
        static public KeyValuePair <Int64, string>?AusGbsAstIconMitTextIconIdentUndText(
            UINodeInfoInTree gbsAst)
        {
            if (null == gbsAst)
            {
                return(null);
            }

            var iconAst =
                gbsAst?.FirstMatchingNodeFromSubtreeBreadthFirst(AuswertGbs.Glob.GbsAstTypeIstEveIcon, 2, 1);

            var textAst =
                gbsAst?.FirstMatchingNodeFromSubtreeBreadthFirst(AuswertGbs.Glob.GbsAstTypeIstEveLabel, 2, 1);

            var iconIdentNulbar = iconAst?.PyObjAddress;

            if (!iconIdentNulbar.HasValue)
            {
                return(null);
            }

            var text = textAst?.LabelText();

            return(new KeyValuePair <Int64, string>(iconIdentNulbar.Value, text));
        }
Example #7
0
 static public UINodeInfoInTree FirstMatchingNodeFromSubtreeBreadthFirst(
     this UINodeInfoInTree rootNode,
     Func <UINodeInfoInTree, bool> predicate,
     int?depthBoundMax = null,
     int?depthBoundMin = null) =>
 rootNode?.MatchingNodesFromSubtreeBreadthFirst(predicate, 1, depthBoundMax, depthBoundMin, true)
 ?.FirstOrDefault();
Example #8
0
 static public IEnumerable <ISprite> SetSpriteFromChildren(
     this UINodeInfoInTree uiNode,
     bool treatIconAsSprite = false) =>
 uiNode?.MatchingNodesFromSubtreeBreadthFirst(c =>
                                              (c?.PyObjTypNameIsSprite() ?? false) ||
                                              (treatIconAsSprite && (c?.PyObjTypNameIsIcon() ?? false)), null, null, null, true)
 ?.Select(spriteNode => spriteNode?.AlsSprite())
 ?.WhereNotDefault();
 public SictAuswertGbsWindowOverviewZaile(
     UINodeInfoInTree FensterOverviewZaile,
     string WindowOverviewTypeSelectionName,
     IEnumerable <KeyValuePair <string, KeyValuePair <int, int> > > MengeSortHeaderTitelUndLaage)
 {
     this.WindowOverviewZaile             = FensterOverviewZaile;
     this.WindowOverviewTypeSelectionName = WindowOverviewTypeSelectionName;
     this.MengeSortHeaderTitelUndLaage    = MengeSortHeaderTitelUndLaage;
 }
Example #10
0
        /// <summary>
        /// Diis werd verwand mit LayerUtilmenu, daher prüüfung Sictbarkait nit ausraicend.
        /// </summary>
        /// <param name="GbsAst"></param>
        /// <returns></returns>
        static public IContainer AlsUtilmenu(this UINodeInfoInTree GbsAst)
        {
            //	2015.09.08:	PyObjTypName	= "ExpandedUtilMenu"

            var AstExpanded =
                GbsAst?.FirstMatchingNodeFromSubtreeBreadthFirst(k => k.PyObjTypNameMatchesRegexPatternIgnoreCase("ExpandedUtilMenu"));

            return(AstExpanded?.AlsContainer());
        }
Example #11
0
 static public UINodeInfoInTree FirstNodeWithPyObjAddressFromSubtreeBreadthFirst(
     this UINodeInfoInTree node,
     Int64?pyObjAddress,
     int?depthBoundMax = null,
     int?depthBoundMin = null) =>
 node.FirstMatchingNodeFromSubtreeBreadthFirst(
     kandidaat => kandidaat.PyObjAddress == pyObjAddress,
     depthBoundMax,
     depthBoundMin);
        virtual public void Berecne(
            UINodeInfoInTree[]      MengeKandidaatUtilmenuAst)
        {
            if (null == AstLayerUtilmenu)
            {
                return;
            }

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

            AstHeader =
                Optimat.EveOnline.AuswertGbs.Extension.FirstMatchingNodeFromSubtreeBreadthFirst(
                    AstLayerUtilmenu,
                    (Kandidaat) => Kandidaat.PyObjTypNameIsContainer(), 2, 1);

            AstExpandedUtilMenu =
                Optimat.EveOnline.AuswertGbs.Extension.FirstMatchingNodeFromSubtreeBreadthFirst(
                    AstLayerUtilmenu,
                    (Kandidaat) => string.Equals("ExpandedUtilMenu", Kandidaat.PyObjTypName, StringComparison.InvariantCultureIgnoreCase), 2, 1);

            if (null == AstExpandedUtilMenu)
            {
                return;
            }

            var AstExpandedUtilMenuLaagePlusVonParentErbeLaage = AstExpandedUtilMenu.LaagePlusVonParentErbeLaage();

            if (!AstExpandedUtilMenuLaagePlusVonParentErbeLaage.HasValue)
            {
                return;
            }

            UINodeInfoInTree UtilmenuGbsAst = null;

            if (null != MengeKandidaatUtilmenuAst)
            {
                UtilmenuGbsAst = MengeKandidaatUtilmenuAst.FirstOrDefault((Kandidaat) => KandidaatUtilmenuLaagePasendZuExpandedUtilmenu(AstExpandedUtilMenu, Kandidaat));
            }

            AstHeaderLabel =
                Optimat.EveOnline.AuswertGbs.Extension.FirstMatchingNodeFromSubtreeBreadthFirst(
                    UtilmenuGbsAst,
                    (Kandidaat) => string.Equals("EveLabelMedium", Kandidaat.PyObjTypName, StringComparison.InvariantCultureIgnoreCase), 2, 1);

            if (null != AstHeaderLabel)
            {
                Header = new UIElementText(AstHeaderLabel.AsUIElementIfVisible(), AstHeaderLabel.LabelText());
            }

            if (null != Header)
            {
                MenuTitel = Header.Text;
            }
        }
		public SictAuswertGbsListEntry(
			UINodeInfoInTree entryAst,
			IColumnHeader[] listeScrollHeader,
			RectInt? regionConstraint,
			ListEntryTrenungZeleTypEnum? trenungZeleTyp = null)
		{
			EntryAst = entryAst;
			ListeColumnHeader = listeScrollHeader;
			RegionConstraint = regionConstraint;
			TrenungZeleTyp = trenungZeleTyp;
		}
		static public ListViewAndControl<EntryT> ReadListView(
			UINodeInfoInTree listViewNode,
			Func<UINodeInfoInTree, IColumnHeader[], RectInt?, EntryT> callbackListEntryConstruct,
			ListEntryTrenungZeleTypEnum? inEntryTrenungZeleTyp = null)
		{
			var auswert = new SictAuswertGbsListViewport<EntryT>(listViewNode, callbackListEntryConstruct, inEntryTrenungZeleTyp);

			auswert.Read();

			return auswert.Result;
		}
Example #15
0
 static public Sprite AlsSprite(
     this UINodeInfoInTree GbsAst) =>
 !(GbsAst?.VisibleIncludingInheritance ?? false) ? null :
 new Sprite(GbsAst.AsUIElementIfVisible())
 {
     Name        = GbsAst?.Name,
     Color       = GbsAst?.Color.AsColorORGBIfAnyHasValue(),
     Texture0Id  = GbsAst?.TextureIdent0?.AsObjectIdInMemory(),
     HintText    = GbsAst?.Hint,
     TexturePath = GbsAst?.texturePath,
 };
Example #16
0
        static public bool EnthaltAst(
            this UINodeInfoInTree suuceWurzel,
            UINodeInfoInTree node)
        {
            if (null == node)
            {
                return(false);
            }

            return(suuceWurzel?.AstEnthalteInBaum(node, zuZerleegende => zuZerleegende.ListChild) ?? false);
        }
		public SictAuswertGbsListViewport(
			UINodeInfoInTree listViewNode,
			Func<UINodeInfoInTree, IColumnHeader[], RectInt?, EntryT> callbackListEntryConstruct,
			ListEntryTrenungZeleTypEnum? inEntryTrenungZeleTyp = null)
		{
			this.ListViewNode = listViewNode;

			this.CallbackListEntryConstruct = callbackListEntryConstruct;

			this.InEntryTrenungZeleTyp = inEntryTrenungZeleTyp;
		}
        static public ChatParticipantEntry ListEntryParticipantConstruct(
            UINodeInfoInTree ast,
            IColumnHeader[] listHeader,
            RectInt?regionConstraint)
        {
            var ListEntry = SictAuswertGbsListViewport <IListEntry> .ListEntryKonstruktSctandard(ast, listHeader, regionConstraint);

            if (null == ListEntry)
            {
                return(null);
            }

            var StatusIconSprite =
                ast.MengeChildAstTransitiiveHüle()
                ?.OfType <UINodeInfoInTree>()
                ?.FirstOrDefault(k => k.PyObjTypNameIsSprite() && (k.PyObjTypName?.ToLower().Contains("status") ?? false))
                ?.AlsSprite();

            var SetFlagWithStateIconNode =
                ast?.MengeChildAstTransitiiveHüle()
                ?.OfType <UINodeInfoInTree>()
                ?.Where(k => k?.PyObjTypNameMatchesRegexPatternIgnoreCase("FlagIconWithState") ?? false)
                ?.ToArray();

            var SetFlagWithStateIcon =
                SetFlagWithStateIconNode
                ?.Select(flagNode =>
            {
                var FlagIcon = flagNode.AlsSprite();

                var childSprite =
                    flagNode?.MengeChildAstTransitiiveHüle()?.OfType <UINodeInfoInTree>()
                    ?.Where(k => k.PyObjTypNameIsSprite())
                    ?.Select(k => k?.AlsSprite())?.WhereNotDefault()?.FirstOrDefault();

                if (null != FlagIcon)
                {
                    FlagIcon.Texture0Id  = FlagIcon.Texture0Id ?? childSprite?.Texture0Id;
                    FlagIcon.TexturePath = FlagIcon.TexturePath ?? childSprite?.TexturePath;
                    FlagIcon.Color       = FlagIcon.Color ?? childSprite?.Color;
                }

                return(FlagIcon);
            })
                ?.WhereNotDefault()
                ?.ToArrayIfNotEmpty();

            return(new ChatParticipantEntry(ListEntry)
            {
                NameLabel = ast.LargestLabelInSubtree().AsUIElementTextIfTextNotEmpty(),
                StatusIcon = StatusIconSprite,
                FlagIcon = SetFlagWithStateIcon,
            });
        }
Example #19
0
 static public IEnumerable <UINodeInfoInTree> BaumEnumFlacListeKnoote(
     this UINodeInfoInTree suuceWurzel,
     int?tiifeMax = null,
     int?tiifeMin = null)
 {
     return
         (suuceWurzel.EnumerateNodeFromTreeBFirst(
              node => node?.GetListChild()?.OfType <UINodeInfoInTree>(),
              tiifeMax,
              tiifeMin));
 }
Example #20
0
        static public bool GbsAstTypeIstSprite(UINodeInfoInTree uiNode)
        {
            var PyObjTypName = uiNode?.PyObjTypName;

            if (PyObjTypName.IsNullOrEmpty())
            {
                return(false);
            }

            return(Regex.Match(PyObjTypName, "Sprite", RegexOptions.IgnoreCase).Success);
        }
Example #21
0
        static public Vektor2DSingle?LaagePlusVonParentErbeLaage(
            this UINodeInfoInTree node)
        {
            var VonParentErbeLaage = node?.FromParentLocation;

            if (!VonParentErbeLaage.HasValue)
            {
                return(node.LaageInParent);
            }

            return(node.LaageInParent + VonParentErbeLaage);
        }
Example #22
0
        static public IUIElementText AsUIElementTextIfTextNotEmpty(
            this UINodeInfoInTree GbsAst)
        {
            var UIElementText = GbsAst?.AsUIElementText();

            if ((UIElementText?.Text).IsNullOrEmpty())
            {
                return(null);
            }

            return(UIElementText);
        }
Example #23
0
        MengeSortHeaderTitelUndLaageBerecneAusSortHeaderAst(
            UINodeInfoInTree inTabSortHeadersAst)
        {
            if (null == inTabSortHeadersAst)
            {
                return(null);
            }

            var Liste = new List <KeyValuePair <string, KeyValuePair <int, int> > >();

            var MengeKandidaatSortHeaderAst =
                inTabSortHeadersAst.MatchingNodesFromSubtreeBreadthFirst(
                    (kandidaat) => kandidaat.PyObjTypNameIsContainer(),
                    null,
                    3,
                    1,
                    false);

            foreach (var KandidaatSortHeaderAst in MengeKandidaatSortHeaderAst)
            {
                var KandidaatSortHeaderAstLaage  = KandidaatSortHeaderAst.LaageInParent;
                var KandidaatSortHeaderAstGrööse = KandidaatSortHeaderAst.Grööse;

                if (!KandidaatSortHeaderAstLaage.HasValue ||
                    !KandidaatSortHeaderAstGrööse.HasValue)
                {
                    continue;
                }

                var KandidaatSortHeaderAstLaageLinx   = (int)((KandidaatSortHeaderAstLaage).Value.A);
                var KandidaatSortHeaderAstLaageRecz   = (int)((KandidaatSortHeaderAstLaage + KandidaatSortHeaderAstGrööse).Value.A);
                var KandidaatSortHeaderAstLaageBraite = KandidaatSortHeaderAstLaageRecz - KandidaatSortHeaderAstLaageLinx;

                var LabelAst =
                    KandidaatSortHeaderAst.FirstMatchingNodeFromSubtreeBreadthFirst(
                        (kandidaatLabelAst) => AuswertGbs.Glob.GbsAstTypeIstLabel(kandidaatLabelAst) && true == kandidaatLabelAst.VisibleIncludingInheritance,
                        1);

                var ScpalteTitel = LabelAst?.LabelText();

                if (ScpalteTitel.IsNullOrEmpty())
                {
                    continue;
                }

                Liste.Add(new KeyValuePair <string, KeyValuePair <int, int> >(
                              ScpalteTitel,
                              new KeyValuePair <int, int>(KandidaatSortHeaderAstLaageLinx, KandidaatSortHeaderAstLaageBraite)));
            }

            return(Liste.ToArray());
        }
        static int?AusDroneEntryGaugeTreferpunkteRelMili(
            UINodeInfoInTree droneEntryGaugeAst)
        {
            var MengeFillAst =
                droneEntryGaugeAst.MatchingNodesFromSubtreeBreadthFirst(
                    kandidaat => true == kandidaat.VisibleIncludingInheritance && "Fill".EqualsIgnoreCase(kandidaat.PyObjTypName),
                    null,
                    1, 1,
                    true);

            if (null == MengeFillAst)
            {
                return(null);
            }

            var BarDamageNictAst =
                MengeFillAst
                ?.Where(kandidaat => "droneGaugeBar".EqualsIgnoreCase(kandidaat.Name))
                ?.FirstOrDefault();

            var BarDamageAst =
                MengeFillAst
                ?.Where(kandidaat => "droneGaugeBarDmg".EqualsIgnoreCase(kandidaat.Name))
                ?.FirstOrDefault();

            if (null == BarDamageNictAst || null == BarDamageAst)
            {
                return(null);
            }

            var BarDamageAstGrööse     = BarDamageAst.Grööse;
            var BarDamageNictAstGrööse = BarDamageNictAst.Grööse;

            if (!BarDamageAstGrööse.HasValue || !BarDamageNictAstGrööse.HasValue)
            {
                return(null);
            }

            var TreferpunkteAntail     = (int)BarDamageNictAstGrööse.Value.A;
            var TreferpunkteNictAntail = (int)BarDamageAstGrööse.Value.A;

            var GesamtGrööse = TreferpunkteAntail + TreferpunkteNictAntail;

            if (GesamtGrööse < 1)
            {
                return(null);
            }

            var TreferpunkteNormiirtMili = (TreferpunkteAntail * 1000) / GesamtGrööse;

            return(TreferpunkteNormiirtMili);
        }
		static public IColumnHeader Read(UINodeInfoInTree ColumnHeaderAst)
		{
			if (!(ColumnHeaderAst?.VisibleIncludingInheritance ?? false))
				return null;

			var container = ColumnHeaderAst?.AlsContainer(
				treatIconAsSprite: true);

			if (null == container)
				return null;

			return new ColumnHeader(container);
		}
        new static public WindowSelectedItemView BerecneFürWindowAst(
            UINodeInfoInTree windowAst)
        {
            if (null == windowAst)
            {
                return(null);
            }

            var WindowAuswert = new SictAuswertGbsWindowSelectedItem(windowAst);

            WindowAuswert.Berecne();

            return(WindowAuswert.ErgeebnisScpez);
        }
Example #27
0
        new static public WindowOverView BerecneFürWindowAst(
            UINodeInfoInTree windowNode)
        {
            if (null == windowNode)
            {
                return(null);
            }

            var windowAuswert = new SictAuswertGbsWindowOverview(windowNode);

            windowAuswert.Berecne();

            return(windowAuswert.ErgeebnisScpez);
        }
Example #28
0
 static public UINodeInfoInTree[] MatchingNodesFromSubtreeBreadthFirst(
     this UINodeInfoInTree rootNode,
     Func <UINodeInfoInTree, bool> predicate,
     int?resultCountMax = null,
     int?depthBoundMax  = null,
     int?depthBoundMin  = null,
     bool omitNodesBelowNodesMatchingPredicate = false) =>
 rootNode.ListPathToNodeFromSubtreeBreadthFirst(
     predicate,
     resultCountMax,
     depthBoundMax,
     depthBoundMin,
     omitNodesBelowNodesMatchingPredicate)
 ?.Select(astMitPfaad => astMitPfaad.LastOrDefault()).ToArray();
Example #29
0
        static public IInSpaceBracket AsInSpaceBracket(this UINodeInfoInTree node)
        {
            var container = node?.AlsContainer();

            if (null == container)
            {
                return(null);
            }

            return(new InSpaceBracket(container)
            {
                Name = node.Name,
            });
        }
Example #30
0
 static public IEnumerable <IUIElementText> ExtraktMengeButtonLabelString(
     this UINodeInfoInTree GbsAst) =>
 GbsAst?.MatchingNodesFromSubtreeBreadthFirst(kandidaat => (kandidaat?.VisibleIncludingInheritance ?? false) &&
                                              Regex.Match(kandidaat?.PyObjTypName ?? "", "button", RegexOptions.IgnoreCase).Success)
 ?.Select(kandidaatButtonAst => new { ButtonAst = kandidaatButtonAst, LabelAst = kandidaatButtonAst.LargestLabelInSubtree() })
 ?.GroupBy(buttonAstUndLabelAst => buttonAstUndLabelAst.LabelAst)
 ?.Select(GroupLabelAst => new
 {
     ButtonAst = GroupLabelAst.Select(buttonAstUndLabelAst => buttonAstUndLabelAst.ButtonAst).OrderBy(kandidaatButtonAst => kandidaatButtonAst.InTreeIndex).LastOrDefault(),
     LabelAst  = GroupLabelAst.Key
 })
 ?.Select(buttonAstUndLabelAst => new UIElementText(buttonAstUndLabelAst.ButtonAst.AsUIElementIfVisible(),
                                                    buttonAstUndLabelAst?.LabelAst?.LabelText()))
 ?.Where(kandidaat => !(kandidaat?.Text).IsNullOrEmpty());