public IPanelViewController GetOrCreate(PanelType type)
 {
     if (controllers.TryGetValue(type, out var controller))
     {
         return(controller);
     }
     controller = new PanelViewController(type);
     controllers.Add(type, controller);
     return(controller);
 }
Пример #2
0
        public void ClearAndPush()
        {
            IPanelViewController controller;

            if (provider != null)
            {
                controller = provider.GetOrCreate(panelType);
            }
            else
            {
                controller = new PanelViewController(panelType);
            }

            stack.ClearAndPush(controller);
        }
Пример #3
0
        public void Push()
        {
            if (clearBeforePush)
            {
                ClearAndPush();
                return;
            }

            IPanelViewController controller;

            if (provider != null)
            {
                controller = provider.GetOrCreate(panelType);
            }
            else
            {
                controller = new PanelViewController(panelType);
            }

            stack.Push(controller);
        }