public MemoryMeasurement(MemoryStruct.IMemoryMeasurement raw) { this.Raw = raw; if (null == raw) { return; } Culture.InvokeInParseCulture(() => { Target = raw?.Target?.Select(ShipUiExtension.Parse)?.ToArray(); ModuleButtonTooltip = raw?.ModuleButtonTooltip?.ParseAsModuleButtonTooltip(); WindowOverview = raw?.WindowOverview?.Select(OverviewExtension.Parse)?.ToArray(); WindowInventory = raw?.WindowInventory?.Select(InventoryExtension.Parse)?.ToArray(); WindowAgentDialogue = raw?.WindowAgentDialogue?.Select(DialogueMissionExtension.Parse)?.ToArray(); ShipUi = raw?.ShipUi?.Parse(); var SetWindowStation = raw?.WindowStation; if (!SetWindowStation.IsNullOrEmpty()) { IsDocked = true; } if (null != ShipUi || (raw?.WindowOverview?.WhereNotDefault()?.Any() ?? false)) { IsDocked = false; } if (!(IsDocked ?? true)) { IsUnDocking = false; } if (SetWindowStation?.Any(windowStation => windowStation?.AboveServicesLabel?.Any(labelText => labelText?.Text?.RegexMatchSuccessIgnoreCase(@"abort\s*undock|undocking") ?? false) ?? false) ?? false) { IsUnDocking = true; } Neocom = raw?.Neocom?.Parse(); Menu = raw?.Menu?.Select(menu => menu?.Parse())?.ToArrayIfNotEmpty(); InfoPanelCurrentSystem = raw?.InfoPanelCurrentSystem?.Parse(); }); }
public MemoryMeasurement(MemoryStruct.IMemoryMeasurement Raw) { this.Raw = Raw; if (null == Raw) { return; } Culture.InvokeInParseCulture(() => { Target = Raw?.Target?.Select(ShipUiExtension.Parse)?.ToArray(); ModuleButtonTooltip = Raw?.ModuleButtonTooltip?.ParseAsModuleButtonTooltip(); WindowOverview = Raw?.WindowOverview?.Select(OverviewExtension.Parse)?.ToArray(); WindowInventory = Raw?.WindowInventory?.Select(InventoryExtension.Parse)?.ToArray(); WindowAgentDialogue = Raw?.WindowAgentDialogue?.Select(DialogueMissionExtension.Parse)?.ToArray(); var ShipUi = Raw?.ShipUi; var SetWindowStation = Raw?.WindowStation; if (!SetWindowStation.IsNullOrEmpty()) { IsDocked = true; } if (null != ShipUi || (Raw?.WindowOverview?.WhereNotDefault()?.Any() ?? false)) { IsDocked = false; } if (!(IsDocked ?? true)) { IsUnDocking = false; } if (SetWindowStation?.Any(WindowStationLobby => WindowStationLobby?.LabelText?.Any(LabelText => LabelText?.Text?.RegexMatchSuccess(@"abort\s*undock|undocking") ?? false) ?? false) ?? false) { IsUnDocking = true; } Neocom = Raw?.Neocom?.Parse(); }); }