Esempio n. 1
0
 protected void RegisterChild(Plate child)
 {
     if (!children.Contains(child))
     {
         children.Add(child);
     }
 }
Esempio n. 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);
        }
Esempio n. 3
0
        public virtual void Initialize()
        {
            if (Initialized)
            {
                return;
            }
            Initialized = true;

            if (plate || (plate = GetComponent <Plate>()))
            {
                plate.stateHandle      = this;
                plate.onEvaluateState += Plate_onEvaluateState;
            }
        }
Esempio n. 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;
                }
            }
        }
Esempio n. 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>();
            }
        }
Esempio n. 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;
        }
        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;
        }
Esempio n. 8
0
 public void RebuildBranch(Plate plate)
 {
 }
Esempio n. 9
0
        //public abstract List<object> GetDrawableObjects() { }

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