public void Initialize(StationWindow window)
        {
            Locale locale = LazyManager <LocaleManager> .Current.Locale;

            StationWindow = window;
            OverviewTab   = gameObject.GetComponent <StationWindowOverviewTab>();
            if (OverviewTab == null)
            {
                throw new NullReferenceException("Component StationWindowOverviewTab not found");
            }
            Transform content = base.transform.Find("Body/WindowScrollView").GetComponent <ScrollRect>().content;

            _unloadedContainer = LazyManager <StationWindowLogisticHelper> .Current.CreateItemsContainer(content, locale.GetString("schedule_stopwatch/monthly_unloaded_items").ToUpper(), "UnloadedItems");

            _unloadedContainer.SetSiblingIndex(2);
            _unloadedItemsContainer = _unloadedContainer.Find("Content");
            _unloadedContainerTitle = _unloadedContainer.Find("Label").gameObject.GetComponent <Text>();

            Tooltip.For(
                _unloadedContainerTitle.transform,
                () => LazyManager <StationWindowLogisticHelper> .Current.GetEstimatatedNeededItemsTooltipText(GetEstimatatedNeededItems(), LastTransfers),
                null
                );

            _loadedContainer = LazyManager <StationWindowLogisticHelper> .Current.CreateItemsContainer(content, locale.GetString("schedule_stopwatch/monthly_loaded_items").ToUpper(), "LoadedItems");

            _loadedContainer.SetSiblingIndex(3);
            _loadedItemsContainer = _loadedContainer.Find("Content");
            _loadedContainerTitle = _loadedContainer.Find("Label").gameObject.GetComponent <Text>();

            Tooltip.For(
                _loadedContainerTitle.transform,
                () => LazyManager <StationWindowLogisticHelper> .Current.GetEstimatatedNeededItemsTooltipText(GetEstimatatedNeededItems(), LastTransfers),
                null
                );
            this._offset = Time.unscaledTime;
        }
コード例 #2
0
 public void loadWindow(string Name)
 {
     MC_Window = new StationWindow(FormsHost);
     MC_Window.LoadClient(Name);
 }
        private static void VehicleWindowScheduleTab_Initialize_prf(VehicleWindowScheduleTab __instance, StationWindow window)
        {
            StationWindowOverviewTabExtender tabExt = __instance.gameObject.AddComponent <StationWindowOverviewTabExtender>();

            tabExt.Initialize(window);
        }