void ISupportsProjectReload.Update(Project project)
        {
            if (gproject != null && gproject.Project == project)
            {
                return;
            }

            if (designer != null)
            {
                designerStatus = designer.SaveStatus();
            }

            CloseDesigner();
            CloseProject();
            if (project != null)
            {
                GuiBuilderWindow w = GuiBuilderDisplayBinding.GetWindow(this.ContentName);
                if (w != null)
                {
                    AttachWindow(w);
                    if (designerStatus != null)
                    {
                        designer.LoadStatus(designerStatus);
                    }
                    designerStatus = null;
                }
            }
        }
Esempio n. 2
0
        protected override void OnSetProject(Projects.Project project)
        {
            base.OnSetProject(project);

            if (gproject != null && gproject.Project == project)
            {
                return;
            }

            if (designer != null)
            {
                designerStatus = designer.SaveStatus();
            }

            CloseDesigner();
            CloseProject();
            if (project != null)
            {
                GuiBuilderWindow w = GuiBuilderDisplayBinding.GetWindow(this.ContentName, project);
                if (w != null)
                {
                    AttachWindow(w);
                    if (designerStatus != null)
                    {
                        designer.LoadStatus(designerStatus);
                    }
                    designerStatus = null;
                }
            }
        }
Esempio n. 3
0
        protected override void OnOwnerChanged()
        {
            base.OnOwnerChanged();

            // View not yet initialized
            if (designerPage == null)
            {
                return;
            }

            var project = Owner as Projects.Project;

            if (gproject != null && gproject.Project == project)
            {
                return;
            }

            if (designer != null)
            {
                designerStatus = designer.SaveStatus();
            }

            CloseDesigner();
            CloseProject();
            if (project != null)
            {
                GuiBuilderWindow w = GuiBuilderDisplayBinding.GetWindow(FilePath, project);
                if (w != null)
                {
                    AttachWindow(w);
                    if (designerStatus != null)
                    {
                        designer.LoadStatus(designerStatus);
                    }
                    designerStatus = null;
                }
            }
        }
Esempio n. 4
0
        public void ReloadDesigner(Project project)
        {
            if (designer != null)
            {
                designerStatus = designer.SaveStatus();
            }

            CloseDesigner();
            CloseProject();
            if (project != null)
            {
                GuiBuilderWindow w = GuiBuilderDisplayBinding.GetWindow(this.ContentName);
                if (w != null)
                {
                    AttachWindow(w);
                    if (designerStatus != null)
                    {
                        designer.LoadStatus(designerStatus);
                    }
                    designerStatus = null;
                }
            }
        }