Ejemplo n.º 1
0
#pragma warning restore 0649
#pragma warning restore IDE0044
        #endregion

        public void Initialize(
            TerminalWindow window,
            ICrewTransferController controller,
            IPrefabInstantiator prefabInstantiator)
        {
            _controller         = controller;
            _labels             = controller.SelectedFlightPanelLabels;
            _prefabInstantiator = prefabInstantiator;
            _window             = window;

            if (DepartureHeaderLabel != null)
            {
                DepartureHeaderLabel.text
                    = _labels.DepartureHeaderLabel;
            }
            if (ArrivalHeaderLabel != null)
            {
                ArrivalHeaderLabel.text
                    = _labels.ArrivalHeaderLabel;
            }
            if (EconomySeatsHeaderLabel != null)
            {
                EconomySeatsHeaderLabel.text
                    = _labels.EconomySeatsHeaderLabel;
            }
            if (LuxurySeatsHeaderLabel != null)
            {
                LuxurySeatsHeaderLabel.text
                    = _labels.LuxurySeatsHeaderLabel;
            }
        }
Ejemplo n.º 2
0
        public void Initialize(
            ICrewTransferController controller,
            IPrefabInstantiator prefabInstantiator,
            Action onCloseCallback)
        {
            _controller         = controller;
            _onCloseCallback    = onCloseCallback;
            _prefabInstantiator = prefabInstantiator;

            if (TitleBarText != null)
            {
                TitleBarText.text = _controller.TitleBarLabel;
            }
            if (DeparturesHeaderLabel != null)
            {
                DeparturesHeaderLabel.text = _controller.DeparturesHeaderLabel;
            }
            if (ArrivalsHeaderLabel != null)
            {
                ArrivalsHeaderLabel.text = _controller.ArrivalsHeaderLabel;
            }
            if (FlightsHeaderLabel != null)
            {
                FlightsHeaderLabel.text = _controller.FlightsHeaderLabel;
            }
            if (SelectedFlightPanel != null)
            {
                SelectedFlightPanel.Initialize(this, controller, _prefabInstantiator);
            }
            if (ArrivalPanel != null)
            {
                ArrivalPanel.Initialize(
                    this,
                    _prefabInstantiator,
                    controller.ArrivalPanelLabels);
            }
            if (DeparturePanel != null)
            {
                DeparturePanel.Initialize(
                    this,
                    _prefabInstantiator,
                    controller.DeparturePanelLabels);
            }
            if (EnroutePanel != null)
            {
                EnroutePanel.Initialize(
                    this,
                    _prefabInstantiator,
                    controller.EnroutePanelLabels);
            }
        }