Exemplo n.º 1
0
        static public MenuEntry ReadMenuEntry(
            UINodeInfoInTree entryNode,
            RectInt regionConstraint)
        {
            if (!(entryNode?.VisibleIncludingInheritance ?? false))
            {
                return(null);
            }

            var fillAst =
                entryNode.FirstMatchingNodeFromSubtreeBreadthFirst(kandidaat => string.Equals("Fill", kandidaat.PyObjTypName, StringComparison.InvariantCultureIgnoreCase), 2, 1) ??
                entryNode.FirstMatchingNodeFromSubtreeBreadthFirst(kandidaat => Regex.Match(kandidaat.PyObjTypName ?? "", "Underlay", RegexOptions.IgnoreCase).Success, 2, 1);

            var fillColor = fillAst == null ? null : ColorORGB.VonVal(fillAst.Color);

            var entryHighlight =
                null != fillColor ? (200 < fillColor.OMilli) : (bool?)null;

            return(entryNode.MenuEntry(regionConstraint, entryHighlight));
        }
        public void Berecne()
        {
            LabelAst =
                Optimat.EveOnline.AuswertGbs.Extension.FirstMatchingNodeFromSubtreeBreadthFirst(
                    CellAst, (kandidaat) =>
                    string.Equals("EveLabelSmall", kandidaat.PyObjTypName, StringComparison.InvariantCultureIgnoreCase),
                    2, 1);

            if (null != LabelAst)
            {
                LabelAstText = LabelAst.SetText;
            }

            var ResistanceLabelMatch = Regex.Match(LabelAstText ?? "", ResistanceRegexPattern);

            if (ResistanceLabelMatch.Success)
            {
                ResistanceMili = ResistanceLabelMatch.Groups[1].Value?.TryParseInt64(Bib3.Glob.NumberFormat) * 10;
            }

            var MengeFillAst =
                Optimat.EveOnline.AuswertGbs.Extension.MatchingNodesFromSubtreeBreadthFirst(
                    CellAst, (kandidaat) =>
                    string.Equals("PyFill", kandidaat.PyObjTypName, StringComparison.InvariantCultureIgnoreCase),
                    null, 2, 1);

            if (null != MengeFillAst)
            {
                var MengeFillAstColor =
                    MengeFillAst
                    .Select((ast) => ast.Color)
                    .Where((color) => null == color ? false : color.Value.AleUnglaicNul())
                    .ToArray();

                DamageTypColor =
                    ColorORGB.VonVal(
                        MengeFillAstColor
                        .OrderBy((color) => color.Value.OMilli ?? 0)
                        .LastOrDefault());
            }
        }
Exemplo n.º 3
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 WindowOverviewZaile = this.WindowOverviewZaile;

            if (null == WindowOverviewZaile)
            {
                return;
            }

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

            var ZaileMengeChild = WindowOverviewZaile.ListChild;

            if (null == ZaileMengeChild)
            {
                return;
            }

            var ListeLabel =
                ZaileMengeChild
                .Where((Kandidaat) =>
            {
                if (null == Kandidaat)
                {
                    return(false);
                }

                var KandidaatPyObjTypName = Kandidaat.PyObjTypName;

                return(string.Equals("OverviewLabel", KandidaatPyObjTypName, StringComparison.InvariantCultureIgnoreCase));
            })
                .Where((Kandidaat) => Kandidaat.LaageInParent.HasValue)
                .OrderBy((Kandidaat) => Kandidaat.LaageInParent.Value.A)
                .ToArray();

            /*
             * 2013.10.20
             * Mit Patch 2013.10.20 Rubikon Änderung Kandidaat.PyObjTypName: "PyFill" -> "Fill"
             * */
            MengeFillAst =
                Optimat.EveOnline.AuswertGbs.Extension.MatchingNodesFromSubtreeBreadthFirst(
                    WindowOverviewZaile,
                    (Kandidaat) =>
                    (string.Equals("PyFill", Kandidaat.PyObjTypName, StringComparison.InvariantCultureIgnoreCase) ||
                     string.Equals("Fill", Kandidaat.PyObjTypName, StringComparison.InvariantCultureIgnoreCase)) &&
                    true == Kandidaat.VisibleIncludingInheritance &&
                    null != Kandidaat.Color,
                    null, 2, 1);

            AstIconContainer =
                Optimat.EveOnline.AuswertGbs.Extension.FirstMatchingNodeFromSubtreeBreadthFirst(
                    WindowOverviewZaile, (Kandidaat) => string.Equals(MainIconPyTypeName, Kandidaat.PyObjTypName, StringComparison.InvariantCultureIgnoreCase), 2);

            RightAlignedIconContainerAst =
                Optimat.EveOnline.AuswertGbs.Extension.FirstMatchingNodeFromSubtreeBreadthFirst(
                    WindowOverviewZaile, (Kandidaat) => string.Equals("rightAlignedIconContainer", Kandidaat.Name, StringComparison.InvariantCultureIgnoreCase), 2);

            RightAlignedIconContainerMengeIconAst =
                Optimat.EveOnline.AuswertGbs.Extension.MatchingNodesFromSubtreeBreadthFirst(
                    RightAlignedIconContainerAst, (Kandidaat) =>
                    (string.Equals("Icon", Kandidaat.PyObjTypName, StringComparison.InvariantCultureIgnoreCase) ||
                     string.Equals("EveIcon", Kandidaat.PyObjTypName, StringComparison.InvariantCultureIgnoreCase)),
                    null, 2, 1);

            /*
             *
             * 2014.04.12
             *
             * "EVE Online: Rubicon 1.4.4 Released on Tuesday, May 13th, 2014"
             *
             * AstIconContainerIconMain =
             *      Optimat.EveOnline.AuswertGbs.Extension.SuuceFlacMengeAstFrüheste(
             *      AstIconContainer, (Kandidaat) => string.Equals("mainIcon", Kandidaat.Name, StringComparison.InvariantCultureIgnoreCase), 2);
             *
             * */

            AstIconContainerIconMain =
                Optimat.EveOnline.AuswertGbs.Extension.FirstMatchingNodeFromSubtreeBreadthFirst(
                    AstIconContainer, (Kandidaat) => string.Equals("iconSprite", Kandidaat.Name, StringComparison.InvariantCultureIgnoreCase), 2);

            AstIconContainerIconTargetingIndicator =
                Optimat.EveOnline.AuswertGbs.Extension.FirstMatchingNodeFromSubtreeBreadthFirst(
                    AstIconContainer, (Kandidaat) => string.Equals("targeting", Kandidaat.Name, StringComparison.InvariantCultureIgnoreCase), 2);

            AstIconContainerIconTargetedByMeIndicator =
                Optimat.EveOnline.AuswertGbs.Extension.FirstMatchingNodeFromSubtreeBreadthFirst(
                    AstIconContainer, (Kandidaat) => string.Equals("targetedByMeIndicator", Kandidaat.Name, StringComparison.InvariantCultureIgnoreCase), 2);

            AstIconContainerIconMyActiveTargetIndicator =
                Optimat.EveOnline.AuswertGbs.Extension.FirstMatchingNodeFromSubtreeBreadthFirst(
                    AstIconContainer, (Kandidaat) => string.Equals("myActiveTargetIndicator", Kandidaat.Name, StringComparison.InvariantCultureIgnoreCase), 2);

            AstIconContainerIconAttackingMe =
                Optimat.EveOnline.AuswertGbs.Extension.FirstMatchingNodeFromSubtreeBreadthFirst(
                    AstIconContainer, (Kandidaat) => string.Equals("attackingMe", Kandidaat.Name, StringComparison.InvariantCultureIgnoreCase), 2);

            AstIconContainerIconHostile =
                Optimat.EveOnline.AuswertGbs.Extension.FirstMatchingNodeFromSubtreeBreadthFirst(
                    AstIconContainer, (Kandidaat) => string.Equals("hostile", Kandidaat.Name, StringComparison.InvariantCultureIgnoreCase), 2);

            var ListeZeleGbsAstUndScpalteTitel =
                SictAuswertGbsWindowOverview.MengeGbsAstZuScpalteIdentBerecneAusMengeGbsAstLaageUndMengeScpalteTitelUndLaage(
                    MengeSortHeaderTitelUndLaage,
                    ListeLabel);

            var ListeZeleBescriftungUndScpalteTitel =
                ListeZeleGbsAstUndScpalteTitel?.Select((ZeleGbsAstUndScpalteTitel) => new KeyValuePair <string, string>(
                                                           ZeleGbsAstUndScpalteTitel.Key.Text, ZeleGbsAstUndScpalteTitel.Value))
                ?.ToArray();

            Int64?    IconMainTextureIdent = null;
            ColorORGB IconMainColor        = null;

            if (null != AstIconContainerIconMain)
            {
                IconMainTextureIdent = AstIconContainerIconMain.TextureIdent0;
                IconMainColor        = ColorORGB.VonVal(AstIconContainerIconMain.Color);
            }

            Int64[] RightAlignedIconMengeTextureIdent = null;

            if (null != RightAlignedIconContainerMengeIconAst)
            {
                RightAlignedIconMengeTextureIdent =
                    RightAlignedIconContainerMengeIconAst
                    .Select((IconAst) => IconAst.TextureIdent0)
                    .Where((Kandidaat) => Kandidaat.HasValue)
                    .Select((Kandidaat) => Kandidaat.Value)
                    .ToArray();
            }
        }
Exemplo n.º 5
0
 static public bool IsRed(this ColorORGB color) =>
 null != color &&
 color.BMilli < color.RMilli / 3 &&
 color.GMilli < color.RMilli / 3 &&
 300 < color.RMilli;
Exemplo n.º 6
0
 static public bool IsEnemyBackgroundColor(this Bot bot, ColorORGB color) =>
 (color.OMilli == 500 && color.RMilli == 750 && color.GMilli == 0 && color.BMilli == 600);
Exemplo n.º 7
0
 static public bool IsFriendBackgroundColor(this Bot bot, ColorORGB color) =>
 (color.OMilli == 500 && color.RMilli == 0 && color.GMilli == 150 && color.BMilli == 600) || (color.OMilli == 500 && color.RMilli == 100 && color.GMilli == 600 && color.BMilli == 100);