Пример #1
0
 protected void RegisterChild(Plate child)
 {
     if (!children.Contains(child))
     {
         children.Add(child);
     }
 }
Пример #2
0
        internal static List <Binding> GetList(Plate panel, Dictionary <Plate, List <Binding> > bindings)
        {
            if (bindings.ContainsKey(panel))
            {
                return(bindings[panel]);
            }

            List <Binding> list = new List <Binding>();

            bindings.Add(panel, list);
            return(list);
        }
Пример #3
0
        public virtual void Initialize()
        {
            if (Initialized)
            {
                return;
            }
            Initialized = true;

            if (plate || (plate = GetComponent <Plate>()))
            {
                plate.stateHandle      = this;
                plate.onEvaluateState += Plate_onEvaluateState;
            }
        }
Пример #4
0
        public void Initialize()
        {
            if (plate || (plate = GetComponent <Plate>()))
            {
                plate.renderer          = this;
                plate.onRefreshStatic  += Plate_onRefreshStatic;
                plate.onRefreshDynamic += Plate_onRefreshDynamic;

                if ((Model || (Model = GetComponent <IModel>() as Object)) && Model is IModel iModel)
                {
                    viewModel = iModel;
                    viewModel.onModelChange += Model_onModelChange;
                }
            }
        }
Пример #5
0
        protected virtual void GetLocalReferences()
        {
            if (!router)
            {
                router = GetComponentInParent <Router>();
            }

            // Get nearest parent
            if (parent || (parent = transform.parent.GetComponentInParent <Plate>()))
            {
                parent.RegisterChild(this);
            }

            if (!customView)
            {
                customView = GetComponent <ViewHandle>();
            }
        }
Пример #6
0
        public virtual void Initialize()
        {
            if (Initialized)
            {
                return;
            }
            Initialized = true;

            if (plate || (plate = GetComponent <Plate>()))
            {
                plate.onEvaluateState += Plate_onEvaluateState;
            }

            // Get the router in case we didn't inject
            if (!router)
            {
                router = GetComponentInParent <Router <T> >();
            }

            // Subscribe to router state changes
            router.onStateChange += Router_onStateChange;
        }
Пример #7
0
        public void Initialize()
        {
            if (Initialized)
            {
                return;
            }
            Initialized = true;

            if (!router)
            {
                router = GetComponentInParent <Router <string> >();
            }
            router.RegisterInterpreter(this);
            router.onStateChange += Router_onStateChange;

            if (!plate)
            {
                plate = GetComponent <Plate>();
                plate.onShow.AddListener(Plate_OnShow);
                plate.onHide.AddListener(Plate_OnHide);
            }

            plate.onRefreshVisualTree += Plate_onRefreshHierarchy;
        }
Пример #8
0
 public void RebuildBranch(Plate plate)
 {
 }
Пример #9
0
        //public abstract List<object> GetDrawableObjects() { }

        public abstract void Initialize(VisualElement container, Plate plate);