Пример #1
0
        internal virtual void InitializeProject()
        {
            foreach (PContentPage screen in Model.Project.Screens)
            {
                // Load Renderer
                LoadScreenRenderer(screen);

                DispatcherEx.WaitFor(DispatcherPriority.Loaded);

                // 모든 트리 탐색
                foreach (var node in screen.FindContentChildrens <PObject, PObject>())
                {
                    // Load Renderer
                    LoadElementRenderer(node.Parent, node.Child);
                }
            }

            // 로직
            foreach (PComponent component in Model.Project.Components)
            {
                LoadComponentRenderer(component);
            }

            // 연결 정보
            ConnectExpressions(Model.Project.GetBindExpressions());
        }
Пример #2
0
        internal override void InitializeProject()
        {
            foreach (PTemplatePage page in Model.Project.Templates)
            {
                // Load Renderer
                LoadTemplateRenderer(page);

                DispatcherEx.WaitFor(DispatcherPriority.Loaded);

                // 모든 트리 탐색
                foreach (var node in page.FindContentChildrens <PObject, PObject>())
                {
                    // Load Renderer
                    LoadElementRenderer(node.Parent, node.Child);
                }
            }
        }
Пример #3
0
        internal void InitializeProject()
        {
            foreach (PContentPage screen in Model.Project.Screens)
            {
                // Load Renderer
                LoadScreenRenderer(screen);

                DispatcherEx.WaitFor(DispatcherPriority.Loaded);

                // 모든 트리 탐색
                foreach (var node in screen.FindContentChildrens <PObject, PObject>())
                {
                    // Load Renderer
                    LoadElementRenderer(node.Parent, node.Child);
                }
            }

            // 로직
            foreach (PComponent component in Model.Project.Components)
            {
                LoadComponentRenderer(component);
            }

            // 연결 정보
            foreach (var expression in Model.Project.GetBindExpressions())
            {
                PBinder output = Model.Project.GetComponentBinder(expression.Output);
                PBinder input  = Model.Project.GetComponentBinder(expression.Input);

                var outputRenderer = (output.Host as PBinderHost).GetRenderer();

                outputRenderer.ElementAttached += Attached;

                void Attached(object sender, EventArgs e)
                {
                    outputRenderer.ElementAttached -= Attached;

                    BindThumb outputThumb = output.GetView <BindThumb>();
                    BindThumb inputThumb  = input.GetView <BindThumb>();

                    ConnectComponent(outputThumb, inputThumb);
                }
            }
        }