Exemple #1
0
        public void SaveResource(PhactoryHost.Database.Resource resource)
        {
            bool writeOK = Host.XMLWrite(Host.GetFileInfo(resource).FullName, viewBinding[resource].View.Document);

            if (writeOK)
            {
                if (Host.IsVerboseOutput())
                {
                    Host.Log(resource.DisplayName + " written");
                }

                Host.RefreshOutput(resource);
                List <PhactoryHost.Database.Resource> dependentResources = new List <PhactoryHost.Database.Resource>();
                foreach (Document.Item item in viewBinding[resource].View.Document.Items)
                {
                    dependentResources.Add(Plugin.ControllerEditor.Host.GetResource(item.ResourceID));
                }
                Host.RefreshDependencies(resource, dependentResources);

                viewBinding[resource].View.SetModified(false);
            }
            else
            {
                Host.Log("Problem while writing " + resource.DisplayName);
            }
        }
Exemple #2
0
        public void SaveResource(PhactoryHost.Database.Resource resource)
        {
            bool writeOK = Host.XMLWrite(Host.GetFileInfo(resource).FullName, viewBinding[resource].View.Document);

            if (writeOK)
            {
                if (Host.IsVerboseOutput())
                {
                    Host.Log(resource.DisplayName + " written");
                }

                Host.RefreshOutput(resource);

                viewBinding[resource].View.SetModified(false);
            }
            else
            {
                Host.Log("Problem while writing " + resource.DisplayName);
            }
        }
Exemple #3
0
        public void SaveResource(PhactoryHost.Database.Resource resource)
        {
            if (viewBinding.ContainsKey(resource))
            {
                View.View view = viewBinding[resource].View;

                IgnoreNextResource = resource;

                FileInfo fileInfo = Host.GetFileInfo(resource);
                view.WriteContentToFile(fileInfo.FullName);

                if (Host.IsVerboseOutput())
                {
                    Host.Log(resource.DisplayName + " written");
                }

                Host.RefreshOutput(resource);

                view.SetModified(false);
            }
        }