Exemplo n.º 1
0
 /// <summary>
 /// Removes a page from the list describing the order of pages in the document.
 /// </summary>
 /// <param name="page">The page to remove.</param>
 public void RemovePageFromPageOrder(Page page)
 {
     if (PageOrder.IndexOf(page) != -1)
     {
         PageOrder.Remove(page);
     }
     else
     {
         throw new Exception("Page must be in the page index.");
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Removes a resource from this document.
 /// </summary>
 /// <param name="resource">The resource to remove.</param>
 public void Remove(Resource resource)
 {
     foreach (Resource otherResource in Resources.Values)
     {
         otherResource.ResourceModified(resource, ResourceModifyType.Remove);
     }
     if (PageOrder.Contains(resource as Page))
     {
         PageOrder.Remove(resource as Page);
     }
     Resources.Remove(resource.Guid);
 }