private static void ResourceView_ShowItem_pof(ResourceView __instance, Item item)
 {
     if (__instance.transform.parent == _actualTargetItemsContainer)
     {
         StationWindowOverviewTabExtender tabExt = __instance.transform.GetComponentInParent <StationWindowOverviewTabExtender>();
         if (tabExt)
         {
             Dictionary <Item, int> demandedItems = tabExt.DemandedItems;
             if (demandedItems != null && demandedItems.TryGetValue(item, out int count))
             {
                 __instance.ShowItem(item, count);
             }
         }
     }
 }
        internal void AddOneItemToContainer(List <ResourceView> resourceViews, int viewIndex, Transform itemContainer, Item item, int itemAmount, float?neededCount, Func <Item, int, string> itemTooltipTextFunc)
        {
            ResourceView view       = this.GetResourceView(resourceViews, viewIndex, itemContainer);
            Panel        valueCont  = view.gameObject.transform.Find("ValueContainer").GetComponent <Panel>();
            Transform    demandCont = view.transform.Find("DemandContainer");

            if (neededCount != null)
            {
                view.Show(null, null, LazyManager <IconRenderer> .Current.GetItemIcon(item.AssetId), StringHelper.Simplify((double)itemAmount), StringHelper.FormatCountString(item.DisplayName, itemAmount.ToString("N0") + "/" + neededCount.Value.ToString("N0")));

                demandCont.Find <Text>("Value").text = StringHelper.Simplify(neededCount.Value);
                demandCont.gameObject.SetActive(true);
                float ratio = itemAmount / neededCount.Value;
                if (ratio > 1.05f)
                {
                    valueCont.color = Color.blue;
                }
                else
                if (ratio < 0.9f)
                {
                    valueCont.color = Color.red;
                }
                else
                {
                    valueCont.color = new Color(0, 0.88f, 0);
                }
            }
            else
            {
                view.ShowItem(item, null, itemAmount);
                valueCont.color = _resourceViewOrigColor;
                demandCont.gameObject.SetActive(false);
            }
            if (itemTooltipTextFunc != null)
            {
                view.GetComponent <TooltipTarget>().DynamicText = delegate { return(itemTooltipTextFunc.Invoke(item, itemAmount)); };
            }
        }