示例#1
0
        private void GlobalModels_Registered(object sender, Guid e)
        {
            PObject obj = GlobalModels.GetModel <PObject>(e);

            if (obj is PContentPage page)
            {
                this.PageList.Add(page);
            }
        }
示例#2
0
        protected override void OnAttachedComponentModel()
        {
            base.OnAttachedComponentModel();

            if (GlobalModels.HasModel(this.Model.Page))
            {
                pageBox.SelectedItem = GlobalModels.GetModel <PObject>(this.Model.Page);
            }
        }
示例#3
0
        private void GlobalModels_UnRegistering(object sender, Guid e)
        {
            PObject obj = GlobalModels.GetModel <PObject>(e);

            if (obj is PContentPage page)
            {
                this.PageList.Remove(page);
            }
        }
示例#4
0
        private void GlobalModels_UnRegistering(object sender, Guid e)
        {
            PObject obj = GlobalModels.GetModel <PObject>(e);

            if (obj is PTemplatePage template)
            {
                this.TemplateList.Remove(template);
            }
        }
示例#5
0
        private void GlobalModels_Registered(object sender, Guid e)
        {
            PObject obj = GlobalModels.GetModel <PObject>(e);

            if (obj is PTemplatePage template)
            {
                this.TemplateList.Add(template);
            }
        }
示例#6
0
        protected override void OnAttachedComponentModel()
        {
            base.OnAttachedComponentModel();

            if (GlobalModels.HasModel(this.Model.Template))
            {
                templateBox.SelectedItem = GlobalModels.GetModel <PTemplatePage>(this.Model.Template);
            }
        }
示例#7
0
        public SelectorRenderer(ObjectSelector adornedElement, PSelector model) : base(adornedElement, model)
        {
            if (this.Model.TargetVisual != null)
            {
                var registedModel = GlobalModels.GetModel <PVisual>(this.Model.TargetVisual.Guid);

                this.Model.TargetVisual = registedModel;
            }
        }
示例#8
0
        public static IRenderer GetRendererFromGuid(this Guid guid)
        {
            if (GlobalModels.HasModel(guid))
            {
                PObject model = GlobalModels.GetModel <PObject>(guid);

                return(model.GetRenderer());
            }

            return(null);
        }