Esempio n. 1
0
        static public BotEngine.EveOnline.Interface.MemoryStruct.ListEntry AsOldListEntry(
            this Sanderling.Interface.MemoryStruct.IListEntry entry,
            bool toDrone)
        {
            if (entry == null)
            {
                return(null);
            }

            var @base = new BotEngine.EveOnline.Interface.MemoryStruct.ListEntry(entry.AsOldUIElement())
            {
                ContentBoundLeft    = entry?.ContentBoundLeft,
                GroupExpander       = entry?.GroupExpander?.AsOldUIElement(),
                IsExpanded          = entry?.IsExpanded,
                IsGroup             = entry?.IsGroup,
                IsSelected          = entry?.IsSelected,
                SetSprite           = entry?.SetSprite?.Select(AsOld)?.ToArray(),
                ListBackgroundColor = entry?.ListBackgroundColor,
                ListColumnCellLabel = entry?.ListColumnCellLabel?.Select(c => new KeyValuePair <BotEngine.EveOnline.Interface.MemoryStruct.ListColumnHeader, string>(c.Key.AsOld(), c.Value))?.ToArray(),
                Label = entry?.LabelText?.Largest()?.AsOldUIElementLabelString(),
            };

            var droneEntry    = entry as IDroneViewEntryItem;
            var overviewEntry = entry as Sanderling.Parse.IOverviewEntry;

            if (overviewEntry != null)
            {
                return new BotEngine.EveOnline.Interface.MemoryStruct.OverviewEntry(@base)
                       {
                           RightIcon = overviewEntry?.RightIcon?.Select(AsOld)?.ToArray(),
                       }
            }
            ;

            if (droneEntry != null)
            {
                return new BotEngine.EveOnline.Interface.MemoryStruct.DroneViewEntryItem(@base)
                       {
                           Hitpoints = droneEntry?.Hitpoints?.AsOld(),
                       }
            }
            ;

            if (toDrone && (entry?.IsGroup ?? false))
            {
                return new BotEngine.EveOnline.Interface.MemoryStruct.DroneViewEntryGroup(@base)
                       {
                           Caption = entry?.LabelTextLargest()?.AsOldUIElementLabelString(),
                       }
            }
            ;

            return(@base);
        }
Esempio n. 2
0
        public ListEntry(MemoryStruct.IListEntry raw)
        {
            this.Raw = raw;

            if (null == raw)
            {
                return;
            }

            var DistanceMinMax = raw?.ColumnDistanceValue()?.DistanceParseMinMaxKeyValue();

            DistanceMin = DistanceMinMax?.Key;
            DistanceMax = DistanceMinMax?.Value;

            Type = raw?.ColumnTypeValue();
            Name = raw?.ColumnNameValue();
        }
Esempio n. 3
0
 static public string ColumnDistanceValue(this MemoryStruct.IListEntry listEntry) =>
 CellValueFromColumnHeader(listEntry, "distance");
Esempio n. 4
0
 static public IListEntry ParseAsListEntry(this MemoryStruct.IListEntry listEntry) =>
 null == listEntry ? null : new ListEntry(listEntry);
Esempio n. 5
0
 static public string CellValueFromColumnHeader(
     this MemoryStruct.IListEntry listEntry,
     string headerLabel) =>
 listEntry?.ListColumnCellLabel
 ?.FirstOrDefault(cell => (cell.Key?.Text).EqualsIgnoreCase(headerLabel))
 .Value;
Esempio n. 6
0
 static public bool IsNoItem(this MemoryStruct.IListEntry listEntry) =>
 NoItemRegex.MatchSuccess(listEntry?.LabelTextLargest()?.Text);
Esempio n. 7
0
 static public IUIElementText LabelTextLargest(this MemoryStruct.IListEntry listEntry) =>
 listEntry?.LabelText?.Largest();
 public static bool ActuallyAnomaly(IListEntry scanResult)
 {
     return(scanResult?.CellValueFromColumnHeader("Distance")?.RegexMatchSuccessIgnoreCase("km") ?? false);
 }
Esempio n. 9
0
 static public string ColumnNameValue(this MemoryStruct.IListEntry ListEntry) =>
 CellValueFromColumnHeader(ListEntry, "name");