private void InitElement(UIElementText element, string val, bool textiskey) { element.Show(!string.IsNullOrEmpty(val)); if (!string.IsNullOrEmpty(val)) { element.SetText(val, textiskey); } }
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 override void LoadUI(Dictionary <string, string> plist = null) { base.LoadUI(plist); m_YesBtn = FindElement("PfDlgBtnYes") as UIElementText; m_NoBtn = FindElement("PfDlgBtnNo") as UIElementText; m_OkBtn = FindElement("PfDlgBtnOk") as UIElementText; m_Title = FindElement("PfDlgTitle") as UIElementText; m_Desc = FindElement("PfDlgDesc") as UIElementText; if (plist != null) { bool textiskey = plist.ContainsKey("tkey"); InitDlgBox(GetStringFromDict(plist, "title"), GetStringFromDict(plist, "desc"), GetStringFromDict(plist, "yes"), GetStringFromDict(plist, "no"), GetStringFromDict(plist, "ok"), textiskey); } }
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() { if (null == NeocomAst) { return; } if (!(true == NeocomAst.VisibleIncludingInheritance)) { return; } NeocomMainContAst = Optimat.EveOnline.AuswertGbs.Extension.FirstMatchingNodeFromSubtreeBreadthFirst( NeocomAst, (Kandidaat) => string.Equals("mainCont", Kandidaat.Name, StringComparison.InvariantCultureIgnoreCase), 2, 1); NeocomMainContButtonContAst = Optimat.EveOnline.AuswertGbs.Extension.FirstMatchingNodeFromSubtreeBreadthFirst( NeocomMainContAst, (Kandidaat) => string.Equals("buttonCont", Kandidaat.Name, StringComparison.InvariantCultureIgnoreCase), 2, 1); var EveMenuButton = NeocomMainContAst?.FirstMatchingNodeFromSubtreeBreadthFirst(k => k.PyObjTypNameMatchesRegex(EveMenuButtonPyTypeRegex)) ?.AsUIElementIfVisible(); var CharButton = // 2015.08.23 ShipFitting+FittingManagement+Lobby.AgentEntry: Name = "charSheetBtn" NeocomMainContAst?.FirstMatchingNodeFromSubtreeBreadthFirst(k => k.PyObjTypNameIsButton() && k.NameMatchesRegexPatternIgnoreCase("charSheet")) ?.AsUIElementIfVisible(); var NeocomListButtonAst = NeocomMainContButtonContAst .MatchingNodesFromSubtreeBreadthFirst(k => k.PyObjTypNameIsButton()) ?.ToArray(); var NeocomListButton = NeocomListButtonAst ?.Where(ButtonAst => ButtonAst?.VisibleIncludingInheritance ?? false) ?.Select(ButtonAst => new UIElementText(ButtonAst.AsUIElementIfVisible(), ButtonAst?.Name)) ?.OrdnungLabel() ?.ToArray(); var Button = NeocomListButtonAst ?.Select(ButtonAst => ButtonAst?.FirstMatchingNodeFromSubtreeBreadthFirst(k => k.PyObjTypNameIsSprite())) ?.WhereNotDefault() ?.Select(Extension.AlsSprite) ?.OrdnungLabel() ?.ToArray(); NeocomClockLabelAst = Optimat.EveOnline.AuswertGbs.Extension.FirstMatchingNodeFromSubtreeBreadthFirst( NeocomMainContAst, (Kandidaat) => string.Equals("clockLabel", Kandidaat.Name, StringComparison.InvariantCultureIgnoreCase), 5, 1); if (null != NeocomClockLabelAst) { NeocomClockBescriftung = new UIElementText( NeocomClockLabelAst.AsUIElementIfVisible(), NeocomClockLabelAst.LabelText()?.RemoveXmlTag()); } NeocomCharContAst = Optimat.EveOnline.AuswertGbs.Extension.FirstMatchingNodeFromSubtreeBreadthFirst( NeocomMainContAst, (Kandidaat) => string.Equals("charCont", Kandidaat.Name, StringComparison.InvariantCultureIgnoreCase), 3, 1); Ergeebnis = new Neocom(NeocomAst.AsUIElementIfVisible()) { EveMenuButton = EveMenuButton, CharButton = CharButton, Button = Button, Clock = NeocomClockBescriftung, }; }