public override void cleanup(CleanupInfo cleanupInfo)
 {
     if (cleanupInfo.hasObjectClass(PropClass))
     {
         cleanupInfo.claimObject(PropClass, propType);
     }
 }
 public void claimFiles(CleanupInfo info, ResourceProvider resourceProvider, Slide slide)
 {
     foreach (RmlSlidePanel panel in panels.Values)
     {
         panel.claimFiles(info, resourceProvider, slide);
     }
 }
示例#3
0
 public void cleanup(CleanupInfo cleanupInfo, ResourceProvider resourceProvider)
 {
     cleanupInfo.defineObjectClass(Slide.SlideActionClass);
     cleanupInfo.defineObjectClass(ShowPropAction.PropClass);
     foreach (Slide slide in slides)
     {
         slide.cleanup(cleanupInfo, resourceProvider);
     }
 }
示例#4
0
        public void cleanup(CleanupInfo cleanupInfo)
        {
            foreach (TimelineInstantAction action in PreActions)
            {
                action.cleanup(cleanupInfo);
            }

            foreach (TimelineAction action in Actions)
            {
                action.cleanup(cleanupInfo);
            }

            foreach (TimelineInstantAction action in PostActions)
            {
                action.cleanup(cleanupInfo);
            }
        }
示例#5
0
        protected internal override void claimFiles(CleanupInfo info, ResourceProvider resourceProvider, Slide slide)
        {
            String rml         = null;
            String rmlFullPath = getRmlFilePath(slide);

            if (resourceProvider.fileExists(rmlFullPath))
            {
                using (StreamReader stringReader = new StreamReader(resourceProvider.openFile(rmlFullPath)))
                {
                    rml = stringReader.ReadToEnd();
                }
            }

            if (String.IsNullOrEmpty(rml))
            {
                Logging.Log.Warning("Could not claim files for slide '{0}', cannot find rml file '{1}' for panel '{2}'", slide.UniqueName, rmlFullPath, ElementName);
                return; //Break if we cannot load the rml
            }

            info.claimFile(rmlFullPath);

            XDocument rmlDoc = XDocument.Parse(rml);
            var       images = from query in rmlDoc.Descendants("img")
                               where query.Attribute("src") != null
                               select query.Attribute("src").Value;

            foreach (String image in images)
            {
                info.claimFile(Path.Combine(slide.UniqueName, image));
            }

            var triggers = from e in rmlDoc.Root.Descendants()
                           where e.Attribute("onclick") != null
                           select e;

            if (info.hasObjectClass(Slide.SlideActionClass))
            {
                foreach (var element in triggers)
                {
                    info.claimObject(Slide.SlideActionClass, element.Attribute("onclick").Value);
                }
            }

            base.claimFiles(info, resourceProvider, slide);
        }
        private void findDependencies()
        {
            CleanupInfo resourceInfo = new CleanupInfo();

            resourceInfo.defineObjectClass(ShowPropAction.PropClass);
            foreach (String file in editorController.ResourceProvider.listFiles("*.tl", "", true))
            {
                Timeline timeline;
                using (Stream fileStream = editorController.ResourceProvider.openFile(file))
                {
                    timeline = SharedXmlSaver.Load <Timeline>(fileStream);
                }
                timeline.cleanup(resourceInfo);
            }

            plugin.setDependencyIds(resourceInfo.getObjects <String>(ShowPropAction.PropClass)
                                    .Select(n => standaloneController.PropFactory.getDependencyIdForProp(n))
                                    .Where(id => id.HasValue)
                                    .Select(id => id.Value));
        }
示例#7
0
        public virtual void cleanup(CleanupInfo info, ResourceProvider resourceProvider)
        {
            String timelinePath = Path.Combine(UniqueName, "Timeline.tl");

            info.claimFile(timelinePath);
            if (resourceProvider.exists(timelinePath))
            {
                using (Stream stream = resourceProvider.openFile(timelinePath))
                {
                    Timeline timeline = SharedXmlSaver.Load <Timeline>(stream);
                    timeline.cleanup(info);
                }
            }
            info.claimFile(Path.Combine(UniqueName, "Thumb.png"));
            info.claimFile(Path.Combine(UniqueName, StyleSheetName));
            info.claimFile(SceneThumbName);
            info.claimFile(SceneThumbInfoName);
            layoutStrategy.claimFiles(info, resourceProvider, this);

            //Clean up actions
            List <String> removeActions = new List <String>(triggerActions.Keys);

            foreach (String action in info.getObjects <String>(Slide.SlideActionClass))
            {
                removeActions.Remove(action);
            }
            foreach (String action in removeActions)
            {
                triggerActions.Remove(action);
            }
            info.clearObjects(Slide.SlideActionClass);

            foreach (var action in triggerActions.Values)
            {
                action.cleanup(this, info, resourceProvider);
            }
        }
 public override void cleanup(CleanupInfo cleanupInfo)
 {
     cleanupInfo.claimFile(Scene);
 }
示例#9
0
 protected internal virtual void claimFiles(CleanupInfo info, ResourceProvider resourceProvider, Slide slide)
 {
 }
示例#10
0
 public override void cleanup(CleanupInfo cleanupInfo)
 {
     cleanupInfo.claimFile(ImageFile);
 }
示例#11
0
 public override void cleanup(CleanupInfo cleanupInfo)
 {
 }
示例#12
0
 public override void cleanup(CleanupInfo cleanupInfo)
 {
     cleanupInfo.claimFile(TargetTimeline);
 }
示例#13
0
 public abstract void cleanup(CleanupInfo cleanupInfo);