Exemplo n.º 1
0
        public void OpenResource(Panel parentPanel, PhactoryHost.Database.Resource resource)
        {
            View.View view = new View.View(resource);
            view.Parent = parentPanel;
            view.Dock   = System.Windows.Forms.DockStyle.Fill;

            ResourceBinding resourceBinding = new ResourceBinding(parentPanel, view);

            viewBinding.Add(resource, resourceBinding);

            resourceBinding.View.Document = Host.XMLRead <Document.Document>(Host.GetFileInfo(resource).FullName);
            if (resourceBinding.View.Document is Document.Document)
            {
                if (Host.IsVerboseOutput())
                {
                    Host.Log(resource.DisplayName + " loaded");
                }
            }
            else
            {
                Host.Log("Problem while loading " + resource.DisplayName);
            }

            view.RefreshUI();
            view.RefreshTitle();

            view.IsReady = true;
        }
Exemplo n.º 2
0
        public void OpenResource(Panel parentPanel, PhactoryHost.Database.Resource resource)
        {
            View.View view = new View.View(resource);
            view.Parent = parentPanel;
            view.Dock = System.Windows.Forms.DockStyle.Fill;

            ResourceBinding resourceBinding = new ResourceBinding(parentPanel, view);
            viewBinding.Add(resource, resourceBinding);

            resourceBinding.View.Document = Host.XMLRead<Document.Document>(Host.GetFileInfo(resource).FullName);
            if (resourceBinding.View.Document is Document.Document)
            {
                if (Host.IsVerboseOutput())
                {
                    Host.Log(resource.DisplayName + " loaded");
                }
            }
            else
            {
                Host.Log("Problem while loading " + resource.DisplayName);
            }

            view.RefreshUI();
            view.RefreshTitle();

            view.IsReady = true;
        }